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
00096 virtual int evaluateSkinFacesNum() const;
00097
00098 PiMeshSkin* getSkinTopology(const PoCellFilter*, int valuesIdFilter, uint32_t &wasUpToDate) const;
00099
00100 private:
00101
00102 const PbCell *findContainingCellProtected(const SbVec3f &point,
00103 float tolerance,
00104 SbVec3f &pcoord,
00105 PbArrayOfInt &test_cell) const;
00106
00107 mutable SbBool m_skinIsUpdated;
00108 mutable PiCellOctree *m_cellOctree;
00109 mutable SbBool m_cellOctreeIsUpdated;
00110
00111 private:
00112
00113 void copy(const PbMesh3D &mesh);
00114 void destroy();
00115 mutable PiMeshSkinCache* m_skinTopologyCache;
00116 };
00117
00118
00119
00120 #endif
00121
00122