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  _PO_POINTS_FIELD_BARS_
00025 #define  _PO_POINTS_FIELD_BARS_
00026 
00027 #include <MeshViz/graph/PoGraphMaster.h>
00028 
00029 #include <Inventor/fields/SoSFEnum.h>
00030 #include <Inventor/fields/SoMFFloat.h>
00031 #include <Inventor/fields/SoSFFloat.h>
00032 #include <Inventor/fields/SoMFVec3f.h>
00033 
00034 class PbDataMapping ;
00035 
00070 class  PoPointsFieldBars : public PoGraphMaster {
00071   
00072   SO_KIT_HEADER(PoPointsFieldBars) ;
00073   
00074   
00075   SO_KIT_CATALOG_ENTRY_HEADER(pointsFieldBars)    ;
00076 
00077 
00078  public:
00079 
00080   
00081 
00086   SoMFVec3f point;
00087 
00092   SoMFFloat value ;
00093 
00097   SoSFFloat width ;
00098 
00102   SoSFFloat height ;
00103 
00104   
00105 
00109   PoPointsFieldBars()
00110     { init(TRUE) ; }
00111 
00116   PoPointsFieldBars(int numPoints, const SbVec3f *_point, const float *_value,
00117                     float _width, float _height)
00118     { init(FALSE, numPoints, _point, _value, _width, _height) ; } 
00119 
00123   virtual void rebuild() ;
00124 
00132   void setDataMapping(PbDataMapping *dataMapping) ;
00133 
00137   const PbDataMapping* getDataMapping() const ;
00138 
00139   
00140  private:
00141   static void initClass() ;
00142     static void exitClass() ;
00143 
00144  private:
00145   
00146   
00147   virtual ~PoPointsFieldBars() ;
00148   virtual void   setDefaultOnNonWritingFields() ;
00149   virtual SbBool setUpConnections(SbBool onOff, SbBool doItAlways = FALSE) ;
00150 
00151   
00152   virtual void basicObjectChange(PbBase *basicObj) ;
00153 
00154   
00155   virtual void addElementsAllCaches() ;
00156   virtual void preRebuild() ;
00157   
00158  private:
00159   
00160   void init(SbBool isDefault, int numPoints=0, const SbVec3f *_point=NULL, 
00161             const float *_value=NULL, float _width=1.0, float _height=1.0) ;
00162 
00163 
00164   
00165   PbDataMapping *m_dataMap ;
00166   
00167   
00168   FieldSensorList m_fieldSensorList ;
00169   
00170   
00171   SoFieldList     m_fieldList ;
00172 
00173 } ;
00174 
00175 
00176 
00177 #endif 
00178 
00179