add access to cw and ccw ranges in SmartHandles

This commit is contained in:
Max Lyon
2021-03-09 10:57:17 +01:00
parent 69caa276da
commit b2bcded8ec
2 changed files with 102 additions and 66 deletions

View File

@@ -893,70 +893,54 @@ inline PolyConnectivity::ConstHalfedgeLoopCCWIter PolyConnectivity::chl_ccwend(H
{ return ConstHalfedgeLoopCCWIter(*this, _heh, true); } { return ConstHalfedgeLoopCCWIter(*this, _heh, true); }
inline PolyConnectivity::ConstVertexFaceRange SmartVertexHandle::faces() const 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); }
assert(mesh() != nullptr); inline PolyConnectivity::ConstVertexFaceCCWRange SmartVertexHandle::faces_ccw() const { assert(mesh() != nullptr); return mesh()->vf_ccw_range(*this); }
return mesh()->vf_range(*this);
}
inline PolyConnectivity::ConstVertexEdgeRange SmartVertexHandle::edges() const 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); }
assert(mesh() != nullptr); inline PolyConnectivity::ConstVertexEdgeCCWRange SmartVertexHandle::edges_ccw() const { assert(mesh() != nullptr); return mesh()->ve_ccw_range(*this); }
return mesh()->ve_range(*this);
}
inline PolyConnectivity::ConstVertexVertexRange inline PolyConnectivity::ConstVertexVertexRange SmartVertexHandle::vertices() const { assert(mesh() != nullptr); return mesh()->vv_range (*this); }
SmartVertexHandle::vertices() const 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); }
assert(mesh() != nullptr);
return mesh()->vv_range(*this);
}
inline PolyConnectivity::ConstVertexIHalfedgeRange inline PolyConnectivity::ConstVertexIHalfedgeRange SmartVertexHandle::incoming_halfedges() const { assert(mesh() != nullptr); return mesh()->vih_range (*this); }
SmartVertexHandle::incoming_halfedges() const 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); }
assert(mesh() != nullptr);
return mesh()->vih_range(*this);
}
inline PolyConnectivity::ConstVertexOHalfedgeRange inline PolyConnectivity::ConstVertexIHalfedgeRange SmartVertexHandle::incoming_halfedges (HalfedgeHandle _heh) const { assert(mesh() != nullptr); return mesh()->vih_range (_heh); }
SmartVertexHandle::outgoing_halfedges() const 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); }
assert(mesh() != nullptr);
return mesh()->voh_range(*this);
}
inline PolyConnectivity::ConstHalfedgeLoopRange inline PolyConnectivity::ConstVertexOHalfedgeRange SmartVertexHandle::outgoing_halfedges() const { assert(mesh() != nullptr); return mesh()->voh_range (*this); }
SmartHalfedgeHandle::loop() const 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); }
assert(mesh() != nullptr);
return mesh()->hl_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 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); }
assert(mesh() != nullptr); inline PolyConnectivity::ConstHalfedgeLoopCCWRange SmartHalfedgeHandle::loop_ccw() const { assert(mesh() != nullptr); return mesh()->hl_ccw_range (*this); }
return mesh()->fv_range(*this);
}
inline PolyConnectivity::ConstFaceHalfedgeRange
SmartFaceHandle::halfedges() const
{
assert(mesh() != nullptr);
return mesh()->fh_range(*this);
}
inline PolyConnectivity::ConstFaceEdgeRange SmartFaceHandle::edges() const 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); }
assert(mesh() != nullptr); inline PolyConnectivity::ConstFaceVertexCCWRange SmartFaceHandle::vertices_ccw() const { assert(mesh() != nullptr); return mesh()->fv_ccw_range(*this); }
return mesh()->fe_range(*this);
}
inline PolyConnectivity::ConstFaceFaceRange SmartFaceHandle::faces() const 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); }
assert(mesh() != nullptr); inline PolyConnectivity::ConstFaceHalfedgeCCWRange SmartFaceHandle::halfedges_ccw() const { assert(mesh() != nullptr); return mesh()->fh_ccw_range(*this); }
return mesh()->ff_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 }//namespace OpenMesh

View File

@@ -119,14 +119,46 @@ struct OPENMESHDLLEXPORT SmartVertexHandle : public SmartBaseHandle, VertexHandl
/// Returns a range of faces incident to the vertex (PolyConnectivity::vf_range()) /// 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()) /// 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()) /// 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()) /// Returns a range of outgoing halfedges incident to the vertex (PolyConnectivity::voh_range())
PolyConnectivity::ConstVertexIHalfedgeRange incoming_halfedges() const; PolyConnectivity::ConstVertexIHalfedgeRange incoming_halfedges() const;
/// Returns a range of incoming halfedges incident to the vertex (PolyConnectivity::vih_range()) /// 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; 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 /// Returns valence of the vertex
uint valence() const; uint valence() const;
@@ -155,6 +187,10 @@ struct OPENMESHDLLEXPORT SmartHalfedgeHandle : public SmartBaseHandle, HalfedgeH
/// Returns a range of halfedges in the face of the halfedge (or along the boundary) (PolyConnectivity::hl_range()) /// 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<SmartEdgeHandle>, SmartHandleBoundaryPredicate<SmartEdgeHandle> struct OPENMESHDLLEXPORT SmartEdgeHandle : public SmartBaseHandle, EdgeHandle, SmartHandleStatusPredicates<SmartEdgeHandle>, SmartHandleBoundaryPredicate<SmartEdgeHandle>
@@ -188,12 +224,28 @@ struct OPENMESHDLLEXPORT SmartFaceHandle : public SmartBaseHandle, FaceHandle, S
/// Returns a range of vertices incident to the face (PolyConnectivity::fv_range()) /// 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()) /// 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()) /// 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()) /// 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 /// Returns the valence of the face
uint valence() const; uint valence() const;