00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 #ifndef  _PB_ISOVALUES_LIST_
00025 #define  _PB_ISOVALUES_LIST_
00026 
00027 #include <MeshViz/graph/PbBase.h>
00028 
00042 class  PbIsovaluesList : public PbBase {
00043 
00044 
00045  public:
00046 
00050   PbIsovaluesList() ;
00051 
00055   PbIsovaluesList(const PbIsovaluesList &isovalList) ;
00056 
00060   PbIsovaluesList(float min, float max, int numValues) ;
00061 
00065   ~PbIsovaluesList() ;
00066 
00070   PbIsovaluesList& operator=(const PbIsovaluesList &isovalList) ;
00071 
00075   int operator==(const PbIsovaluesList &isoList) ;
00076 
00080   int operator!=(const PbIsovaluesList &isoList)
00081   { return !(*this == isoList) ; }
00082 
00086   void setIrregularIsoList(int numValues, const float *values) ;
00087 
00093   void setRegularIsoList(int numFloats, const float *values, int numValues) ;
00094 
00100   void setRegularIsoList(int numFloats, const float *values) ;
00101 
00106   void setRegularIsoList(int numValues, float firstValue, float step) ;
00107 
00112   void setRegularIsoList(float min, float max, int numValues) ;
00113 
00118   void setRegularIsoList(float min, float max) ;
00119 
00124   void setRegularIsoList(int numValues) ;
00125 
00132   const float *getIsoList(int &numValues, float &min, float &max, float &step,
00133                           SbBool &isRegularIsoList) const ;
00134 
00135   
00136 
00137 
00138  private:
00139 
00140   void isoListDependsOnRep(SbBool flag)
00141     { m_isDependOnRep = flag ; }
00142   
00143   
00144   
00145   
00146   
00147   
00148   SbBool isIsoListDependsOnRep() const
00149     { return m_isDependOnRep ; }
00150   
00151   
00152 
00153   float getLowerIsovalue(float value) const ;
00154   float getUpperIsovalue(float value) const ;
00155   int   getIndex(float value) const ;
00156 
00157  private:
00158   
00159   void copy(const PbIsovaluesList &isovalList, SbBool isConstructorPerCopy) ;
00160 
00161   
00162   void print() ;
00163 
00164   
00165   void allocIsovalList() ;
00166 
00167   
00168   
00169   void homogIsovalList(float min, float max, int numValues) ;
00170   
00171   float  m_minValue, m_maxValue, *m_isovalList, m_stepIsoValues,
00172     m_deltaIsoMin ; 
00173   int    m_numIsoValues, m_numAllocValues ;
00174   SbBool m_isRegularIsovalList, m_isDependOnRep ;
00175 } ;
00176 
00177 
00178 
00179 #endif 
00180 
00181 
00182 
00183