MeVisLab Toolbox Reference
Loading...
Searching...
No Matches
WEMFaceCut.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
18
20
24const int WEMFACECUT_SAME_EDGE = 3;
25const int WEMFACECUT_STAB = 4;
26
28
31{
32public:
38 void clear();
39
41 inline int getType() const
42 {
43 return _type;
44 }
47 {
48 return _entryPosition;
49 }
51 inline Vector3 getExitPosition() const
52 {
53 return _exitPosition;
54 }
56 inline int getEntryEdgeIndex() const
57 {
58 return _entryEdgeIndex;
59 }
61 inline int getExitEdgeIndex() const
62 {
63 return _exitEdgeIndex;
64 }
66 inline int getEntryFaceIndex() const
67 {
68 return _entryFaceIndex;
69 }
71 inline int getExitFaceIndex() const
72 {
73 return _exitFaceIndex;
74 }
76 inline bool isTraversed() const
77 {
78 return _traversed;
79 }
81 inline bool isValid() const
82 {
83 return _valid;
84 }
85
89 bool isContinuable(Vector3 position) const;
91 bool isStabClosed(Vector3 position) const;
92
94 inline void setType(int type)
95 {
96 _type = type;
97 }
101 void setEntry(Vector3 position, int edgeIndex, int faceIndex);
103 void setExit(Vector3 position, int edgeIndex, int faceIndex);
107 inline void setTraversed(bool traversed)
108 {
109 _traversed = traversed;
110 }
112 inline void setValid(bool valid)
113 {
114 _valid = valid;
115 }
116
118 std::vector<Vector3> intermediatePoints;
123
124private:
126 int _type;
128 int _entryEdgeIndex;
130 int _exitEdgeIndex;
132 Vector3 _entryPosition;
134 Vector3 _exitPosition;
136 int _entryFaceIndex;
138 int _exitFaceIndex;
140 bool _traversed;
142 bool _valid;
143};
144
146
#define MLWEM_EXPORT
Definition MLWEMSystem.h:18
Helper class for performing a cutting on a face.
Definition WEMFaceCut.h:31
void clear()
Clears the internal structure.
void setValid(bool valid)
Sets the valid flag.
Definition WEMFaceCut.h:112
Vector3 getExitPosition() const
Returns the exit position.
Definition WEMFaceCut.h:51
void checkSameEdge()
Updates the type to SAME_EDGE if entry and exit edge are the same.
std::vector< Vector3 > intermediatePoints
Intermediate points.
Definition WEMFaceCut.h:118
void setType(int type)
Sets the type.
Definition WEMFaceCut.h:94
Vector3 getEntryPosition() const
Returns the entry position.
Definition WEMFaceCut.h:46
void setTraversed(bool traversed)
Sets the traversed flag.
Definition WEMFaceCut.h:107
bool isValid() const
Returns whether this face cut is valid.
Definition WEMFaceCut.h:81
void setEntry(Vector3 position, int edgeIndex, int faceIndex)
Sets the entry.
std::vector< int > intermediateEdgeEntryNumbers
Intermediate edge entry numbers.
Definition WEMFaceCut.h:120
~WEMFaceCut()
Standard destructor.
WEMFaceCut()
Standard constructor.
int getType() const
Returns the type.
Definition WEMFaceCut.h:41
bool isContinuable(int edgeIndex, int degenerateEdgeIndex) const
Returns whether this face cut can be continued.
int getEntryFaceIndex() const
Returns the entry face index.
Definition WEMFaceCut.h:66
int getEntryEdgeIndex() const
Returns the entry edge index.
Definition WEMFaceCut.h:56
std::vector< int > intermediateDegenerateEdgeEntryNumbers
Intermediate degenerate edge entry numbers.
Definition WEMFaceCut.h:122
bool isStabClosed(Vector3 position) const
Returns whether the stab is closed.
int getExitFaceIndex() const
Returns the exit face index.
Definition WEMFaceCut.h:71
void addIntermediatePoint(Vector3 position, int entryNumber, int degenerateEntryNumber)
Adds a new intermediate point.
bool isContinuable(Vector3 position) const
Returns whether this face cut (stab) can be continued.
int getExitEdgeIndex() const
Returns the exit edge index.
Definition WEMFaceCut.h:61
bool isTraversed() const
Returns whether this face cut is traversed.
Definition WEMFaceCut.h:76
void setExit(Vector3 position, int edgeIndex, int faceIndex)
Sets the exit.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
const int WEMFACECUT_STAB
Local cut definition: stab.
Definition WEMFaceCut.h:25
const int WEMFACECUT_SINGLE_INTERMEDIATE
Local cut definition: single intermediate.
Definition WEMFaceCut.h:22
const int WEMFACECUT_SAME_EDGE
Local cut definition: same edge.
Definition WEMFaceCut.h:24
const int WEMFACECUT_MULTI_INTERMEDIATE
Local cut definition: multi intermediate.
Definition WEMFaceCut.h:23
const int WEMFACECUT_SINGLE_PART
Local cut definition: single part.
Definition WEMFaceCut.h:21