diff --git a/Installation/changes.html b/Installation/changes.html index ae1f7c88017..e0431913e24 100644 --- a/Installation/changes.html +++ b/Installation/changes.html @@ -285,6 +285,9 @@ and src/ directories). max_distance_to_triangle_mesh(), max_distance_to_point_set(). +
  • + The function CGAL::Polygon_mesh_processing::bbox_3() has been renamed CGAL::Polygon_mesh_processing::bbox(). +
  • Point Set Processing

    diff --git a/Polygon_mesh_processing/doc/Polygon_mesh_processing/PackageDescription.txt b/Polygon_mesh_processing/doc/Polygon_mesh_processing/PackageDescription.txt index 7d0dd6a2cec..11ee3686682 100644 --- a/Polygon_mesh_processing/doc/Polygon_mesh_processing/PackageDescription.txt +++ b/Polygon_mesh_processing/doc/Polygon_mesh_processing/PackageDescription.txt @@ -153,10 +153,10 @@ and provides a list of the parameters that are used in this package. ## Miscellaneous ## - `CGAL::Polygon_mesh_slicer` - `CGAL::Side_of_triangle_mesh` -- `CGAL::Polygon_mesh_processing::bbox_3()` -- `CGAL::Polygon_mesh_processing::vertex_bbox_3()` -- `CGAL::Polygon_mesh_processing::edge_bbox_3()` -- `CGAL::Polygon_mesh_processing::face_bbox_3()` +- `CGAL::Polygon_mesh_processing::bbox()` +- `CGAL::Polygon_mesh_processing::vertex_bbox()` +- `CGAL::Polygon_mesh_processing::edge_bbox()` +- `CGAL::Polygon_mesh_processing::face_bbox()` - `CGAL::Polygon_mesh_processing::border_halfedges()` \todo add `clip_triangle_mesh()` using the code of `Polyhedron_place_clipping.h` and `PMP::corefine()` diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/bbox.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/bbox.h index 1f5fd89ae96..9fa7730f52b 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/bbox.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/bbox.h @@ -62,8 +62,8 @@ namespace CGAL { * @return a bounding box of `pmesh` */ template - CGAL::Bbox_3 bbox_3(const PolygonMesh& pmesh, - const CGAL_PMP_NP_CLASS& np) + CGAL::Bbox_3 bbox(const PolygonMesh& pmesh, + const CGAL_PMP_NP_CLASS& np) { using boost::choose_param; using boost::get_param; @@ -112,9 +112,9 @@ namespace CGAL { * @return a bounding box of `pmesh` */ template - CGAL::Bbox_3 vertex_bbox_3(typename boost::graph_traits::vertex_descriptor vd, - const PolygonMesh& pmesh, - const NamedParameters& np) + CGAL::Bbox_3 vertex_bbox(typename boost::graph_traits::vertex_descriptor vd, + const PolygonMesh& pmesh, + const NamedParameters& np) { using boost::choose_param; using boost::get_param; @@ -155,9 +155,9 @@ namespace CGAL { * @return a bounding box of `pmesh` */ template - CGAL::Bbox_3 edge_bbox_3(typename boost::graph_traits::edge_descriptor ed, - const PolygonMesh& pmesh, - const NamedParameters& np) + CGAL::Bbox_3 edge_bbox(typename boost::graph_traits::edge_descriptor ed, + const PolygonMesh& pmesh, + const NamedParameters& np) { using boost::choose_param; using boost::get_param; @@ -199,9 +199,9 @@ namespace CGAL { * @return a bounding box of `pmesh` */ template - CGAL::Bbox_3 face_bbox_3(typename boost::graph_traits::face_descriptor fd, - const PolygonMesh& pmesh, - const NamedParameters& np) + CGAL::Bbox_3 face_bbox(typename boost::graph_traits::face_descriptor fd, + const PolygonMesh& pmesh, + const NamedParameters& np) { using boost::choose_param; using boost::get_param; @@ -225,34 +225,53 @@ namespace CGAL { } template - CGAL::Bbox_3 vertex_bbox_3(typename boost::graph_traits::vertex_descriptor vd, + CGAL::Bbox_3 vertex_bbox(typename boost::graph_traits::vertex_descriptor vd, const PolygonMesh& pmesh) { - return vertex_bbox_3(vd, pmesh, + return vertex_bbox(vd, pmesh, CGAL::Polygon_mesh_processing::parameters::all_default()); } template - CGAL::Bbox_3 edge_bbox_3(typename boost::graph_traits::edge_descriptor ed, + CGAL::Bbox_3 edge_bbox(typename boost::graph_traits::edge_descriptor ed, const PolygonMesh& pmesh) { - return edge_bbox_3(ed, pmesh, + return edge_bbox(ed, pmesh, CGAL::Polygon_mesh_processing::parameters::all_default()); } template - CGAL::Bbox_3 face_bbox_3(typename boost::graph_traits::face_descriptor fd, + CGAL::Bbox_3 face_bbox(typename boost::graph_traits::face_descriptor fd, const PolygonMesh& pmesh) { - return face_bbox_3(fd, pmesh, + return face_bbox(fd, pmesh, CGAL::Polygon_mesh_processing::parameters::all_default()); } template - CGAL::Bbox_3 bbox_3(const PolygonMesh& pmesh) + CGAL::Bbox_3 bbox(const PolygonMesh& pmesh) { - return bbox_3(pmesh, + return bbox(pmesh, CGAL::Polygon_mesh_processing::parameters::all_default()); } + // deprecated function + #ifndef CGAL_NO_DEPRECATED_CODE + /*! + * \ingroup PkgPolygonMeshProcessing + * \deprecated This function is deprecated since \cgal 4.10, `CGAL::Polygon_mesh_processing::bbox()` should be used instead. + */ + template + CGAL_DEPRECATED CGAL::Bbox_3 bbox_3(const PolygonMesh& pmesh, + const CGAL_PMP_NP_CLASS& np) + { + return bbox(pmesh, np); + } + + template + CGAL_DEPRECATED CGAL::Bbox_3 bbox_3(const PolygonMesh& pmesh) + { + return bbox(pmesh); + } + #endif // CGAL_NO_DEPRECATED_CODE } } diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/clip.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/clip.h index 1ba7a85dcdb..f5af2d6bc69 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/clip.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/clip.h @@ -341,7 +341,7 @@ void clip( TriangleMesh& tm, bool close) { if( boost::begin(faces(tm))==boost::end(faces(tm)) ) return; - CGAL::Bbox_3 bbox = bbox_3(tm); + CGAL::Bbox_3 bbox = ::CGAL::Polygon_mesh_processing::bbox(tm); //extend the bbox a bit to avoid border cases double xd=(bbox.xmax()-bbox.xmin())/100; double yd=(bbox.ymax()-bbox.ymin())/100; diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/measures_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/measures_test.cpp index 16092ffcd22..2f57d425230 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/measures_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/measures_test.cpp @@ -95,22 +95,22 @@ void test_pmesh(const Mesh& pmesh) std::cout << "mesh area (NP) = " << mesh_area_np << std::endl; - CGAL::Bbox_3 bb = PMP::bbox_3(pmesh); + CGAL::Bbox_3 bb = PMP::bbox(pmesh); std::cout << "bbox x[" << bb.xmin() << "; " << bb.xmax() << "]" << std::endl; std::cout << " y[" << bb.ymin() << "; " << bb.ymax() << "]" << std::endl; std::cout << " z[" << bb.zmin() << "; " << bb.zmax() << "]" << std::endl; CGAL::Bbox_3 bb_v; BOOST_FOREACH(vertex_descriptor vd, vertices(pmesh)) - bb_v+=PMP::vertex_bbox_3(vd, pmesh); + bb_v+=PMP::vertex_bbox(vd, pmesh); CGAL::Bbox_3 bb_f; BOOST_FOREACH(face_descriptor fd, faces(pmesh)) - bb_f+=PMP::face_bbox_3(fd, pmesh); + bb_f+=PMP::face_bbox(fd, pmesh); CGAL::Bbox_3 bb_e; BOOST_FOREACH(edge_descriptor ed, edges(pmesh)) - bb_e+=PMP::edge_bbox_3(ed, pmesh); + bb_e+=PMP::edge_bbox(ed, pmesh); assert(bb==bb_v); assert(bb==bb_f); diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/point_inside_helpers.h b/Polygon_mesh_processing/test/Polygon_mesh_processing/point_inside_helpers.h index 8b3b5d5a548..cb8ca41ad26 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/point_inside_helpers.h +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/point_inside_helpers.h @@ -77,7 +77,7 @@ void random_points(const PolygonMesh& mesh, int n, OutputIterator out) { - CGAL::Bbox_3 bb = CGAL::Polygon_mesh_processing::bbox_3(mesh); + CGAL::Bbox_3 bb = CGAL::Polygon_mesh_processing::bbox(mesh); CGAL::Random rg(1340818006); // seed some value for make it easy to debug double grid_dx = bb.xmax() - bb.xmin();