diff --git a/src/OpenMesh/Core/Mesh/PolyConnectivity_inline_impl.hh b/src/OpenMesh/Core/Mesh/PolyConnectivity_inline_impl.hh index 84fe2e71..2be178e2 100644 --- a/src/OpenMesh/Core/Mesh/PolyConnectivity_inline_impl.hh +++ b/src/OpenMesh/Core/Mesh/PolyConnectivity_inline_impl.hh @@ -893,70 +893,54 @@ inline PolyConnectivity::ConstHalfedgeLoopCCWIter PolyConnectivity::chl_ccwend(H { return ConstHalfedgeLoopCCWIter(*this, _heh, true); } -inline PolyConnectivity::ConstVertexFaceRange SmartVertexHandle::faces() const -{ - assert(mesh() != nullptr); - return mesh()->vf_range(*this); -} +inline PolyConnectivity::ConstVertexFaceRange SmartVertexHandle::faces() const { assert(mesh() != nullptr); return mesh()->vf_range (*this); } +inline PolyConnectivity::ConstVertexFaceCWRange SmartVertexHandle::faces_cw() const { assert(mesh() != nullptr); return mesh()->vf_cw_range (*this); } +inline PolyConnectivity::ConstVertexFaceCCWRange SmartVertexHandle::faces_ccw() const { assert(mesh() != nullptr); return mesh()->vf_ccw_range(*this); } -inline PolyConnectivity::ConstVertexEdgeRange SmartVertexHandle::edges() const -{ - assert(mesh() != nullptr); - return mesh()->ve_range(*this); -} +inline PolyConnectivity::ConstVertexEdgeRange SmartVertexHandle::edges() const { assert(mesh() != nullptr); return mesh()->ve_range (*this); } +inline PolyConnectivity::ConstVertexEdgeCWRange SmartVertexHandle::edges_cw() const { assert(mesh() != nullptr); return mesh()->ve_cw_range (*this); } +inline PolyConnectivity::ConstVertexEdgeCCWRange SmartVertexHandle::edges_ccw() const { assert(mesh() != nullptr); return mesh()->ve_ccw_range(*this); } -inline PolyConnectivity::ConstVertexVertexRange -SmartVertexHandle::vertices() const -{ - assert(mesh() != nullptr); - return mesh()->vv_range(*this); -} +inline PolyConnectivity::ConstVertexVertexRange SmartVertexHandle::vertices() const { assert(mesh() != nullptr); return mesh()->vv_range (*this); } +inline PolyConnectivity::ConstVertexVertexCWRange SmartVertexHandle::vertices_cw() const { assert(mesh() != nullptr); return mesh()->vv_cw_range (*this); } +inline PolyConnectivity::ConstVertexVertexCCWRange SmartVertexHandle::vertices_ccw() const { assert(mesh() != nullptr); return mesh()->vv_ccw_range (*this); } -inline PolyConnectivity::ConstVertexIHalfedgeRange -SmartVertexHandle::incoming_halfedges() const -{ - assert(mesh() != nullptr); - return mesh()->vih_range(*this); -} +inline PolyConnectivity::ConstVertexIHalfedgeRange SmartVertexHandle::incoming_halfedges() const { assert(mesh() != nullptr); return mesh()->vih_range (*this); } +inline PolyConnectivity::ConstVertexIHalfedgeCWRange SmartVertexHandle::incoming_halfedges_cw() const { assert(mesh() != nullptr); return mesh()->vih_cw_range (*this); } +inline PolyConnectivity::ConstVertexIHalfedgeCCWRange SmartVertexHandle::incoming_halfedges_ccw() const { assert(mesh() != nullptr); return mesh()->vih_ccw_range(*this); } -inline PolyConnectivity::ConstVertexOHalfedgeRange -SmartVertexHandle::outgoing_halfedges() const -{ - assert(mesh() != nullptr); - return mesh()->voh_range(*this); -} +inline PolyConnectivity::ConstVertexIHalfedgeRange SmartVertexHandle::incoming_halfedges (HalfedgeHandle _heh) const { assert(mesh() != nullptr); return mesh()->vih_range (_heh); } +inline PolyConnectivity::ConstVertexIHalfedgeCWRange SmartVertexHandle::incoming_halfedges_cw (HalfedgeHandle _heh) const { assert(mesh() != nullptr); return mesh()->vih_cw_range (_heh); } +inline PolyConnectivity::ConstVertexIHalfedgeCCWRange SmartVertexHandle::incoming_halfedges_ccw(HalfedgeHandle _heh) const { assert(mesh() != nullptr); return mesh()->vih_ccw_range(_heh); } -inline PolyConnectivity::ConstHalfedgeLoopRange -SmartHalfedgeHandle::loop() const -{ - assert(mesh() != nullptr); - return mesh()->hl_range(*this); -} +inline PolyConnectivity::ConstVertexOHalfedgeRange SmartVertexHandle::outgoing_halfedges() const { assert(mesh() != nullptr); return mesh()->voh_range (*this); } +inline PolyConnectivity::ConstVertexOHalfedgeCWRange SmartVertexHandle::outgoing_halfedges_cw() const { assert(mesh() != nullptr); return mesh()->voh_cw_range (*this); } +inline PolyConnectivity::ConstVertexOHalfedgeCCWRange SmartVertexHandle::outgoing_halfedges_ccw() const { assert(mesh() != nullptr); return mesh()->voh_ccw_range(*this); } + +inline PolyConnectivity::ConstVertexOHalfedgeRange SmartVertexHandle::outgoing_halfedges (HalfedgeHandle _heh) const { assert(mesh() != nullptr); return mesh()->voh_range (_heh); } +inline PolyConnectivity::ConstVertexOHalfedgeCWRange SmartVertexHandle::outgoing_halfedges_cw (HalfedgeHandle _heh) const { assert(mesh() != nullptr); return mesh()->voh_cw_range (_heh); } +inline PolyConnectivity::ConstVertexOHalfedgeCCWRange SmartVertexHandle::outgoing_halfedges_ccw(HalfedgeHandle _heh) const { assert(mesh() != nullptr); return mesh()->voh_ccw_range(_heh); } -inline PolyConnectivity::ConstFaceVertexRange SmartFaceHandle::vertices() const -{ - assert(mesh() != nullptr); - return mesh()->fv_range(*this); -} +inline PolyConnectivity::ConstHalfedgeLoopRange SmartHalfedgeHandle::loop() const { assert(mesh() != nullptr); return mesh()->hl_range (*this); } +inline PolyConnectivity::ConstHalfedgeLoopCWRange SmartHalfedgeHandle::loop_cw() const { assert(mesh() != nullptr); return mesh()->hl_cw_range (*this); } +inline PolyConnectivity::ConstHalfedgeLoopCCWRange SmartHalfedgeHandle::loop_ccw() const { assert(mesh() != nullptr); return mesh()->hl_ccw_range (*this); } -inline PolyConnectivity::ConstFaceHalfedgeRange -SmartFaceHandle::halfedges() const -{ - assert(mesh() != nullptr); - return mesh()->fh_range(*this); -} -inline PolyConnectivity::ConstFaceEdgeRange SmartFaceHandle::edges() const -{ - assert(mesh() != nullptr); - return mesh()->fe_range(*this); -} +inline PolyConnectivity::ConstFaceVertexRange SmartFaceHandle::vertices() const { assert(mesh() != nullptr); return mesh()->fv_range (*this); } +inline PolyConnectivity::ConstFaceVertexCWRange SmartFaceHandle::vertices_cw() const { assert(mesh() != nullptr); return mesh()->fv_cw_range (*this); } +inline PolyConnectivity::ConstFaceVertexCCWRange SmartFaceHandle::vertices_ccw() const { assert(mesh() != nullptr); return mesh()->fv_ccw_range(*this); } -inline PolyConnectivity::ConstFaceFaceRange SmartFaceHandle::faces() const -{ - assert(mesh() != nullptr); - return mesh()->ff_range(*this); -} +inline PolyConnectivity::ConstFaceHalfedgeRange SmartFaceHandle::halfedges() const { assert(mesh() != nullptr); return mesh()->fh_range (*this); } +inline PolyConnectivity::ConstFaceHalfedgeCWRange SmartFaceHandle::halfedges_cw() const { assert(mesh() != nullptr); return mesh()->fh_cw_range (*this); } +inline PolyConnectivity::ConstFaceHalfedgeCCWRange SmartFaceHandle::halfedges_ccw() const { assert(mesh() != nullptr); return mesh()->fh_ccw_range(*this); } + +inline PolyConnectivity::ConstFaceEdgeRange SmartFaceHandle::edges() const { assert(mesh() != nullptr); return mesh()->fe_range (*this); } +inline PolyConnectivity::ConstFaceEdgeCWRange SmartFaceHandle::edges_cw() const { assert(mesh() != nullptr); return mesh()->fe_cw_range (*this); } +inline PolyConnectivity::ConstFaceEdgeCCWRange SmartFaceHandle::edges_ccw() const { assert(mesh() != nullptr); return mesh()->fe_ccw_range(*this); } + +inline PolyConnectivity::ConstFaceFaceRange SmartFaceHandle::faces() const { assert(mesh() != nullptr); return mesh()->ff_range (*this); } +inline PolyConnectivity::ConstFaceFaceCWRange SmartFaceHandle::faces_cw() const { assert(mesh() != nullptr); return mesh()->ff_cw_range (*this); } +inline PolyConnectivity::ConstFaceFaceCCWRange SmartFaceHandle::faces_ccw() const { assert(mesh() != nullptr); return mesh()->ff_ccw_range(*this); } }//namespace OpenMesh diff --git a/src/OpenMesh/Core/Mesh/SmartHandles.hh b/src/OpenMesh/Core/Mesh/SmartHandles.hh index fbe4a94e..66c5bb18 100644 --- a/src/OpenMesh/Core/Mesh/SmartHandles.hh +++ b/src/OpenMesh/Core/Mesh/SmartHandles.hh @@ -118,15 +118,47 @@ struct OPENMESHDLLEXPORT SmartVertexHandle : public SmartBaseHandle, VertexHandl SmartHalfedgeHandle in() const; /// Returns a range of faces incident to the vertex (PolyConnectivity::vf_range()) - PolyConnectivity::ConstVertexFaceRange faces() const; + PolyConnectivity::ConstVertexFaceRange faces() const; + /// Returns a range of faces incident to the vertex (PolyConnectivity::vf_cw_range()) + PolyConnectivity::ConstVertexFaceCWRange faces_cw() const; + /// Returns a range of faces incident to the vertex (PolyConnectivity::vf_ccw_range()) + PolyConnectivity::ConstVertexFaceCCWRange faces_ccw() const; /// Returns a range of edges incident to the vertex (PolyConnectivity::ve_range()) - PolyConnectivity::ConstVertexEdgeRange edges() const; + PolyConnectivity::ConstVertexEdgeRange edges() const; + /// Returns a range of edges incident to the vertex (PolyConnectivity::ve_cw_range()) + PolyConnectivity::ConstVertexEdgeCWRange edges_cw() const; + /// Returns a range of edges incident to the vertex (PolyConnectivity::ve_ccw_range()) + PolyConnectivity::ConstVertexEdgeCCWRange edges_ccw() const; /// Returns a range of vertices adjacent to the vertex (PolyConnectivity::vv_range()) - PolyConnectivity::ConstVertexVertexRange vertices() const; + PolyConnectivity::ConstVertexVertexRange vertices() const; + /// Returns a range of vertices adjacent to the vertex (PolyConnectivity::vv_cw_range()) + PolyConnectivity::ConstVertexVertexCWRange vertices_cw() const; + /// Returns a range of vertices adjacent to the vertex (PolyConnectivity::vv_ccw_range()) + PolyConnectivity::ConstVertexVertexCCWRange vertices_ccw() const; /// Returns a range of outgoing halfedges incident to the vertex (PolyConnectivity::voh_range()) - PolyConnectivity::ConstVertexIHalfedgeRange incoming_halfedges() const; - /// Returns a range of incoming halfedges incident to the vertex (PolyConnectivity::vih_range()) - PolyConnectivity::ConstVertexOHalfedgeRange outgoing_halfedges() const; + PolyConnectivity::ConstVertexIHalfedgeRange incoming_halfedges() const; + /// Returns a range of outgoing halfedges incident to the vertex (PolyConnectivity::voh_cw_range()) + PolyConnectivity::ConstVertexIHalfedgeCWRange incoming_halfedges_cw() const; + /// Returns a range of outgoing halfedges incident to the vertex (PolyConnectivity::voh_ccw_range()) + PolyConnectivity::ConstVertexIHalfedgeCCWRange incoming_halfedges_ccw() const; + /// Returns a range of outgoing halfedges incident to the vertex (PolyConnectivity::vih_range()) + PolyConnectivity::ConstVertexIHalfedgeRange incoming_halfedges(HalfedgeHandle _heh) const; + /// Returns a range of incoming halfedges incident to the vertex (PolyConnectivity::vih_cw_range()) + PolyConnectivity::ConstVertexIHalfedgeCWRange incoming_halfedges_cw(HalfedgeHandle _heh) const; + /// Returns a range of incoming halfedges incident to the vertex (PolyConnectivity::vih_ccw_range()) + PolyConnectivity::ConstVertexIHalfedgeCCWRange incoming_halfedges_ccw(HalfedgeHandle _heh) const; + /// Returns a range of incoming halfedges incident to the vertex (PolyConnectivity::voh_range()) + PolyConnectivity::ConstVertexOHalfedgeRange outgoing_halfedges() const; + /// Returns a range of incoming halfedges incident to the vertex (PolyConnectivity::voh_cw_range()) + PolyConnectivity::ConstVertexOHalfedgeCWRange outgoing_halfedges_cw() const; + /// Returns a range of incoming halfedges incident to the vertex (PolyConnectivity::voh_ccw_range()) + PolyConnectivity::ConstVertexOHalfedgeCCWRange outgoing_halfedges_ccw() const; + /// Returns a range of incoming halfedges incident to the vertex (PolyConnectivity::voh_range()) + PolyConnectivity::ConstVertexOHalfedgeRange outgoing_halfedges(HalfedgeHandle _heh) const; + /// Returns a range of incoming halfedges incident to the vertex (PolyConnectivity::voh_cw_range()) + PolyConnectivity::ConstVertexOHalfedgeCWRange outgoing_halfedges_cw(HalfedgeHandle _heh) const; + /// Returns a range of incoming halfedges incident to the vertex (PolyConnectivity::voh_ccw_range()) + PolyConnectivity::ConstVertexOHalfedgeCCWRange outgoing_halfedges_ccw(HalfedgeHandle _heh) const; /// Returns valence of the vertex uint valence() const; @@ -154,7 +186,11 @@ struct OPENMESHDLLEXPORT SmartHalfedgeHandle : public SmartBaseHandle, HalfedgeH SmartFaceHandle face() const; /// Returns a range of halfedges in the face of the halfedge (or along the boundary) (PolyConnectivity::hl_range()) - PolyConnectivity::ConstHalfedgeLoopRange loop() const; + PolyConnectivity::ConstHalfedgeLoopRange loop() const; + /// Returns a range of halfedges in the face of the halfedge (or along the boundary) (PolyConnectivity::hl_cw_range()) + PolyConnectivity::ConstHalfedgeLoopCWRange loop_cw() const; + /// Returns a range of halfedges in the face of the halfedge (or along the boundary) (PolyConnectivity::hl_ccw_range()) + PolyConnectivity::ConstHalfedgeLoopCCWRange loop_ccw() const; }; struct OPENMESHDLLEXPORT SmartEdgeHandle : public SmartBaseHandle, EdgeHandle, SmartHandleStatusPredicates, SmartHandleBoundaryPredicate @@ -187,13 +223,29 @@ struct OPENMESHDLLEXPORT SmartFaceHandle : public SmartBaseHandle, FaceHandle, S SmartHalfedgeHandle halfedge() const; /// Returns a range of vertices incident to the face (PolyConnectivity::fv_range()) - PolyConnectivity::ConstFaceVertexRange vertices() const; + PolyConnectivity::ConstFaceVertexRange vertices() const; + /// Returns a range of vertices incident to the face (PolyConnectivity::fv_cw_range()) + PolyConnectivity::ConstFaceVertexCWRange vertices_cw() const; + /// Returns a range of vertices incident to the face (PolyConnectivity::fv_ccw_range()) + PolyConnectivity::ConstFaceVertexCCWRange vertices_ccw() const; /// Returns a range of halfedges of the face (PolyConnectivity::fh_range()) - PolyConnectivity::ConstFaceHalfedgeRange halfedges() const; + PolyConnectivity::ConstFaceHalfedgeRange halfedges() const; + /// Returns a range of halfedges of the face (PolyConnectivity::fh_cw_range()) + PolyConnectivity::ConstFaceHalfedgeCWRange halfedges_cw() const; + /// Returns a range of halfedges of the face (PolyConnectivity::fh_ccw_range()) + PolyConnectivity::ConstFaceHalfedgeCCWRange halfedges_ccw() const; /// Returns a range of edges of the face (PolyConnectivity::fv_range()) - PolyConnectivity::ConstFaceEdgeRange edges() const; + PolyConnectivity::ConstFaceEdgeRange edges() const; + /// Returns a range of edges of the face (PolyConnectivity::fv_cw_range()) + PolyConnectivity::ConstFaceEdgeCWRange edges_cw() const; + /// Returns a range of edges of the face (PolyConnectivity::fv_ccw_range()) + PolyConnectivity::ConstFaceEdgeCCWRange edges_ccw() const; /// Returns a range adjacent faces of the face (PolyConnectivity::ff_range()) - PolyConnectivity::ConstFaceFaceRange faces() const; + PolyConnectivity::ConstFaceFaceRange faces() const; + /// Returns a range adjacent faces of the face (PolyConnectivity::ff_cw_range()) + PolyConnectivity::ConstFaceFaceCWRange faces_cw() const; + /// Returns a range adjacent faces of the face (PolyConnectivity::ff_ccw_range()) + PolyConnectivity::ConstFaceFaceCCWRange faces_ccw() const; /// Returns the valence of the face uint valence() const;