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) {}
118 m_StartEdge = r.m_StartEdge;
119 m_Iterator = r.m_Iterator;
120 m_OpType = r.m_OpType;
133 return ( ( m_StartEdge == r.m_StartEdge )
134 && ( m_Iterator == r.m_Iterator )
135 && ( m_OpType == r.m_OpType )
136 && ( m_Start == r.m_Start ) );
139 bool operator==(
const Self & r)
const
141 return ( ( m_StartEdge == r.m_StartEdge )
142 && ( m_Iterator == r.m_Iterator )
143 && ( m_OpType == r.m_OpType )
144 && ( m_Start == r.m_Start ) );
149 return ( !( this->
operator==(r) ) );
154 return ( !( this->
operator==(r) ) );
162 m_Start = !( m_Iterator == m_StartEdge );
173 m_Start = !( m_Iterator == m_StartEdge );
180 virtual void GoToNext()
185 m_Iterator = m_Iterator->GetOnext();
188 m_Iterator = m_Iterator->GetSym();
191 m_Iterator = m_Iterator->GetLnext();
194 m_Iterator = m_Iterator->GetRnext();
197 m_Iterator = m_Iterator->GetDnext();
200 m_Iterator = m_Iterator->GetOprev();
203 m_Iterator = m_Iterator->GetLprev();
206 m_Iterator = m_Iterator->GetRprev();
209 m_Iterator = m_Iterator->GetDprev();
211 case OperatorInvOnext:
212 m_Iterator = m_Iterator->GetInvOnext();
214 case OperatorInvLnext:
215 m_Iterator = m_Iterator->GetInvLnext();
217 case OperatorInvRnext:
218 m_Iterator = m_Iterator->GetInvRnext();
220 case OperatorInvDnext:
221 m_Iterator = m_Iterator->GetInvDnext();
245 template<
typename TQuadEdge >
259 int op = Superclass::OperatorOnext,
275 template<
typename TGeometricalQuadEdge >
290 int op = Superclass::OperatorOnext,
302 template<
typename TQuadEdge >
317 int op = Superclass::OperatorOnext,
341 template<
typename TGeometricalQuadEdge >
358 int op = Superclass::OperatorOnext,
375 return ( this->m_Iterator->GetOrigin() );