mirror of https://github.com/CGAL/cgal
create an overload of CGAL::make_hexahedron for Iso_cuboid_3
This commit is contained in:
parent
3ceaaccfa1
commit
685f6e7f84
|
|
@ -348,6 +348,22 @@ make_hexahedron(const P& p0, const P& p1, const P& p2, const P& p3,
|
|||
return next(next(hb, g), g);
|
||||
}
|
||||
|
||||
/**
|
||||
* \ingroup PkgBGLHelperFct
|
||||
* \tparam IsoCuboid model of `IsoCuboid_3`
|
||||
* \brief creates an isolated hexahedron
|
||||
* equivalent to `c`, and adds it to the graph `g`.
|
||||
* \returns the halfedge that has the target vertex associated with `c.min()`,
|
||||
* in the bottom face of the cuboid.
|
||||
**/
|
||||
template<typename Graph, typename IsoCuboid>
|
||||
typename boost::graph_traits<Graph>::halfedge_descriptor
|
||||
make_hexahedron(const IsoCuboid& c, Graph& g)
|
||||
{
|
||||
return CGAL::make_hexahedron(c[0], c[1], c[2], c[3],
|
||||
c[4], c[5], c[6], c[7], g);
|
||||
}
|
||||
|
||||
/**
|
||||
* \ingroup PkgBGLHelperFct
|
||||
* \brief creates an isolated tetrahedron
|
||||
|
|
|
|||
|
|
@ -331,18 +331,13 @@ namespace CGAL {
|
|||
|
||||
using GT = typename GetGeomTraits<PolygonMesh, NamedParameters>::type;
|
||||
GT gt = choose_parameter<GT>(get_parameter(np, internal_np::geom_traits));
|
||||
using Point_3 = typename GT::Point_3;
|
||||
using Iso_cuboid_3 = typename GT::Iso_cuboid_3;
|
||||
using Vector_3 = typename GT::Vector_3;
|
||||
|
||||
const bool dont_triangulate = choose_parameter(
|
||||
get_parameter(np, internal_np::do_not_triangulate_faces), false);
|
||||
|
||||
const Iso_cuboid_3 bbext(CGAL::Polygon_mesh_processing::bbox(pmesh, np));
|
||||
|
||||
PolygonMesh bbox_mesh;
|
||||
CGAL::make_hexahedron(bbext[0], bbext[1], bbext[2], bbext[3],
|
||||
bbext[4], bbext[5], bbext[6], bbext[7],
|
||||
CGAL::make_hexahedron(Iso_cuboid_3(bbox(pmesh, np)),
|
||||
bbox_mesh);
|
||||
|
||||
if(!dont_triangulate)
|
||||
|
|
|
|||
Loading…
Reference in New Issue