MeVisLabToolboxReference
|
00001 // **InsertLicense** code 00002 //---------------------------------------------------------------------------------- 00004 00011 #ifndef __WEMFaceCut_H 00012 #define __WEMFaceCut_H 00013 00014 #include "WEMTools/WEMToolsIncludes.h" 00015 00016 00017 ML_START_NAMESPACE 00018 00020 00021 const int WEMFACECUT_SINGLE_PART = 0; 00022 const int WEMFACECUT_SINGLE_INTERMEDIATE = 1; 00023 const int WEMFACECUT_MULTI_INTERMEDIATE = 2; 00024 const int WEMFACECUT_SAME_EDGE = 3; 00025 const int WEMFACECUT_STAB = 4; 00026 00028 00030 class MLWEM_EXPORT WEMFaceCut 00031 { 00032 public: 00033 00035 WEMFaceCut(); 00037 ~WEMFaceCut(); 00039 void clear(); 00040 00042 inline int getType() const { return _type; } 00044 inline Vector3 getEntryPosition() const { return _entryPosition; } 00046 inline Vector3 getExitPosition() const { return _exitPosition; } 00048 inline int getEntryEdgeIndex() const { return _entryEdgeIndex; } 00050 inline int getExitEdgeIndex() const { return _exitEdgeIndex; } 00052 inline int getEntryFaceIndex() const { return _entryFaceIndex; } 00054 inline int getExitFaceIndex() const { return _exitFaceIndex; } 00056 inline bool isTraversed() const { return _traversed; } 00058 inline bool isValid() const { return _valid; } 00059 00061 bool isContinuable(int edgeIndex, int degenerateEdgeIndex) const; 00063 bool isContinuable(Vector3 position) const; 00065 bool isStabClosed(Vector3 position) const; 00066 00068 inline void setType(int type) { _type = type; } 00070 void checkSameEdge(); 00072 void setEntry(Vector3 position, int edgeIndex, int faceIndex); 00074 void setExit(Vector3 position, int edgeIndex, int faceIndex); 00076 void addIntermediatePoint(Vector3 position, int entryNumber, int degenerateEntryNumber); 00078 inline void setTraversed(bool traversed) { _traversed = traversed; } 00080 inline void setValid(bool valid) { _valid = valid; } 00081 00083 std::vector<Vector3> intermediatePoints; 00085 std::vector<int> intermediateEdgeEntryNumbers; 00087 std::vector<int> intermediateDegenerateEdgeEntryNumbers; 00088 00089 private: 00090 00092 int _type; 00094 int _entryEdgeIndex; 00096 int _exitEdgeIndex; 00098 Vector3 _entryPosition; 00100 Vector3 _exitPosition; 00102 int _entryFaceIndex; 00104 int _exitFaceIndex; 00106 bool _traversed; 00108 bool _valid; 00109 }; 00110 00112 00113 ML_END_NAMESPACE 00114 00115 #endif // __WEMFaceCut_H