00001
00002
00014 #ifndef _ContourPointRep_H_
00015 #define _ContourPointRep_H_
00016
00017 #include "LinePointRep.h"
00018
00019 namespace hippodraw {
00020
00021 class BinToColor;
00022
00047 class MDL_HIPPOPLOT_API ContourPointRep : public LinePointRep
00048 {
00049
00050 private:
00051
00053 BinToColor * m_bin_to_color;
00054
00056 std::vector< Color > m_colorvec;
00057
00061 std::vector < Line::Style > m_stylevec;
00062
00064 int m_numContours;
00065
00067 double m_maxValue;
00068
00070 double m_minValue;
00071
00073 double m_minPos;
00074
00076 std::vector < double > m_values;
00077
00080 bool m_usingUserValues;
00081
00082
00083 public:
00084
00086 ContourPointRep();
00087
00089 ContourPointRep ( float size );
00090
00092 ContourPointRep( const ContourPointRep & point_rep );
00093
00095 ~ContourPointRep();
00096
00099 virtual RepBase * clone();
00100
00101 virtual const BinToColor * getValueTransform ( ) const;
00102 virtual void setValueTransform ( BinToColor * );
00103 virtual void drawProjectedValues ( const DataSource * ntuple,
00104 TransformBase * transform,
00105 ViewBase * view );
00106
00107 void drawContourTicks ( const TransformBase &,
00108 ViewBase &,
00109 const std::vector < double > & );
00110
00112 bool getUsingUserValues () const;
00113
00115 void setUsingUserValues ( bool flag );
00116
00118 void setNumContours ( int i );
00119
00121 int getNumContours () const;
00122
00124 void setContourValues ( std::vector < double > & values,
00125 ProjectorBase * proj );
00126
00127 private:
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
00156
00157
00167 void createContours ( const DataSource * ntuple,
00168 const TransformBase * transform );
00169
00172 double getContour ( int i, const TransformBase * transform );
00173
00176 double intersect ( int p1, int p2, double * h, double * xh );
00177
00180 void setMinMax ( const DataSource * );
00181
00184 void setContourVector ( const TransformBase * transform );
00185
00188 void init ();
00189
00190
00191
00192 private:
00193
00196 virtual void drawValues ( const TransformBase &,
00197 ViewBase & vb );
00198
00202 virtual void drawValuesWithStyle ( const TransformBase &,
00203 ViewBase & vb );
00204
00205 static void rotate ( double & lat, double & lon,
00206 double alpha, double beta, double gamma,
00207 bool negative=true );
00208
00209 };
00210
00211 }
00212
00213 #endif // _ContourPointRep_H_