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
108 int op = OperatorOnext,
110 m_StartEdge(e), m_Iterator(e),
111 m_OpType(op), m_Start(start) {}
117 m_StartEdge = r.m_StartEdge;
118 m_Iterator = r.m_Iterator;
119 m_OpType = r.m_OpType;
132 return ( ( m_StartEdge == r.m_StartEdge )
133 && ( m_Iterator == r.m_Iterator )
134 && ( m_OpType == r.m_OpType )
135 && ( m_Start == r.m_Start ) );
138 bool operator==(
const Self & r)
const
140 return ( ( m_StartEdge == r.m_StartEdge )
141 && ( m_Iterator == r.m_Iterator )
142 && ( m_OpType == r.m_OpType )
143 && ( m_Start == r.m_Start ) );
148 return ( !( this->
operator==(r) ) );
153 return ( !( this->
operator==(r) ) );
161 m_Start = !( m_Iterator == m_StartEdge );
172 m_Start = !( m_Iterator == m_StartEdge );
179 virtual void GoToNext()
184 m_Iterator = m_Iterator->GetOnext();
187 m_Iterator = m_Iterator->GetSym();
190 m_Iterator = m_Iterator->GetLnext();
193 m_Iterator = m_Iterator->GetRnext();
196 m_Iterator = m_Iterator->GetDnext();
199 m_Iterator = m_Iterator->GetOprev();
202 m_Iterator = m_Iterator->GetLprev();
205 m_Iterator = m_Iterator->GetRprev();
208 m_Iterator = m_Iterator->GetDprev();
210 case OperatorInvOnext:
211 m_Iterator = m_Iterator->GetInvOnext();
213 case OperatorInvLnext:
214 m_Iterator = m_Iterator->GetInvLnext();
216 case OperatorInvRnext:
217 m_Iterator = m_Iterator->GetInvRnext();
219 case OperatorInvDnext:
220 m_Iterator = m_Iterator->GetInvDnext();
244 template<
typename TQuadEdge >
258 int op = Superclass::OperatorOnext,
274 template<
typename TGeometricalQuadEdge >
288 int op = Superclass::OperatorOnext,
301 template<
typename TQuadEdge >
316 int op = Superclass::OperatorOnext,
340 template<
typename TGeometricalQuadEdge >
356 int op = Superclass::OperatorOnext,
373 return ( this->m_Iterator->GetOrigin() );