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 >
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 ) );
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 );
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();
215 m_Iterator = m_Iterator->GetInvOnext();
218 m_Iterator = m_Iterator->GetInvLnext();
221 m_Iterator = m_Iterator->GetInvRnext();
224 m_Iterator = m_Iterator->GetInvDnext();
248 template<
typename TQuadEdge >
278 template<
typename TGeometricalQuadEdge >
305 template<
typename TQuadEdge >
344 template<
typename TGeometricalQuadEdge >
378 return ( this->m_Iterator->GetOrigin() );
bool operator!=(const Self &r) const
TGeometricalQuadEdge QuadEdgeType
const QuadEdgeType * Value() const
OriginRefType operator*()
typename QuadEdgeType::OriginRefType OriginRefType
QuadEdgeType * GetStartEdge() const
Base iterator class for QuadEdgeMesh.
QuadEdgeMeshConstIterator(const QuadEdgeType *e=(QuadEdgeType *) 0, int op=Superclass::OperatorOnext, bool start=true)
virtual ~QuadEdgeMeshBaseIterator()=default
QuadEdgeMeshBaseIterator(QuadEdgeType *e, int op=OperatorOnext, bool start=true)
Self & operator=(const NoConstType &r)
QuadEdgeType * GetIterator() const
Self & operator=(const NoConstType &r)
QuadEdgeMeshConstIteratorGeom(const QuadEdgeType *e=(QuadEdgeType *) 0, int op=Superclass::OperatorOnext, bool start=true)
Const geometrical iterator.
QuadEdgeMeshIteratorGeom(QuadEdgeType *e=(QuadEdgeType *) nullptr, int op=Superclass::OperatorOnext, bool start=true)
Non const iterator for QuadMesh.
const OriginRefType operator*() const
typename QuadEdgeType::OriginRefType OriginRefType
TGeometricalQuadEdge QuadEdgeType
TGeometricalQuadEdge QuadEdgeType
Const iterator for QuadEdgeMesh.
QuadEdgeMeshIterator(QuadEdgeType *e=(QuadEdgeType *) 0, int op=Superclass::OperatorOnext, bool start=true)
~QuadEdgeMeshConstIterator() override=default
~QuadEdgeMeshConstIteratorGeom() override=default
static constexpr double e
The base of the natural logarithm or Euler's number
const QuadEdgeType * Value() const
Self & operator=(const Self &r)
bool operator==(const Self &r) const
~QuadEdgeMeshIterator() override=default
Non const geometrical iterator.