Add convenience function to transform a vertex range into a halfedge range

This commit is contained in:
Mael Rouxel-Labbé 2020-01-13 10:45:30 +01:00
parent d4e952f98c
commit 467303da1f
1 changed files with 14 additions and 0 deletions

View File

@ -22,6 +22,20 @@ namespace CGAL {
namespace Polygon_mesh_processing {
namespace internal {
template <typename VertexRange,
typename HalfedgeOutputIterator,
typename PolygonMesh>
void vertices_as_halfedges(const VertexRange& vertex_range,
const PolygonMesh& pmesh,
HalfedgeOutputIterator out)
{
typedef typename boost::graph_traits<PolygonMesh>::vertex_descriptor vertex_descriptor;
typedef typename boost::graph_traits<PolygonMesh>::halfedge_descriptor halfedge_descriptor;
for(vertex_descriptor v : vertex_range)
*out++ = halfedge(v, pmesh);
}
// Assigns at each vertex the 'tolerance' value as tolerance, but bounded by a percentage of the length of its shortest incident edge
template <typename HalfedgeRange,
typename ToleranceMap,