- a property map associating points to the elements of the point range
-
Type: a model of
ReadablePropertyMap
with value typegeom_traits::Point_3
-
Default:
CGAL::Identity_property_map<geom_traits::Point_3>
CGAL 5.4.1 - Optimal Bounding Box
|
The function oriented_bounding_box()
computes an approximation of the optimal bounding box, which is defined as the rectangular box with smallest volume of all the rectangular boxes containing the input points.
Internally, the algorithm uses an optimization process to compute a transformation (rotation) \( {\mathcal R}_b\) such that the axis-aligned box of the rotated input point set has a volume that is as small as possible given a fixed maximal number of optimization iterations.
Input
The input can be either a range of 3D points, or a polygon mesh.
Output
The result of the algorithm can be retrieved as either:
CGAL::make_hexahedron()
, which can be used to construct a mesh from these points.MutableFaceGraph
Note that when returning an array of points, these points are constructed from the axis-aligned bounding box and some precision loss should therefore be expected if a kernel not providing exact constructions is used.
The algorithm is based on a paper by Chang, Gorissen, and Melchior [1].
Functions | |
template<typename PointRange , typename Output , typename NamedParameters > | |
void | CGAL::oriented_bounding_box (const PointRange &points, Output &out, const NamedParameters &np) |
The function oriented_bounding_box() computes an approximation of the optimal bounding box, which is defined as the rectangular box with smallest volume of all the rectangular boxes containing the input points. More... | |
template<typename PolygonMesh , typename Output , typename NamedParameters > | |
void | CGAL::oriented_bounding_box (const PolygonMesh &pmesh, Output &out, const NamedParameters &np) |
Extracts the vertices of the mesh as a point range and calls the overload using points as input. More... | |
void CGAL::oriented_bounding_box | ( | const PointRange & | points, |
Output & | out, | ||
const NamedParameters & | np | ||
) |
#include <CGAL/Optimal_bounding_box/oriented_bounding_box.h>
The function oriented_bounding_box()
computes an approximation of the optimal bounding box, which is defined as the rectangular box with smallest volume of all the rectangular boxes containing the input points.
See Oriented Bounding Box Functions for more information.
PointRange | a model of Range . The value type may not be equal to the type Point_3 of the traits class if a point map is provided via named parameters (see below) to access points. |
Output | either the type Aff_transformation_3 of the traits class, or std::array<Point, 8> with Point being equivalent to the type Point_3 of the traits class, or a model of MutableFaceGraph |
NamedParameters | a sequence of Named Parameters |
points | the input range |
out | the resulting array of points or affine transformation |
np | an optional sequence of Named Parameters among the ones listed below |
| |
| |
|
void CGAL::oriented_bounding_box | ( | const PolygonMesh & | pmesh, |
Output & | out, | ||
const NamedParameters & | np | ||
) |
#include <CGAL/Optimal_bounding_box/oriented_bounding_box.h>
Extracts the vertices of the mesh as a point range and calls the overload using points as input.
PolygonMesh | a model of VertexListGraph |
Output | either the type Aff_transformation_3 of the traits class, or std::array<Point, 8> with Point being equivalent to the type Point_3 of the traits class, or a model of MutableFaceGraph |
NamedParameters | a sequence of Named Parameters |
pmesh | the input mesh |
out | the resulting array of points or affine transformation |
np | an optional sequence of Named Parameters among the ones listed below |
| |
| |
|