diff --git a/Optimal_bounding_box/doc/Optimal_bounding_box/Concepts/OrientedBoundingBoxTraits.h b/Optimal_bounding_box/doc/Optimal_bounding_box/Concepts/OrientedBoundingBoxTraits.h index f5ef85a757a..4744f230071 100644 --- a/Optimal_bounding_box/doc/Optimal_bounding_box/Concepts/OrientedBoundingBoxTraits.h +++ b/Optimal_bounding_box/doc/Optimal_bounding_box/Concepts/OrientedBoundingBoxTraits.h @@ -21,6 +21,10 @@ public: /// The 3D point type; must be model of `Point_3` typedef unspecified_type Point_3; + /// The 3D affine transformation type; the template parameter `K` must be a model of `Kernel` + /// and be compatible with the type `Point_3`. + typedef CGAL::Aff_transformation_3 Aff_transformation_3; + /// A construction object that must provide the function operator: /// `CGAL::Bbox_3 operator()(const Point_3&)`, /// which returns an axis-aligned bounding that contains the point diff --git a/Optimal_bounding_box/doc/Optimal_bounding_box/PackageDescription.txt b/Optimal_bounding_box/doc/Optimal_bounding_box/PackageDescription.txt index e5b5e9f4b5c..438f248e4c5 100644 --- a/Optimal_bounding_box/doc/Optimal_bounding_box/PackageDescription.txt +++ b/Optimal_bounding_box/doc/Optimal_bounding_box/PackageDescription.txt @@ -15,10 +15,10 @@ /*! \addtogroup PkgOptimalBoundingBoxRef \cgalPkgDescriptionBegin{Optimal Bounding Box,PkgOptimalBoundingBox} -\cgalPkgPicture{Envelope_2.png} +\cgalPkgPicture{optimal_bounding_box.png} \cgalPkgSummaryBegin \cgalPkgAuthor{Konstantinos Katrioplas, Mael Rouxel-Labbé} -\cgalPkgDesc{This package provides functions to compute oriented bounding boxes around a point set or a polygon mesh.} +\cgalPkgDesc{This package provides functions to compute tight oriented bounding boxes around a point set or a polygon mesh.} \cgalPkgManuals{Chapter_Building_Optimal_Bounding_Box,PkgOptimalBoundingBoxRef} \cgalPkgSummaryEnd \cgalPkgShortInfoBegin diff --git a/Optimal_bounding_box/doc/Optimal_bounding_box/fig/optimal_bounding_box.png b/Optimal_bounding_box/doc/Optimal_bounding_box/fig/optimal_bounding_box.png new file mode 100644 index 00000000000..a85355c06ed Binary files /dev/null and b/Optimal_bounding_box/doc/Optimal_bounding_box/fig/optimal_bounding_box.png differ diff --git a/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/Oriented_bounding_box_traits.h b/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/Oriented_bounding_box_traits.h index 63e5bae7ec4..b76670cdda0 100644 --- a/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/Oriented_bounding_box_traits.h +++ b/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/Oriented_bounding_box_traits.h @@ -58,9 +58,6 @@ private: typedef typename Matrix::EigenType EigenType; public: - /// Constructor from the base kernel - explicit Oriented_bounding_box_traits() { } - /// Offers `construct_bbox_3_object()(const Point_3&)` Construct_bbox_3 construct_bbox_3_object() const { return Construct_bbox_3(); } diff --git a/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/oriented_bounding_box.h b/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/oriented_bounding_box.h index 152df7a6bd2..709ca28a74c 100644 --- a/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/oriented_bounding_box.h +++ b/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/oriented_bounding_box.h @@ -183,9 +183,9 @@ void construct_oriented_bounding_box(Output& output, /// 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 find a transformation (rotation) +/// Internally, the algorithm uses an optimization process to compute a transformation (rotation) /// \f$ {\mathcal R}_b\f$ such that the axis-aligned box of the rotated input point set -/// has a volume that is as small as possible. +/// has a volume that is as small as possible given a fixed maximal number of optimization iterations. /// /// \cgalHeading{Input} /// @@ -193,7 +193,7 @@ void construct_oriented_bounding_box(Output& output, /// /// \cgalHeading{Output} /// -/// The result of the algorithm can be obtained as either: +/// The result of the algorithm can be retrieved as either: /// - the best affine transformation (\f$ {\mathcal R}_b\f$) that the algorithm has found; /// - an array of eight points, representing the best oriented bounding box (\f$ {\mathcal B}_b\f$) /// that the algorithm has constructed, which is related to (\f$ {\mathcal R}_b\f$) as it is @@ -203,8 +203,8 @@ void construct_oriented_bounding_box(Output& output, /// which is a useful function to construct a mesh from these points. /// /// Note that when returning an array of points, these points are constructed from the axis-aligned -/// bounding box and some precision loss should be expected if a kernel not providing exact constructions -/// is used. +/// 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 \cgalCite{cgal:cgm-fobbo-11}. @@ -213,8 +213,8 @@ void construct_oriented_bounding_box(Output& output, /// See above. /// /// \tparam PointRange a model of `Range` -/// \tparam Output `std::array` with `Point` being equivalent to the traits' `Point_3` type, -/// or `CGAL::Affine_transformation_3` with `K` being a kernel compatible with the point type. +/// \tparam Output either `std::array` with `Point` being equivalent to the traits' `Point_3` type, +/// or the traits' `Affine_transformation_3` type /// \tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" /// /// \param points the input points @@ -292,8 +292,8 @@ void oriented_bounding_box(const PointRange& points, /// Extracts the vertices of the mesh as a point range and calls the other overload. /// /// \tparam PolygonMesh a model of `VertexListGraph` -/// \tparam Output `std::array` with `Point` being equivalent to the traits' `Point_3` type, -/// or `CGAL::Affine_transformation_3` with `K` being a kernel compatible with the point type. +/// \tparam Output either `std::array` with `Point` being equivalent to the traits' `Point_3` type, +/// or the traits' `Affine_transformation_3` type /// \tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" /// /// \param pmesh the input mesh