MeVisLab Toolbox Reference
WEMPartialFaceCut.h
Go to the documentation of this file.
1 /*************************************************************************************
2 **
3 ** Copyright 2007, MeVis Medical Solutions AG
4 **
5 ** The user may use this file in accordance with the license agreement provided with
6 ** the Software or, alternatively, in accordance with the terms contained in a
7 ** written agreement between the user and MeVis Medical Solutions AG.
8 **
9 ** For further information use the contact form at https://www.mevislab.de/contact
10 **
11 **************************************************************************************/
12 
13 #pragma once
14 
16 
17 ML_START_NAMESPACE
18 
20 
21 const int WEMPARTIALFACECUT_CLOSED = 0;
23 const int WEMPARTIALFACECUT_OPEN = 2;
24 
26 
29 {
30 public:
34  WEMPartialFaceCut(int type, int cuttingFace);
36  WEMPartialFaceCut(int type, int cuttingFace,
37  Vector3 entryPosition, int entryEdge,
38  Vector3 exitPosition, int exitEdge);
41 
43  inline int getType() const { return _type; }
45  inline Vector3 getEntryPosition() const { return _entryPosition; }
47  inline Vector3 getExitPosition() const { return _exitPosition; }
49  inline int getEntryEdge() const { return _entryEdge; }
51  inline int getExitEdge() const { return _exitEdge; }
53  inline int getCuttingFace() const { return _cuttingFace; }
55  inline bool isDegenerate() const { return ((_degenerateEntryEdge != -1) || (_degenerateExitEdge != -1)); }
57  inline int getDegenerateEntryEdge() const { return _degenerateEntryEdge; }
59  inline int getDegenerateExitEdge() const { return _degenerateExitEdge; }
61  void setLocalEntry(Vector3 entryPosition, int entryEdge, WEMFace *face);
63  void setRemoteEntry(Vector3 entryPosition, int entryEdge, WEMFace *face);
65  void setLocalExit(Vector3 exitPosition, int exitEdge, WEMFace *face);
67  void setRemoteExit(Vector3 exitPosition, int exitEdge, WEMFace *face);
68 
69 private:
70 
72  int _type;
74  Vector3 _entryPosition;
76  Vector3 _exitPosition;
78  int _entryEdge;
80  int _exitEdge;
82  int _degenerateEntryEdge;
84  int _degenerateExitEdge;
86  int _cuttingFace;
87 
89  int _getDegenerateIndex(WEMFace *face, Vector3 position);
90 };
91 
93 
94 ML_END_NAMESPACE
#define MLWEM_EXPORT
Definition: MLWEMSystem.h:18
Defines the mesh component: face.
Definition: WEMFace.h:30
Class for managing partial face cuts.
Vector3 getEntryPosition() const
Returns the entry position.
int getType() const
Returns the type.
void setRemoteEntry(Vector3 entryPosition, int entryEdge, WEMFace *face)
Sets the entry and checks whether it is degenerate. Remote: edge entry numbers are used.
WEMPartialFaceCut(int type, int cuttingFace)
Create new partial face cut with given parameters.
int getCuttingFace() const
Returns the entry face.
int getExitEdge() const
Returns the exit edge.
int getEntryEdge() const
Returns the entry edge.
void setLocalEntry(Vector3 entryPosition, int entryEdge, WEMFace *face)
Sets the entry and checks whether it is degenerate. Local: local indices are used.
WEMPartialFaceCut(int type, int cuttingFace, Vector3 entryPosition, int entryEdge, Vector3 exitPosition, int exitEdge)
Create new partial face cut with given parameters.
void setRemoteExit(Vector3 exitPosition, int exitEdge, WEMFace *face)
Sets the exit and checks whether it is degenerate. Remote: edge entry numbers are used.
Vector3 getExitPosition() const
Returns the exit position.
void setLocalExit(Vector3 exitPosition, int exitEdge, WEMFace *face)
Sets the exit and checks whether it is degenerate. Local: local indices are used.
bool isDegenerate() const
Returns whether this partial face cut is degenerated.
int getDegenerateExitEdge() const
Returns the degenerate exit edge.
int getDegenerateEntryEdge() const
Returns the degenerate entry edge.
WEMPartialFaceCut()
Standard constructor.
~WEMPartialFaceCut()
Standard destructor.
const int WEMPARTIALFACECUT_CLOSED
Local definition: closed cut.
const int WEMPARTIALFACECUT_HALF_OPEN
Local definition: half open cut.
const int WEMPARTIALFACECUT_OPEN
Local definition: open cut.