18 #ifndef __itkQuadEdge_h
19 #define __itkQuadEdge_h
29 #define itkQEDebugMacro(x) \
31 std::ostringstream itkmsg; \
32 itkmsg << "Debug: In " __FILE__ ", line " << __LINE__ << "\n" \
33 << " (" << this << "): " x \
35 OutputWindowDisplayDebugText( itkmsg.str().c_str() ); \
37 #define itkQEWarningMacro(x) \
39 std::ostringstream itkmsg; \
40 itkmsg << "WARNING: In " __FILE__ ", line " << __LINE__ << "\n" \
41 << " (" << this << "): " x \
43 OutputWindowDisplayWarningText( itkmsg.str().c_str() ); \
56 #define itkQEAccessorsMacro(st, pt, dt) \
59 return ( dynamic_cast< pt * >( this->st::GetOnext() ) ); \
64 return ( dynamic_cast< dt * >( this->st::GetRot() ) ); \
69 return ( dynamic_cast< pt * >( this->st::GetSym() ) ); \
74 return ( dynamic_cast< pt * >( this->st::GetLnext() ) ); \
79 return ( dynamic_cast< pt * >( this->st::GetRnext() ) ); \
84 return ( dynamic_cast< pt * >( this->st::GetDnext() ) ); \
89 return ( dynamic_cast< pt * >( this->st::GetOprev() ) ); \
94 return ( dynamic_cast< pt * >( this->st::GetLprev() ) ); \
99 return ( dynamic_cast< pt * >( this->st::GetRprev() ) ); \
104 return ( dynamic_cast< pt * >( this->st::GetDprev() ) ); \
109 return ( dynamic_cast< dt * >( this->st::GetInvRot() ) ); \
114 return ( dynamic_cast< pt * >( this->st::GetInvOnext() ) ); \
119 return ( dynamic_cast< pt * >( this->st::GetInvLnext() ) ); \
124 return ( dynamic_cast< pt * >( this->st::GetInvRnext() ) ); \
129 return ( dynamic_cast< pt * >( this->st::GetInvDnext() ) ); \
131 const pt *GetOnext() const \
133 return ( dynamic_cast< const pt * >( this->st::GetOnext() ) ); \
136 const dt *GetRot() const \
138 return ( dynamic_cast< const dt * >( this->st::GetRot() ) ); \
141 const pt *GetSym() const \
143 return ( dynamic_cast< const pt * >( this->st::GetSym() ) ); \
146 const pt *GetLnext() const \
148 return ( dynamic_cast< const pt * >( this->st::GetLnext() ) ); \
151 const pt *GetRnext() const \
153 return ( dynamic_cast< const pt * >( this->st::GetRnext() ) ); \
156 const pt *GetDnext() const \
158 return ( dynamic_cast< const pt * >( this->st::GetDnext() ) ); \
161 const pt *GetOprev() const \
163 return ( dynamic_cast< const pt * >( this->st::GetOprev() ) ); \
166 const pt *GetLprev() const \
168 return ( dynamic_cast< const pt * >( this->st::GetLprev() ) ); \
171 const pt *GetRprev() const \
173 return ( dynamic_cast< const pt * >( this->st::GetRprev() ) ); \
176 const pt *GetDprev() const \
178 return ( dynamic_cast< const pt * >( this->st::GetDprev() ) ); \
181 const dt *GetInvRot() const \
183 return ( dynamic_cast< const dt * >( this->st::GetInvRot() ) ); \
186 const pt *GetInvOnext() const \
188 return ( dynamic_cast< const pt * >( this->st::GetInvOnext() ) ); \
191 const pt *GetInvLnext() const \
193 return ( dynamic_cast< const pt * >( this->st::GetInvLnext() ) ); \
196 const pt *GetInvRnext() const \
198 return ( dynamic_cast< const pt * >( this->st::GetInvRnext() ) ); \
201 const pt *GetInvDnext() const \
203 return ( dynamic_cast< const pt * >( this->st::GetInvDnext() ) ); \
310 return ( this->m_Rot->m_Rot );
312 return ( this->m_Rot );
320 return ( this->m_Rot->m_Rot );
322 return ( this->m_Rot );
379 if ( !p1 ) {
return NULL; }
381 if ( !p2 ) {
return NULL; }
383 if ( !p3 ) {
return NULL; }
399 if ( !p1 ) {
return NULL; }
401 if ( !p2 ) {
return NULL; }
403 if ( !p3 ) {
return NULL; }
414 inline bool IsHalfEdge()
const {
return ( ( m_Onext ==
this ) || ( m_Rot == ITK_NULLPTR ) ); }
unsigned int GetOrder() const
const Self * GetInvOnext() const
const Self * GetSym() const
const Self * GetOnext() const
itkQEDefineIteratorMethodsMacro(Onext)
Base class for the implementation of a quad-edge data structure as proposed in "Guibas and Stolfi 198...
const Self * GetInvRnext() const
bool IsLnextGivenSizeCyclic(const int size) const
QuadEdgeMeshIterator< Self > Iterator
void SetOnext(Self *onext)
Non const iterator for QuadMesh.
QuadEdgeMeshConstIterator< Self > ConstIterator
const Self * GetRot() const
const Self * GetInvRot() const
const Self * GetInvLnext() const
bool IsEdgeInOnextRing(Self *testEdge) const
Const iterator for QuadEdgeMesh.
void Splice(Self *b)
Basic quad-edge topological method.
const Self * GetInvDnext() const