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_POLARGRID2D_
00025 #define _PB_POLARGRID2D_
00026
00027 #include <MeshViz/3Ddata/PbGrid2D.h>
00028 class PiContouring;
00029
00030
00049 class PbPolarGrid2D : public PbGrid2D {
00050
00051
00052 public:
00053
00057 PbPolarGrid2D(SbBool isDataDuplicate=TRUE) ;
00058
00062 PbPolarGrid2D(const PbPolarGrid2D &mesh);
00063
00068 PbPolarGrid2D(int num_r, int num_t, const float *r, const float *t, SbBool isDataDuplicate=TRUE) ;
00069
00074 PbPolarGrid2D(int num_r, int num_t, const float *r, const float *t, const float *z, SbBool isDataDuplicate=TRUE) ;
00075
00079 ~PbPolarGrid2D() ;
00080
00084 PbPolarGrid2D& operator=(const PbPolarGrid2D &mesh) ;
00085
00089 friend int operator ==(const PbPolarGrid2D &m1, const PbPolarGrid2D &m2);
00090
00094 friend int operator !=(const PbPolarGrid2D &m1, const PbPolarGrid2D &m2)
00095 { return !(m1 == m2); }
00096
00100 virtual const PbCell *getCell(int cell_index) const;
00101
00105 virtual SbVec3f getNodeCoord(int nod_index) const;
00106
00110 virtual SbVec3f getNodeCoord(int i, int j) const;
00111
00112
00113
00114
00115 private:
00116
00117 void meshLines(PoMeshLines *_PoMeshLines) const;
00118 void meshFilled(PoMeshFilled *_PoMeshFilled) const;
00119 void meshContouring(PiContouring *_PiContouring, const float *z) const;
00120 void mesh2DVec(PoMesh2DVec *mesh_vec) const ;
00121
00122 void getNodesCoord(const float *z, SoMFVec3f &vertices) const;
00123
00124 void print(FILE *fp) const;
00125
00126 private:
00127 void constructXYGeometry(const float *rn, const float *tn, SbBool is_data_duplicate);
00128 void setXYGeometry(int num_r, int num_t, const float *x, const float *y);
00129 void getXYGeometry(const float* &x, const float* &y) const;
00130
00131 private:
00132 float *r, *t;
00133
00134 void updateBoundingBox() const;
00135 void copy(const PbPolarGrid2D &mesh) ;
00136 void destroy();
00137 } ;
00138
00139
00140
00141 #endif
00142
00143
00144
00145
00146
00147
00148
00149