make smarthandle methods const
This commit is contained in:
@@ -50,90 +50,90 @@
|
||||
namespace OpenMesh
|
||||
{
|
||||
|
||||
SmartHalfedgeHandle SmartVertexHandle::out()
|
||||
SmartHalfedgeHandle SmartVertexHandle::out() const
|
||||
{
|
||||
assert(mesh() != nullptr);
|
||||
return make_smart(mesh()->halfedge_handle(*this), mesh());
|
||||
}
|
||||
|
||||
SmartHalfedgeHandle SmartVertexHandle::halfedge()
|
||||
SmartHalfedgeHandle SmartVertexHandle::halfedge() const
|
||||
{
|
||||
return out();
|
||||
}
|
||||
|
||||
SmartHalfedgeHandle SmartVertexHandle::in()
|
||||
SmartHalfedgeHandle SmartVertexHandle::in() const
|
||||
{
|
||||
return out().opp();
|
||||
}
|
||||
|
||||
SmartHalfedgeHandle SmartHalfedgeHandle::next()
|
||||
SmartHalfedgeHandle SmartHalfedgeHandle::next() const
|
||||
{
|
||||
assert(mesh() != nullptr);
|
||||
return make_smart(mesh()->next_halfedge_handle(*this), mesh());
|
||||
}
|
||||
|
||||
SmartHalfedgeHandle SmartHalfedgeHandle::prev()
|
||||
SmartHalfedgeHandle SmartHalfedgeHandle::prev() const
|
||||
{
|
||||
assert(mesh() != nullptr);
|
||||
return make_smart(mesh()->prev_halfedge_handle(*this), mesh());
|
||||
}
|
||||
|
||||
SmartHalfedgeHandle SmartHalfedgeHandle::opp()
|
||||
SmartHalfedgeHandle SmartHalfedgeHandle::opp() const
|
||||
{
|
||||
assert(mesh() != nullptr);
|
||||
return make_smart(mesh()->opposite_halfedge_handle(*this), mesh());
|
||||
}
|
||||
|
||||
SmartVertexHandle SmartHalfedgeHandle::to()
|
||||
SmartVertexHandle SmartHalfedgeHandle::to() const
|
||||
{
|
||||
assert(mesh() != nullptr);
|
||||
return make_smart(mesh()->to_vertex_handle(*this), mesh());
|
||||
}
|
||||
|
||||
SmartVertexHandle SmartHalfedgeHandle::from()
|
||||
SmartVertexHandle SmartHalfedgeHandle::from() const
|
||||
{
|
||||
assert(mesh() != nullptr);
|
||||
return make_smart(mesh()->from_vertex_handle(*this), mesh());
|
||||
}
|
||||
|
||||
SmartFaceHandle SmartHalfedgeHandle::face()
|
||||
SmartFaceHandle SmartHalfedgeHandle::face() const
|
||||
{
|
||||
assert(mesh() != nullptr);
|
||||
return make_smart(mesh()->face_handle(*this), mesh());
|
||||
}
|
||||
|
||||
SmartHalfedgeHandle SmartEdgeHandle::h(unsigned int _i)
|
||||
SmartHalfedgeHandle SmartEdgeHandle::h(unsigned int _i) const
|
||||
{
|
||||
assert(mesh() != nullptr);
|
||||
return make_smart(mesh()->halfedge_handle(*this, _i), mesh());
|
||||
}
|
||||
|
||||
SmartHalfedgeHandle SmartEdgeHandle::h0()
|
||||
SmartHalfedgeHandle SmartEdgeHandle::h0() const
|
||||
{
|
||||
return h(0);
|
||||
}
|
||||
|
||||
SmartHalfedgeHandle SmartEdgeHandle::h1()
|
||||
SmartHalfedgeHandle SmartEdgeHandle::h1() const
|
||||
{
|
||||
return h(1);
|
||||
}
|
||||
|
||||
SmartVertexHandle SmartEdgeHandle::v(unsigned int _i)
|
||||
SmartVertexHandle SmartEdgeHandle::v(unsigned int _i) const
|
||||
{
|
||||
return h(_i).from();
|
||||
}
|
||||
|
||||
SmartVertexHandle SmartEdgeHandle::v0()
|
||||
SmartVertexHandle SmartEdgeHandle::v0() const
|
||||
{
|
||||
return v(0);
|
||||
}
|
||||
|
||||
SmartVertexHandle SmartEdgeHandle::v1()
|
||||
SmartVertexHandle SmartEdgeHandle::v1() const
|
||||
{
|
||||
return v(1);
|
||||
}
|
||||
|
||||
SmartHalfedgeHandle SmartFaceHandle::halfedge()
|
||||
SmartHalfedgeHandle SmartFaceHandle::halfedge() const
|
||||
{
|
||||
assert(mesh() != nullptr);
|
||||
return make_smart(mesh()->halfedge_handle(*this), mesh());
|
||||
|
||||
@@ -83,40 +83,40 @@ struct SmartVertexHandle : public SmartBaseHandle, VertexHandle
|
||||
{
|
||||
explicit SmartVertexHandle(int _idx=-1, PolyConnectivity* _mesh = nullptr) : SmartBaseHandle(_idx, _mesh) {}
|
||||
|
||||
SmartHalfedgeHandle out();
|
||||
SmartHalfedgeHandle halfedge(); // alias for out
|
||||
SmartHalfedgeHandle in();
|
||||
SmartHalfedgeHandle out() const;
|
||||
SmartHalfedgeHandle halfedge() const; // alias for out
|
||||
SmartHalfedgeHandle in() const;
|
||||
};
|
||||
|
||||
struct SmartHalfedgeHandle : public SmartBaseHandle, HalfedgeHandle
|
||||
{
|
||||
explicit SmartHalfedgeHandle(int _idx=-1, PolyConnectivity* _mesh = nullptr) : SmartBaseHandle(_idx, _mesh) {}
|
||||
|
||||
SmartHalfedgeHandle next();
|
||||
SmartHalfedgeHandle prev();
|
||||
SmartHalfedgeHandle opp();
|
||||
SmartVertexHandle to();
|
||||
SmartVertexHandle from();
|
||||
SmartFaceHandle face();
|
||||
SmartHalfedgeHandle next() const;
|
||||
SmartHalfedgeHandle prev() const;
|
||||
SmartHalfedgeHandle opp() const;
|
||||
SmartVertexHandle to() const;
|
||||
SmartVertexHandle from() const;
|
||||
SmartFaceHandle face() const;
|
||||
};
|
||||
|
||||
struct SmartEdgeHandle : public SmartBaseHandle, EdgeHandle
|
||||
{
|
||||
explicit SmartEdgeHandle(int _idx=-1, PolyConnectivity* _mesh = nullptr) : SmartBaseHandle(_idx, _mesh) {}
|
||||
|
||||
SmartHalfedgeHandle h(unsigned int _i);
|
||||
SmartHalfedgeHandle h0();
|
||||
SmartHalfedgeHandle h1();
|
||||
SmartVertexHandle v(unsigned int _i);
|
||||
SmartVertexHandle v0();
|
||||
SmartVertexHandle v1();
|
||||
SmartHalfedgeHandle h(unsigned int _i) const;
|
||||
SmartHalfedgeHandle h0() const;
|
||||
SmartHalfedgeHandle h1() const;
|
||||
SmartVertexHandle v(unsigned int _i) const;
|
||||
SmartVertexHandle v0() const;
|
||||
SmartVertexHandle v1() const;
|
||||
};
|
||||
|
||||
struct SmartFaceHandle : public SmartBaseHandle, FaceHandle
|
||||
{
|
||||
explicit SmartFaceHandle(int _idx=-1, PolyConnectivity* _mesh = nullptr) : SmartBaseHandle(_idx, _mesh) {}
|
||||
|
||||
SmartHalfedgeHandle halfedge();
|
||||
SmartHalfedgeHandle halfedge() const;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user