Changeset 2542 for branches/blt4/packages/vizservers/vtkvis/RpVtkDataSet.h
- Timestamp:
- Sep 21, 2011 2:27:44 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/blt4/packages/vizservers/vtkvis/RpVtkDataSet.h
r2409 r2542 12 12 #include <vtkDataSet.h> 13 13 #include <vtkDataSetReader.h> 14 #include <vtkProp.h> 15 #include <vtkActor.h> 16 #include <vtkOutlineFilter.h> 17 #include <vtkPolyDataMapper.h> 14 18 15 19 #include <string> … … 24 28 class DataSet { 25 29 public: 30 enum PrincipalPlane { 31 PLANE_XY, 32 PLANE_ZY, 33 PLANE_XZ 34 }; 26 35 DataSet(const std::string& name); 27 36 virtual ~DataSet(); … … 37 46 vtkDataSet *copyData(vtkDataSet *ds); 38 47 39 bool is2D() const; 48 bool isXY() const; 49 50 int numDimensions() const; 51 52 bool is2D(PrincipalPlane *plane = NULL, double *offset = NULL) const; 53 54 PrincipalPlane principalPlane() const; 40 55 41 56 const std::string& getName() const; … … 47 62 bool setActiveScalars(const char *name); 48 63 64 const char *getActiveScalarsName(); 65 49 66 bool setActiveVectors(const char *name); 50 67 51 void getDataRange(double minmax[2]) const;68 const char *getActiveVectorsName(); 52 69 53 void get DataRange(double minmax[2], const char *fieldName) const;70 void getScalarRange(double minmax[2]) const; 54 71 55 void get VectorMagnitudeRange(double minmax[2]) const;72 void getDataRange(double minmax[2], const char *fieldName, int component = -1) const; 56 73 57 void getVector ComponentRange(double minmax[2], int component) const;74 void getVectorRange(double minmax[2], int component = -1) const; 58 75 59 76 void getBounds(double bounds[6]) const; 60 77 61 double getDataValue(double x, double y, double z) const; 78 void getCellSizeRange(double minmax[2], double *average); 79 80 bool getScalarValue(double x, double y, double z, double *value) const; 81 82 bool getVectorValue(double x, double y, double z, double vector[3]) const; 83 84 void setOpacity(double opacity); 85 86 /** 87 * \brief Get the opacity setting for the DataSet 88 * 89 * This method is used for record-keeping. The renderer controls 90 * the visibility of related graphics objects. 91 */ 92 inline double getOpacity() 93 { 94 return _opacity; 95 } 62 96 63 97 void setVisibility(bool state); … … 65 99 bool getVisibility() const; 66 100 101 void showOutline(bool state); 102 103 void setOutlineColor(float color[3]); 104 105 /** 106 * \brief Return the VTK prop object for the outline 107 */ 108 inline vtkProp *getProp() 109 { 110 return _prop; 111 } 112 67 113 private: 68 114 DataSet(); 115 116 void setDefaultArrays(); 117 void print() const; 118 119 void initProp(); 69 120 70 121 std::string _name; 71 122 vtkSmartPointer<vtkDataSet> _dataSet; 72 123 bool _visible; 124 double _opacity; 125 double _cellSizeRange[2]; 126 double _cellSizeAverage; 127 vtkSmartPointer<vtkOutlineFilter> _outlineFilter; 128 vtkSmartPointer<vtkActor> _prop; 129 vtkSmartPointer<vtkPolyDataMapper> _outlineMapper; 73 130 }; 74 131
Note: See TracChangeset
for help on using the changeset viewer.