make smart handles more compatible with mixing old api

This commit is contained in:
Max Lyon
2019-10-17 12:56:48 +02:00
parent 81f3fcc2c1
commit 3b21aa14fb
3 changed files with 79 additions and 9 deletions

View File

@@ -125,6 +125,8 @@ struct OPENMESHDLLEXPORT SmartHalfedgeHandle : public SmartBaseHandle, HalfedgeH
SmartVertexHandle to() const;
/// Returns vertex at start of halfedge
SmartVertexHandle from() const;
/// Returns incident edge of halfedge
SmartEdgeHandle edge() const;
/// Returns incident face of halfedge
SmartFaceHandle face() const;
@@ -273,6 +275,12 @@ inline SmartVertexHandle SmartHalfedgeHandle::from() const
return make_smart(mesh()->from_vertex_handle(*this), mesh());
}
inline SmartEdgeHandle SmartHalfedgeHandle::edge() const
{
assert(mesh() != nullptr);
return make_smart(mesh()->edge_handle(*this), mesh());
}
inline SmartFaceHandle SmartHalfedgeHandle::face() const
{
assert(mesh() != nullptr);