ContourPointRep.h
Go to the documentation of this file.00001
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
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
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 }
00210
00211 #endif // _ContourPointRep_H_