MeVisLabToolboxReference
MeVisLab/Standard/Sources/ML/MLWEM/WEMTools/WEMCutOp/WEMPartialFaceCut.h
Go to the documentation of this file.
00001 // **InsertLicense** code
00002 //----------------------------------------------------------------------------------
00004 
00011 #ifndef __WEMPartialFaceCut_H
00012 #define __WEMPartialFaceCut_H
00013 
00014 #include "WEMTools/WEMToolsIncludes.h"
00015 
00016 ML_START_NAMESPACE
00017 
00019 
00020 const int WEMPARTIALFACECUT_CLOSED     = 0; 
00021 const int WEMPARTIALFACECUT_HALF_OPEN  = 1; 
00022 const int WEMPARTIALFACECUT_OPEN       = 2; 
00023 
00025 
00027 class MLWEM_EXPORT WEMPartialFaceCut 
00028 {
00029 public:
00031   WEMPartialFaceCut();
00033   WEMPartialFaceCut(int type, int cuttingFace);
00035   WEMPartialFaceCut(int type, int cuttingFace,
00036                     Vector3 entryPosition, int entryEdge,
00037                     Vector3 exitPosition, int exitEdge);
00039   ~WEMPartialFaceCut();
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 getEntryEdge() const { return _entryEdge; }
00050   inline int getExitEdge() const { return _exitEdge; }
00052   inline int getCuttingFace() const { return _cuttingFace; }
00054   inline bool isDegenerate() const { return ((_degenerateEntryEdge != -1) || (_degenerateExitEdge != -1)); }
00056   inline int getDegenerateEntryEdge() const { return _degenerateEntryEdge; }
00058   inline int getDegenerateExitEdge() const { return _degenerateExitEdge; }
00060   void setLocalEntry(Vector3 entryPosition, int entryEdge, WEMFace *face);
00062   void setRemoteEntry(Vector3 entryPosition, int entryEdge, WEMFace *face);
00064   void setLocalExit(Vector3 exitPosition, int exitEdge, WEMFace *face);
00066   void setRemoteExit(Vector3 exitPosition, int exitEdge, WEMFace *face);
00067 
00068 private:
00069 
00071   int _type;
00073   Vector3 _entryPosition;
00075   Vector3 _exitPosition;
00077   int _entryEdge;
00079   int _exitEdge;
00081   int _degenerateEntryEdge;
00083   int _degenerateExitEdge;
00085   int _cuttingFace;
00086 
00088   int _getDegenerateIndex(WEMFace *face, Vector3 position);
00089 };
00090 
00092 
00093 ML_END_NAMESPACE
00094 
00095 #endif // __WEMPartialFaceCut_H