-
gives an upper bound of the number of voxels. The longest bounding box side will have a length of the cubic root of
maximum_number_of_voxelsrounded down. Cannot be smaller than 512. - Type: unsigned int
- Default: 1,000,000
|
CGAL 6.2 - Convex Decomposition of Polyhedra
|
CGAL::convex_decomposition_3() splits provides a decomposition into \(O(r^2)\) convex pieces, where \( r\) is the number of edges, whose adjacent facets form an angle of more than 180 degrees with respect to the polyhedron's interior. This bound is worst-case optimal. The CGAL::approximate_convex_decomposition() instead splits the convex hull of the polyhedron into a set of convex volumes. While these convex volumes cover additional space outside of the polyhedron, the computation is fast for any chosen number of convex volumes.CGAL::approximate_convex_decomposition(FaceGraph)CGAL::convex_decomposition_3(NefPolyhedron_3) Functions | |
| template<typename NefPolyhedron_3 > | |
| void | CGAL::convex_decomposition_3 (NefPolyhedron_3 &N) |
The function convex_decomposition_3() inserts additional facets into the given Nef polyhedronN`, such that each bounded marked volume (the outer volume is unbounded) is subdivided into convex pieces. | |
| template<typename FaceGraph , typename OutputIterator , typename NamedParameters = parameters::Default_named_parameters> | |
| std::size_t | CGAL::approximate_convex_decomposition (const FaceGraph &tmesh, OutputIterator out_volumes, const NamedParameters &np=parameters::default_values()) |
| approximates the closed input mesh by a number of convex volumes. | |
| std::size_t CGAL::approximate_convex_decomposition | ( | const FaceGraph & | tmesh, |
| OutputIterator | out_volumes, | ||
| const NamedParameters & | np = parameters::default_values() |
||
| ) |
#include </home/runner/work/cgal/cgal/Surface_mesh_decomposition/include/CGAL/approximate_convex_decomposition.h>
approximates the closed input mesh by a number of convex volumes.
The input mesh is voxelized and the voxels intersecting with the mesh are labeled as surface. The remaining voxels are labeled as outside or inside. In a next step, the convex hull of the mesh is hierarchically split until the volume_error threshold is satisfied or the maximum_depth is reached. Finally, a greedy pairwise merging combines smaller convex volumes until maximum_number_of_convex_volumes is met.
| FaceGraph | a model of HalfedgeListGraph, and FaceListGraph |
| OutputIterator | must be an output iterator accepting variables of type std::pair<std::vector<geom_traits::Point_3>, std::vector<std::array<unsigned int, 3> > >. |
| NamedParameters | a sequence of Named Parameters |
| tmesh | the input triangle mesh to approximate by convex volumes |
| out_volumes | output iterator into which convex volumes are recorded |
| np | an optional sequence of Named Parameters among the ones listed below |
| |
| |
| |
| |
| |
| |
| |
| |
|
maximum_number_of_convex_volumes, for example if the specified volume_error is quickly met.tmesh is a triangle mesh. tmesh is not self-intersecting. tmesh). | void CGAL::convex_decomposition_3 | ( | NefPolyhedron_3 & | N | ) |
#include <CGAL/convex_decomposition_3.h>
The function convex_decomposition_3() inserts additional facets into the given Nef polyhedronN`, such that each bounded marked volume (the outer volume is unbounded) is subdivided into convex pieces.
The modified polyhedron represents a decomposition into \(O(r^2)\) convex pieces, where \( r\) is the number of edges that have two adjacent facets that span an angle of more than 180 degrees with respect to the interior of the polyhedron.
The worst-case running time of our implementation is \(O(n^2r^4\sqrt[3]{nr^2}\log{(nr)})\), where \( n\) is the complexity of the polyhedron (the complexity of a Nef polyhedron is the sum of its Vertices, Halfedges and SHalfedges) and \( r\) is the number of reflex edges.
| NefPolyhedron_3 | an object of type Nef_polyhedron_3. |
N is bounded. Otherwise, the outer volume is ignored.N is non-convex, it is modified to represent the convex decomposition. If N is convex, it is not modified.CGAL::Nef_polyhedron_3<Traits>