22 #include "ITKQuadEdgeMeshExport.h"
30 #define itkQEDebugMacro(x) \
32 std::ostringstream itkmsg; \
33 itkmsg << "Debug: In " __FILE__ ", line " << __LINE__ << "\n" \
34 << " (" << this << "): " x \
36 OutputWindowDisplayDebugText( itkmsg.str().c_str() ); \
38 #define itkQEWarningMacro(x) \
40 std::ostringstream itkmsg; \
41 itkmsg << "WARNING: In " __FILE__ ", line " << __LINE__ << "\n" \
42 << " (" << this << "): " x \
44 OutputWindowDisplayWarningText( itkmsg.str().c_str() ); \
57 #define itkQEAccessorsMacro(st, pt, dt) \
60 return ( dynamic_cast< pt * >( this->st::GetOnext() ) ); \
65 return ( dynamic_cast< dt * >( this->st::GetRot() ) ); \
70 return ( dynamic_cast< pt * >( this->st::GetSym() ) ); \
75 return ( dynamic_cast< pt * >( this->st::GetLnext() ) ); \
80 return ( dynamic_cast< pt * >( this->st::GetRnext() ) ); \
85 return ( dynamic_cast< pt * >( this->st::GetDnext() ) ); \
90 return ( dynamic_cast< pt * >( this->st::GetOprev() ) ); \
95 return ( dynamic_cast< pt * >( this->st::GetLprev() ) ); \
100 return ( dynamic_cast< pt * >( this->st::GetRprev() ) ); \
105 return ( dynamic_cast< pt * >( this->st::GetDprev() ) ); \
110 return ( dynamic_cast< dt * >( this->st::GetInvRot() ) ); \
115 return ( dynamic_cast< pt * >( this->st::GetInvOnext() ) ); \
120 return ( dynamic_cast< pt * >( this->st::GetInvLnext() ) ); \
125 return ( dynamic_cast< pt * >( this->st::GetInvRnext() ) ); \
130 return ( dynamic_cast< pt * >( this->st::GetInvDnext() ) ); \
132 const pt *GetOnext() const \
134 return ( dynamic_cast< const pt * >( this->st::GetOnext() ) ); \
137 const dt *GetRot() const \
139 return ( dynamic_cast< const dt * >( this->st::GetRot() ) ); \
142 const pt *GetSym() const \
144 return ( dynamic_cast< const pt * >( this->st::GetSym() ) ); \
147 const pt *GetLnext() const \
149 return ( dynamic_cast< const pt * >( this->st::GetLnext() ) ); \
152 const pt *GetRnext() const \
154 return ( dynamic_cast< const pt * >( this->st::GetRnext() ) ); \
157 const pt *GetDnext() const \
159 return ( dynamic_cast< const pt * >( this->st::GetDnext() ) ); \
162 const pt *GetOprev() const \
164 return ( dynamic_cast< const pt * >( this->st::GetOprev() ) ); \
167 const pt *GetLprev() const \
169 return ( dynamic_cast< const pt * >( this->st::GetLprev() ) ); \
172 const pt *GetRprev() const \
174 return ( dynamic_cast< const pt * >( this->st::GetRprev() ) ); \
177 const pt *GetDprev() const \
179 return ( dynamic_cast< const pt * >( this->st::GetDprev() ) ); \
182 const dt *GetInvRot() const \
184 return ( dynamic_cast< const dt * >( this->st::GetInvRot() ) ); \
187 const pt *GetInvOnext() const \
189 return ( dynamic_cast< const pt * >( this->st::GetInvOnext() ) ); \
192 const pt *GetInvLnext() const \
194 return ( dynamic_cast< const pt * >( this->st::GetInvLnext() ) ); \
197 const pt *GetInvRnext() const \
199 return ( dynamic_cast< const pt * >( this->st::GetInvRnext() ) ); \
202 const pt *GetInvDnext() const \
204 return ( dynamic_cast< const pt * >( this->st::GetInvDnext() ) ); \
294 Self *aNext = this->GetOnext();
302 this->SetOnext(bNext);
316 return ( this->m_Rot->m_Rot );
318 return ( this->m_Rot );
326 return ( this->m_Rot->m_Rot );
328 return ( this->m_Rot );
335 const Self * GetLnext()
const;
342 const Self * GetRnext()
const;
349 const Self * GetDnext()
const;
355 const Self * GetOprev()
const;
362 const Self * GetLprev()
const;
369 const Self * GetRprev()
const;
376 const Self * GetDprev()
const;
382 return ( this->GetRot()->GetRot()->GetRot() );
384 Self *p1 = this->GetRot();
385 if ( !p1 ) {
return nullptr; }
387 if ( !p2 ) {
return nullptr; }
389 if ( !p3 ) {
return nullptr; }
402 return ( this->GetRot()->GetRot()->GetRot() );
404 const Self *p1 = this->GetRot();
405 if ( !p1 ) {
return nullptr; }
407 if ( !p2 ) {
return nullptr; }
409 if ( !p3 ) {
return nullptr; }
420 inline bool IsHalfEdge()
const {
return ( ( m_Onext ==
this ) || ( m_Rot ==
nullptr ) ); }
421 inline bool IsIsolated()
const {
return (
this == this->GetOnext() ); }
422 bool IsEdgeInOnextRing(Self *testEdge)
const;
425 bool IsLnextGivenSizeCyclic(
const int size)
const;
427 unsigned int GetOrder()
const;
const Self * GetInvOnext() const
const Self * GetSym() const
const Self * GetOnext() const
Base class for the implementation of a quad-edge data structure as proposed in "Guibas and Stolfi 198...
const Self * GetInvRnext() const
void SetOnext(Self *onext)
Non const iterator for QuadMesh.
#define itkQEDefineIteratorMethodsMacro(Op)
const Self * GetRot() const
const Self * GetInvRot() const
const Self * GetInvLnext() const
Const iterator for QuadEdgeMesh.
void Splice(Self *b)
Basic quad-edge topological method.
const Self * GetInvDnext() const