ContourPointRep.h
Go to the documentation of this file.
00001 /* -*- mode: c++ -*- */
00002 
00014 #ifndef _ContourPointRep_H_
00015 #define _ContourPointRep_H_
00016 
00017 #include "LinePointRep.h"
00018 
00019 namespace hippodraw {
00020 
00021 class BinToColor;
00022 
00045   class MDL_HIPPOPLOT_API ContourPointRep : public LinePointRep
00046 {
00047 
00048 private:
00049   
00051   BinToColor * m_bin_to_color;
00052   
00054   std::vector< Color > m_colorvec;
00055 
00059   std::vector < Line::Style > m_stylevec;
00060 
00062   int m_numContours;
00063 
00065   double m_maxValue;
00066   
00068   double m_minValue;
00069 
00071   double m_minPos;
00072 
00074   std::vector < double > m_values;
00075 
00078   bool m_usingUserValues;
00079 
00080 
00081 public:
00082 
00084   ContourPointRep();
00085   
00087   ContourPointRep ( float size );
00088   
00090   ContourPointRep( const ContourPointRep & point_rep );
00091 
00093   ~ContourPointRep();
00094 
00097   virtual RepBase * clone();
00098 
00099   virtual const BinToColor * getValueTransform ( ) const;
00100   virtual void setValueTransform ( BinToColor * );
00101   virtual void drawProjectedValues ( const DataSource * ntuple,
00102                                      TransformBase * transform,
00103                                      ViewBase * view );
00104 
00105   void drawContourTicks ( const TransformBase &, 
00106                           ViewBase &,
00107                           const std::vector < double > & );
00108 
00110   bool getUsingUserValues () const;
00111 
00113   void setUsingUserValues ( bool flag );
00114 
00116   void setNumContours ( int i );
00117 
00119   int getNumContours () const;
00120 
00122   void setContourValues ( std::vector < double > & values,
00123                           ProjectorBase * proj );
00124 
00125 private:
00126 
00127 /*
00128 Copyright (c) 1996-1997 Nicholas Yue
00129 
00130 This software is copyrighted by Nicholas Yue. This code is base on the work of
00131 Paul D. Bourke CONREC.F routine
00132 
00133 The authors hereby grant permission to use, copy, and distribute this
00134 software and its documentation for any purpose, provided that existing
00135 copyright notices are retained in all copies and that this notice is included
00136 verbatim in any distributions. Additionally, the authors grant permission to
00137 modify this software and its documentation for any purpose, provided that
00138 such modifications are not distributed without the explicit consent of the
00139 authors and that existing copyright notices are retained in all copies. Some
00140 of the algorithms implemented by this software are patented, observe all
00141 applicable patent law.
00142 
00143 IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR
00144 DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
00145 OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF,
00146 EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00147 
00148 THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, INCLUDING,
00149 BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
00150 PARTICULAR PURPOSE, AND NON-INFRINGEMENT.  THIS SOFTWARE IS PROVIDED ON AN
00151 "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE
00152 MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
00153 */
00154 
00155 
00165   void createContours (  const DataSource * ntuple,
00166                          const TransformBase * transform );
00167   
00170   double getContour ( int i, const TransformBase * transform );
00171 
00174   double intersect ( int p1, int p2, double * h, double * xh );
00175   
00178   void setMinMax ( const DataSource * );
00179 
00182   void setContourVector ( const TransformBase * transform );
00183 
00186   void init ();  
00187     
00188 
00189 
00190 private:
00191 
00194   virtual void drawValues ( const TransformBase &, 
00195                             ViewBase & vb );
00196 
00200   virtual void drawValuesWithStyle ( const TransformBase &,
00201                                      ViewBase & vb );
00202 
00203   static void rotate ( double & lat, double & lon,
00204                        double alpha, double beta, double gamma, 
00205                        bool negative=true );
00206 
00207 };
00208 
00209 } // namespace hippodraw
00210 
00211 #endif // _ContourPointRep_H_

Generated for HippoDraw Class Library by doxygen