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_MESH3D_
00025 #define _PB_MESH3D_
00026
00027 #include <MeshViz/3Ddata/PbMesh.h>
00028
00029 class PoMeshSkin;
00030 class PoMeshCrossSection;
00031 class PoMeshCrossContour;
00032 class PoMeshSkeleton;
00033 class PoMesh3D;
00034 class PoMesh3DVec;
00035 class PiCellOctree;
00036 class PoCellFilter;
00037 class PiMeshSkinCache;
00038 class PiMeshSkin;
00039
00051 class PbMesh3D : public PbMesh {
00052
00053 public:
00054
00058 virtual float getVolume() const;
00059
00063 virtual float getArea() const
00064 { return 0.0;}
00065
00066 private:
00067
00068 PbMesh3D(SbBool is_data_duplicate=TRUE);
00069 PbMesh3D(const PbMesh3D &mesh);
00070 virtual ~PbMesh3D();
00071
00072
00073 private:
00074
00075
00076 PbMesh3D &operator=(const PbMesh3D &mesh);
00077
00078 virtual void meshSkin(PoMeshSkin *_PoMeshSkin) const;
00079 virtual void meshLevelSurfShapeIndices(PoMesh3D *_PoMesh3D, int surfOrientation=1,
00080 const float *per_cell_value=NULL) const;
00081 virtual void meshCrossSection(PoMeshCrossSection *_PoMeshCrossSection) const;
00082 virtual void meshCrossContour(PoMeshCrossContour *_PoMeshCrossContour) const;
00083 virtual void meshSkeleton(PoMeshSkeleton *skeleton, const float *nod_values,
00084 float *x_cont, float *y_cont,float *z_cont) const;
00085 virtual void mesh3DVec(PoMesh3DVec *_PoMesh3DVec) const;
00086
00087 virtual SbBool isCrossSectionOptimal() const;
00088
00089 void print(FILE *fp) const;
00090 void printInfo() const {print(stdout);};
00091
00097 virtual int evaluateSkinFacesNum() const;
00098
00099 PiMeshSkin* getSkinTopology(const PoCellFilter*, int valuesIdFilter, uint32_t &wasUpToDate) const;
00100
00101 private:
00102
00103 const PbCell *findContainingCellProtected(const SbVec3f &point,
00104 float tolerance,
00105 SbVec3f &pcoord,
00106 PbArrayOfInt &test_cell) const;
00107
00108 mutable SbBool m_skinIsUpdated;
00109 mutable PiCellOctree *m_cellOctree;
00110 mutable SbBool m_cellOctreeIsUpdated;
00111
00112 private:
00113
00114 void copy(const PbMesh3D &mesh);
00115 void destroy();
00116 mutable PiMeshSkinCache* m_skinTopologyCache;
00117 };
00118
00119
00120
00121 #endif
00122
00123