add methods to exporter for accessing halfedges for vertices and faces and for accessing next halfface, incident vertex and incident face for halfedges
This commit is contained in:
@@ -110,6 +110,14 @@ public:
|
||||
virtual unsigned int
|
||||
get_vhandles(FaceHandle _fh,
|
||||
std::vector<VertexHandle>& _vhandles) const=0;
|
||||
|
||||
// information needed for a halfedge based data structure such as OpenMesh
|
||||
virtual int get_halfedge_id(VertexHandle _vh) = 0;
|
||||
virtual int get_halfedge_id(FaceHandle _vh) = 0;
|
||||
virtual int get_next_halfedge_id(HalfedgeHandle _heh) = 0;
|
||||
virtual int get_to_vertex_id(HalfedgeHandle _heh) = 0;
|
||||
virtual int get_face_id(HalfedgeHandle _heh) = 0;
|
||||
|
||||
///
|
||||
/// \brief getHeh returns the HalfEdgeHandle that belongs to the face
|
||||
/// specified by _fh and has a toVertexHandle that corresponds to _vh.
|
||||
|
||||
@@ -230,6 +230,31 @@ public:
|
||||
return count;
|
||||
}
|
||||
|
||||
int get_halfedge_id(VertexHandle _vh) override
|
||||
{
|
||||
return mesh_.halfedge_handle(_vh).idx();
|
||||
}
|
||||
|
||||
int get_halfedge_id(FaceHandle _fh) override
|
||||
{
|
||||
return mesh_.halfedge_handle(_fh).idx();
|
||||
}
|
||||
|
||||
int get_next_halfedge_id(HalfedgeHandle _heh) override
|
||||
{
|
||||
return mesh_.next_halfedge_handle(_heh).idx();
|
||||
}
|
||||
|
||||
int get_to_vertex_id(HalfedgeHandle _heh) override
|
||||
{
|
||||
return mesh_.to_vertex_handle(_heh).idx();
|
||||
}
|
||||
|
||||
int get_face_id(HalfedgeHandle _heh) override
|
||||
{
|
||||
return mesh_.face_handle(_heh).idx();
|
||||
}
|
||||
|
||||
unsigned int get_face_texcoords(std::vector<Vec2f>& _hehandles) const
|
||||
{
|
||||
unsigned int count(0);
|
||||
|
||||
Reference in New Issue
Block a user