18 #ifndef __itkQuadEdgeMeshBaseIterator_h
19 #define __itkQuadEdgeMeshBaseIterator_h
24 #define itkQEDefineIteratorMethodsMacro(Op) \
25 virtual Iterator Begin##Op() \
27 return Iterator(this, Self::Iterator::Operator##Op, true); \
30 virtual ConstIterator Begin##Op() const \
32 return ConstIterator(this, Self::ConstIterator::Operator##Op, \
36 virtual Iterator End##Op() \
38 return Iterator(this, Self::Iterator::Operator##Op, false); \
41 virtual ConstIterator End##Op() const \
43 return ConstIterator(this, Self::ConstIterator::Operator##Op, \
48 #define itkQEDefineIteratorGeomMethodsMacro(Op) \
49 virtual IteratorGeom BeginGeom##Op() \
51 return IteratorGeom(this, Self::IteratorGeom::Operator##Op, \
55 virtual ConstIteratorGeom BeginGeom##Op() const \
57 return ConstIteratorGeom(this, \
58 Self::ConstIteratorGeom::Operator##Op, true); \
61 virtual IteratorGeom EndGeom##Op() \
63 return IteratorGeom(this, Self::IteratorGeom::Operator##Op, \
67 virtual ConstIteratorGeom EndGeom##Op() const \
69 return ConstIteratorGeom(this, \
70 Self::ConstIteratorGeom::Operator##Op, false); \
81 template<
typename TQuadEdge >
100 OperatorInvOnext = 9,
101 OperatorInvLnext = 10,
102 OperatorInvRnext = 11,
103 OperatorInvDnext = 12
109 int op = OperatorOnext,
111 m_StartEdge(e), m_Iterator(e),
112 m_OpType(op), m_Start(start) {}
120 m_StartEdge = r.m_StartEdge;
121 m_Iterator = r.m_Iterator;
122 m_OpType = r.m_OpType;
136 return ( ( m_StartEdge == r.m_StartEdge )
137 && ( m_Iterator == r.m_Iterator )
138 && ( m_OpType == r.m_OpType )
139 && ( m_Start == r.m_Start ) );
142 bool operator==(
const Self & r)
const
144 return ( ( m_StartEdge == r.m_StartEdge )
145 && ( m_Iterator == r.m_Iterator )
146 && ( m_OpType == r.m_OpType )
147 && ( m_Start == r.m_Start ) );
152 return ( !( this->
operator==(r) ) );
157 return ( !( this->
operator==(r) ) );
165 m_Start = !( m_Iterator == m_StartEdge );
176 m_Start = !( m_Iterator == m_StartEdge );
183 virtual void GoToNext()
188 m_Iterator = m_Iterator->GetOnext();
191 m_Iterator = m_Iterator->GetSym();
194 m_Iterator = m_Iterator->GetLnext();
197 m_Iterator = m_Iterator->GetRnext();
200 m_Iterator = m_Iterator->GetDnext();
203 m_Iterator = m_Iterator->GetOprev();
206 m_Iterator = m_Iterator->GetLprev();
209 m_Iterator = m_Iterator->GetRprev();
212 m_Iterator = m_Iterator->GetDprev();
214 case OperatorInvOnext:
215 m_Iterator = m_Iterator->GetInvOnext();
217 case OperatorInvLnext:
218 m_Iterator = m_Iterator->GetInvLnext();
220 case OperatorInvRnext:
221 m_Iterator = m_Iterator->GetInvRnext();
223 case OperatorInvDnext:
224 m_Iterator = m_Iterator->GetInvDnext();
248 template<
typename TQuadEdge >
262 int op = Superclass::OperatorOnext,
278 template<
typename TGeometricalQuadEdge >
293 int op = Superclass::OperatorOnext,
305 template<
typename TQuadEdge >
320 int op = Superclass::OperatorOnext,
344 template<
typename TGeometricalQuadEdge >
361 int op = Superclass::OperatorOnext,
378 return ( this->m_Iterator->GetOrigin() );