00001 #ifndef CMESH_H
00002 #define CMESH_H
00003
00004
00005 #include <MDSTk/Base/mdsSetup.h>
00006 #include <MDSTk/Math/mdsMatrix.h>
00007 #include <MDSTk/Math/mdsVector.h>
00008 #include <MDSTk/Math/mdsMatrixFunctions.h>
00009
00010 #include <features/CVertexInfo.h>
00011
00013 typedef std::vector< vctl::MCTri* > tTriPtrList;
00014
00016 typedef std::vector< vctl::MCVertex* > tVertPtrList;
00017
00018
00023 class CSmoothingMesh : public mds::base::CObject, public vctl::MCTriS
00024 {
00025 public :
00026
00028 MDS_SHAREDPTR(CSmoothingMesh);
00029
00030 protected :
00031
00033 std::string sMeshName;
00034
00036 std::string sMeshPath;
00037
00038 public :
00039
00041 CSmoothingMesh();
00042
00044 virtual ~CSmoothingMesh();
00045
00047 bool loadFile( const std::string & name );
00048
00050 bool saveFile( const std::string & name );
00051
00053 bool disposeVertexInfo();
00054
00056 static bool getNeighbourTri( vctl::MCVertex * actual_vertex, tTriPtrList & neighbour_tri, int neighbour_layers );
00057
00059 static bool getNeighbourVert( vctl::MCVertex * actual_vertex, tVertPtrList & neighbour_vertex, int neighbour_layers );
00060
00062 double getVolume();
00063
00065 vctl::MCVector3D getNormal( vctl::MCVertex * vert );
00066
00068 void getNormal( vctl::MCVertex * actual_vertex, vctl::MCVector3D * new_normal );
00069
00071 void removeVerticesNormals();
00072
00074 void precomputeVerticesNormals();
00075
00076 };
00077
00078 #endif // CMESH_H