diff --git a/Doc/mesh.docu b/Doc/mesh.docu index 2741c8d7..1dba8eac 100644 --- a/Doc/mesh.docu +++ b/Doc/mesh.docu @@ -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, which are basically the same as the iterator funtions. diff --git a/src/OpenMesh/Core/Mesh/PolyConnectivity.hh b/src/OpenMesh/Core/Mesh/PolyConnectivity.hh index 423ccb0a..ee3bfe18 100644 --- a/src/OpenMesh/Core/Mesh/PolyConnectivity.hh +++ b/src/OpenMesh/Core/Mesh/PolyConnectivity.hh @@ -118,6 +118,10 @@ public: &Iterators::GenericCirculatorBaseT::toEdgeHandle> VertexEdgeIter; + typedef Iterators::GenericCirculatorT::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); } //@}