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() ) ); \
288 Self *aNext = this->GetOnext();
296 this->SetOnext(bNext);
310 return ( this->m_Rot->m_Rot );
312 return ( this->m_Rot );
316 inline const Self * GetSym()
const
320 return ( this->m_Rot->m_Rot );
322 return ( this->m_Rot );
329 const Self * GetLnext()
const;
336 const Self * GetRnext()
const;
343 const Self * GetDnext()
const;
349 const Self * GetOprev()
const;
356 const Self * GetLprev()
const;
363 const Self * GetRprev()
const;
370 const Self * GetDprev()
const;
376 return ( this->GetRot()->GetRot()->GetRot() );
378 Self *p1 = this->GetRot();
379 if ( !p1 ) {
return NULL; }
381 if ( !p2 ) {
return NULL; }
383 if ( !p3 ) {
return NULL; }
393 inline const Self * GetInvRot()
const
396 return ( this->GetRot()->GetRot()->GetRot() );
398 const Self *p1 = this->GetRot();
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 ==
NULL ) ); }
415 inline bool IsIsolated()
const {
return (
this == this->GetOnext() ); }
416 bool IsEdgeInOnextRing(Self *testEdge)
const;
419 bool IsLnextGivenSizeCyclic(
const int size)
const;
421 unsigned int GetOrder()
const;