MeVisLabToolboxReference
|
00001 // **InsertLicense** code 00002 //---------------------------------------------------------------------------------- 00004 00011 #ifndef __WEMTrianglePatch_H 00012 #define __WEMTrianglePatch_H 00013 00014 #include "WEMPatch.h" 00015 #include "WEMTriangle.h" 00016 #include "WEMIndexedFace.h" 00017 00018 00019 ML_START_NAMESPACE 00020 00022 00024 class MLWEM_EXPORT WEMTrianglePatch : public WEMPatch 00025 { 00026 public: 00028 WEMTrianglePatch(unsigned int bs = 8192); 00031 WEMTrianglePatch(WEM* wem, unsigned int bs = 8192); 00033 WEMTrianglePatch(const WEMTrianglePatch &wemPatch); 00035 virtual ~WEMTrianglePatch(); 00037 virtual void dispose(); 00038 00040 virtual inline PatchTypes getPatchType() const { return WEM_PATCH_TRIANGLES; } 00041 00043 00045 virtual inline unsigned int getNumFaces() const { return _triangles->num(); } 00047 inline WEMIndexVector<WEMTriangle>* getFaces() { return _triangles; } 00049 inline const WEMIndexVector<WEMTriangle>* getFaces() const { return const_cast<WEMTrianglePatch*>(this)->getFaces(); } 00050 00052 00054 virtual inline WEMFace* getFaceAt(unsigned int index) { return _triangles->at(index); } 00056 virtual inline const WEMFace* getFaceAt(unsigned int index) const { return const_cast<WEMTrianglePatch*>(this)->getFaceAt(index); } 00058 inline WEMTriangle* getTriangleAt(unsigned int index) { return _triangles->at(index); } 00060 inline const WEMTriangle* getTriangleAt(unsigned int index) const { return const_cast<WEMTrianglePatch*>(this)->getTriangleAt(index); } 00062 virtual WEMFace* addFace(); 00064 WEMTriangle* addTriangle(); 00066 void delTriangle(WEMTriangle* triangle); 00067 00069 00071 void removeNodeFromPatch(WEMNode* node); 00072 00074 00076 void deleteNodesWithValenceThree(); 00078 bool deleteNodeWithValenceThree(WEMNode *node); 00080 void deleteTetrahedron(WEMNode *node); 00081 00083 00085 void closeBoundaries(TriangulationModes triangulationMode); 00086 00088 00090 void convertIndexedFace(WEMIndexedFace* indexedFace, TriangulationModes triangulationMode); 00091 00092 private: 00093 00095 void _initMembers(unsigned int bs); 00097 WEMIndexVector<WEMTriangle>* _triangles; 00098 00099 }; 00100 00102 00103 ML_END_NAMESPACE 00104 00105 #endif // __WEM_H