Commit ae7ae806 authored by Jan Möbius's avatar Jan Möbius

Added HalfedgeLoop iterator to iterate over loops of halfedges (faces, hoes). closes #1979

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@987 fdac6126-5c0c-442c-9429-916003d36597
parent 18d44c13
......@@ -838,6 +838,9 @@ The circulators around a face are:
\arg \c FaceEdgeIter: iterate over the face's edges.
\arg \c FaceFaceIter: iterate over all edge-neighboring faces.
Other circulators:
\arg \c HalfedgeLoopIter: iterate over a sequence of Halfedges. (all Halfedges over a face or a hole)
All circulators provide the operations listed in
CirculatorT<Mesh>, which are basically the same as the
iterator funtions.
......
......@@ -118,6 +118,10 @@ public:
&Iterators::GenericCirculatorBaseT<This>::toEdgeHandle>
VertexEdgeIter;
typedef Iterators::GenericCirculatorT<This, This::FaceHandle, This::HalfedgeHandle,
&Iterators::GenericCirculatorBaseT<This>::toHalfedgeHandle>
HalfedgeLoopIter;
typedef VertexVertexIter ConstVertexVertexIter;
typedef VertexOHalfedgeIter ConstVertexOHalfedgeIter;
typedef VertexIHalfedgeIter ConstVertexIHalfedgeIter;
......@@ -147,6 +151,12 @@ public:
typedef FaceHalfedgeIter ConstFaceHalfedgeIter;
typedef FaceEdgeIter ConstFaceEdgeIter;
typedef FaceFaceIter ConstFaceFaceIter;
/*
* Halfedge circulator
*/
typedef HalfedgeLoopIter ConstHalfedgeLoopIter;
//@}
// --- shortcuts
......@@ -521,6 +531,9 @@ public:
/// face - face circulator
FaceFaceIter ff_begin(FaceHandle _fh)
{ return FaceFaceIter(*this, _fh); }
/// halfedge circulator
HalfedgeLoopIter hl_begin(HalfedgeHandle _heh)
{ return HalfedgeLoopIter(*this, _heh); }
/// const face - vertex circulator
ConstFaceVertexIter cfv_begin(FaceHandle _fh) const
......@@ -534,6 +547,9 @@ public:
/// const face - face circulator
ConstFaceFaceIter cff_begin(FaceHandle _fh) const
{ return ConstFaceFaceIter(*this, _fh); }
/// const halfedge circulator
ConstHalfedgeLoopIter chl_begin(HalfedgeHandle _heh) const
{ return ConstHalfedgeLoopIter(*this, _heh); }
// 'end' circulators
......@@ -581,6 +597,9 @@ public:
/// face - face circulator
FaceFaceIter ff_end(FaceHandle _fh)
{ return FaceFaceIter(*this, _fh, true); }
/// face - face circulator
HalfedgeLoopIter hl_end(HalfedgeHandle _heh)
{ return HalfedgeLoopIter(*this, _heh, true); }
/// const face - vertex circulator
ConstFaceVertexIter cfv_end(FaceHandle _fh) const
......@@ -594,6 +613,9 @@ public:
/// const face - face circulator
ConstFaceFaceIter cff_end(FaceHandle _fh) const
{ return ConstFaceFaceIter(*this, _fh, true); }
/// const face - face circulator
ConstHalfedgeLoopIter chl_end(HalfedgeHandle _heh) const
{ return ConstHalfedgeLoopIter(*this, _heh, true); }
//@}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment