00001
00002
00014 #ifndef _ContourPointRep_H_
00015 #define _ContourPointRep_H_
00016
00017 #include "LinePointRep.h"
00018
00019 class BinToColor;
00020
00039 class MDL_HIPPOPLOT_API ContourPointRep : public LinePointRep
00040 {
00041
00042 private:
00043
00045 BinToColor * m_bin_to_color;
00046
00048 std::vector< Color > m_colorvec;
00049
00051 int m_numContours;
00052
00054 double m_maxValue;
00055
00057 double m_minValue;
00058
00060 std::vector < double > m_values;
00061
00064 bool m_usingUserValues;
00065
00066 public:
00067
00069 ContourPointRep();
00070
00072 ContourPointRep ( float size );
00073
00075 ContourPointRep( const ContourPointRep & point_rep );
00076
00078 ~ContourPointRep();
00079
00082 virtual RepBase * clone();
00083
00084 virtual const BinToColor * getValueTransform ( ) const;
00085 virtual void setValueTransform ( BinToColor * );
00086 virtual void drawProjectedValues ( const DataSource * ntuple,
00087 TransformBase * transform,
00088 ViewBase * view );
00089
00090 void drawContourTicks ( const TransformBase &,
00091 ViewBase &,
00092 const std::vector < double > & );
00093
00095 bool getUsingUserValues () const;
00096
00098 void setUsingUserValues ( bool flag );
00099
00101 void setNumContours ( int i );
00102
00104 int getNumContours () const;
00105
00107 void setContourValues ( std::vector < double > & values,
00108 ProjectorBase * proj );
00109
00110 private:
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00150 void createContours ( const DataSource * ntuple,
00151 const TransformBase * transform );
00152
00155 double getContour ( int i, const TransformBase * transform );
00156
00159 double intersect ( int p1, int p2, double * h, double * xh );
00160
00163 void setMinMax ( const DataSource * );
00164
00167 void setContourVector ( const TransformBase * transform );
00168
00171 void init ();
00172
00173 private:
00174
00175 virtual void endPlot( const TransformBase &,
00176 ViewBase & vb,
00177 const Range & range );
00178
00179 };
00180
00181 #endif // _ContourPointRep_H_