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