diff --git a/Mesh_3/doc/Mesh_3/CGAL/Mesh_3/parameters.h b/Mesh_3/doc/Mesh_3/CGAL/Mesh_3/parameters.h index 6f773d0ab14..b068289faa4 100644 --- a/Mesh_3/doc/Mesh_3/CGAL/Mesh_3/parameters.h +++ b/Mesh_3/doc/Mesh_3/CGAL/Mesh_3/parameters.h @@ -454,22 +454,16 @@ unspecified_type perturb(const Named_function_parameters& np = parameters::defau /*! * \ingroup PkgMesh3Parameters * - * The function `parameters::initial_points_generator()` enables the user to - * specify a functor following the `InitialPointsGenerator` concept - * to the mesh generation function `make_mesh_3()`. - * The functor will be called for initialization of the meshing process. - * If this parameter is specified without arguments, the default behavior is executed, - * i.e. the domain's `construct_initial_points_object()` - * is called for the initialization of the meshing process. + * The function `parameters::initial_points_generator()` allows the user to specify a functor that follows the `InitialPointsGenerator` concept to the mesh generation function `make_mesh_3()`. This functor will be called for the initialization of the meshing process. If this parameter is specified without arguments, the default behavior is executed, which calls the domain's `construct_initial_points_object()` for the initialization of the meshing process. * - * \tparam InitialPointsGenerator a functor following the `InitialPointsGenerator` concept + * \tparam InitialPointsGenerator a functor that follows the `InitialPointsGenerator` concept * * @param generator an instance of the InitialPointsGenerator functor * * \cgalHeading{Example} * * \code{.cpp} - * // Mesh generation from labeled image with connexity checks. + * // Mesh generation from a labeled image with connexity checks. * C3t3 c3t3 = make_mesh_3(domain, * criteria, * parameters::initial_points_generator(CGAL::Construct_initial_points_labeled_image(image))); @@ -485,30 +479,22 @@ unspecified_type initial_points_generator(const InitialPointsGenerator& generato /*! * \ingroup PkgMesh3Parameters * - * The function `parameters::initial_points()` enables the user to - * specify a container model of `Range` of initial points - * to the mesh generation function `make_mesh_3()`. - * The initial points `Range` has elements of type - * `std::tuple` where - * `Weighted_point_3` contains the point's position and weight, - * `int` is the dimension of the minimal dimension subcomplex on which the point lies, and - * `Index` is the underlying subcomplex index. + * The function `parameters::initial_points()` allows the user to specify a container model of `Range` that contains initial points to be used in the `make_mesh_3()` function for mesh generation. The `Range` should have elements of type `std::tuple`, where `Weighted_point_3` represents the position and weight of the point, `int` represents the dimension of the minimal subcomplex on which the point lies, and `Index` represents the underlying subcomplex index. * - * \tparam MeshDomain model of `MeshDomain_3` - * \tparam C3t3 model of `MeshComplex_3InTriangulation_3` + * \tparam MeshDomain a model of `MeshDomain_3` + * \tparam C3t3 a model of `MeshComplex_3InTriangulation_3` * - * @param initial_points a `Range` containing points of type - * `std::tuple` + * @param initial_points a `Range` that contains points of type `std::tuple` * * \cgalHeading{Example} * * \code{.cpp} - * // Creation of the initial_points vector + * // Create the initial_points vector * std::vector> initial_points; - * // Mesh generation from labeled image with initial points. + * // Perform mesh generation from a labeled image with initial points * C3t3 c3t3 = make_mesh_3(domain, * criteria, - * parameters::initial_points(std::cref(initial_points));//use std::cref to avoid a copy + * parameters::initial_points(std::cref(initial_points))); // Use std::cref to avoid a copy * \endcode * * \sa `CGAL::parameters::initial_points_generator()` diff --git a/Mesh_3/doc/Mesh_3/PackageDescription.txt b/Mesh_3/doc/Mesh_3/PackageDescription.txt index da633ea03eb..c94fd737b7d 100644 --- a/Mesh_3/doc/Mesh_3/PackageDescription.txt +++ b/Mesh_3/doc/Mesh_3/PackageDescription.txt @@ -129,7 +129,7 @@ The following functors are available for mesh initialization: - `CGAL::odt_optimize_mesh_3()` - `CGAL::Mesh_3::generate_label_weights()` -\cgalCRPSection{CGAL::parameters Functions} +\cgalCRPSection{%CGAL::parameters Functions} - `CGAL::parameters::features()` - `CGAL::parameters::no_features()` diff --git a/Mesh_3/examples/Mesh_3/mesh_3D_image_with_custom_initialization.cpp b/Mesh_3/examples/Mesh_3/mesh_3D_image_with_custom_initialization.cpp index 7b82e482771..8ba0e155f2f 100644 --- a/Mesh_3/examples/Mesh_3/mesh_3D_image_with_custom_initialization.cpp +++ b/Mesh_3/examples/Mesh_3/mesh_3D_image_with_custom_initialization.cpp @@ -46,7 +46,7 @@ struct Custom_Initial_points_generator Custom_Initial_points_generator(CGAL::Image_3& image) : image_(image) { } template - OutputIterator operator()(OutputIterator pts, const MeshDomain& domain, const C3t3& c3t3, int n = 1) const + OutputIterator operator()(OutputIterator pts, const MeshDomain& /* domain */, const C3t3& c3t3, int /* n */ = 1) const { typedef typename C3t3::Triangulation::Geom_traits::Point_3 Point_3; typedef typename C3t3::Triangulation::Geom_traits::Vector_3 Vector_3; diff --git a/Mesh_3/include/CGAL/Mesh_3/Construct_initial_points_gray_image.h b/Mesh_3/include/CGAL/Mesh_3/Construct_initial_points_gray_image.h index bef74411440..a692c72cbc8 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Construct_initial_points_gray_image.h +++ b/Mesh_3/include/CGAL/Mesh_3/Construct_initial_points_gray_image.h @@ -24,17 +24,17 @@ namespace CGAL { /*! -* \ingroup PkgMesh3Initializers -* -* Functor for initial points generation in gray images. -* This functor is a model of concept `InitialPointsGenerator`, -* and thus can be passed to `CGAL::make_mesh_3` with the parameter -* `CGAL::parameters::initial_points_generator()` -* -* \sa `CGAL::parameters::initial_points_generator()` -* \sa `CGAL::make_mesh_3()` -* \sa `CGAL::Construct_initial_points_labeled_image` -*/ + * \ingroup PkgMesh3Initializers + * + * Functor for generating initial points in gray images. + * This functor is a model of the `InitialPointsGenerator` concept, + * and can be passed as a parameter to `CGAL::make_mesh_3` using the + * `CGAL::parameters::initial_points_generator()` parameter function. + * + * \sa `CGAL::parameters::initial_points_generator()` + * \sa `CGAL::make_mesh_3()` + * \sa `CGAL::Construct_initial_points_labeled_image` + */ template struct Construct_initial_points_gray_image { @@ -50,15 +50,14 @@ struct Construct_initial_points_gray_image , iso_value_(iso_value) , image_values_to_subdomain_indices_(image_values_to_subdomain_indices) { } - - /*! - * \brief Constructs the initial points using the gray image. - * - * @tparam OutputIterator an `OutputIterator` of points of type - * `std::tuple` - * @tparam MeshDomain a model of `MeshDomain_3` - * @tparam C3t3 a model of `MeshComplex_3InTriangulation_3` - */ + /*! + * \brief Constructs the initial points using the gray image. + * + * \tparam OutputIterator An `OutputIterator` of points of type + * `std::tuple`. + * \tparam MeshDomain A model of `MeshDomain_3`. + * \tparam C3t3 A model of `MeshComplex_3InTriangulation_3`. + */ template OutputIterator operator()(OutputIterator pts, const MeshDomain& domain, const C3t3& c3t3, int n = 20) const { diff --git a/Mesh_3/include/CGAL/Mesh_3/Construct_initial_points_labeled_image.h b/Mesh_3/include/CGAL/Mesh_3/Construct_initial_points_labeled_image.h index f9cf60d1a8a..1b804f4dbdf 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Construct_initial_points_labeled_image.h +++ b/Mesh_3/include/CGAL/Mesh_3/Construct_initial_points_labeled_image.h @@ -71,17 +71,17 @@ struct Get_point } // end namespace Mesh_3 /*! -* \ingroup PkgMesh3Initializers -* -* Functor for initial points generation in labeled images. -* This functor is a model of concept `InitialPointsGenerator`, -* and thus can be passed to `CGAL::make_mesh_3` with the parameter -* `CGAL::parameters::initial_points_generator()` -* -* \sa `CGAL::parameters::initial_points_generator()` -* \sa `CGAL::make_mesh_3()` -* \sa `CGAL::Construct_initial_points_gray_image` -*/ + * \ingroup PkgMesh3Initializers + * + * Functor for generating initial points in labeled images. + * This functor is a model of the `InitialPointsGenerator` concept, + * and can be passed as a parameter to `CGAL::make_mesh_3` using the + * `CGAL::parameters::initial_points_generator()` function. + * + * \sa `CGAL::parameters::initial_points_generator()` + * \sa `CGAL::make_mesh_3()` + * \sa `CGAL::Construct_initial_points_gray_image` + */ struct Construct_initial_points_labeled_image { const CGAL::Image_3 & image; @@ -90,15 +90,15 @@ struct Construct_initial_points_labeled_image : image(image_) { } - /*! - * \brief Constructs points by collecting them in all connected components. - * This guarantees to initialize them all. - * - * @tparam OutputIterator model of `OutputIterator`, containing points of type - * `std::tuple` - * @tparam MeshDomain model of `MeshDomain_3` - * @tparam C3t3 model of `MeshComplex_3InTriangulation_3` - */ + /*! + * \brief Constructs points by collecting them from all connected components. + * This ensures that all points are initialized. + * + * @tparam OutputIterator a model of `OutputIterator` that contains points of type + * `std::tuple` + * @tparam MeshDomain a model of `MeshDomain_3` + * @tparam C3t3 a model of `MeshComplex_3InTriangulation_3` + */ template OutputIterator operator()(OutputIterator pts, const MeshDomain& domain, const C3t3& c3t3, int n = 20) const { @@ -107,18 +107,18 @@ struct Construct_initial_points_labeled_image } /*! - * \brief Same as above, but a `TransformOperator` is used + * \brief Same as above, but a `TransformOperator` is used. * - * @tparam OutputIterator model of `OutputIterator`, containing points of type - * `std::tuple` - * @tparam MeshDomain model of `MeshDomain_3` - * @tparam TransformOperator functor that transforms values of the image. + * @tparam OutputIterator A model of `OutputIterator` that contains points of type + * `std::tuple`. + * @tparam MeshDomain A model of `MeshDomain_3`. + * @tparam TransformOperator A functor that transforms values of the image. * It must provide the following type:
* `result_type`
* and the following operator:
* `template`
- * `result_type operator()(FT v)` - * @tparam C3t3 model of `MeshComplex_3InTriangulation_3` + * `result_type operator()(FT v)`. + * @tparam C3t3 A model of `MeshComplex_3InTriangulation_3`. */ template OutputIterator operator()(OutputIterator pts, const MeshDomain& domain, TransformOperator transform, const C3t3& c3t3, int n = 20) const @@ -187,10 +187,10 @@ struct Construct_initial_points_labeled_image const double radius = double(seed.radius + 1)* max_v; CGAL::Random_points_on_sphere_3 points_on_sphere_3(radius); - /// \noop [construct intersection] + // [construct intersection] typename MeshDomain::Construct_intersection construct_intersection = domain.construct_intersection_object(); - /// \noop [construct intersection] + // [construct intersection] std::vector directions; if(seed.radius < 2) { @@ -214,16 +214,16 @@ struct Construct_initial_points_labeled_image const Point_3 test = seed_point + v; const Segment_3 test_segment = Segment_3(seed_point, test); - /// \noop [use construct intersection] + // [use construct intersection] const typename MeshDomain::Intersection intersect = construct_intersection(test_segment); - /// \noop [use construct intersection] + // [use construct intersection] if (std::get<2>(intersect) != 0) { - /// \noop [get construct intersection] + // [get construct intersection] const Point_3& intersect_point = std::get<0>(intersect); const Index& intersect_index = std::get<1>(intersect); - /// \noop [get construct intersection] + // [get construct intersection] Weighted_point pi = Weighted_point(intersect_point); // This would cause trouble to optimizers diff --git a/STL_Extension/include/CGAL/STL_Extension/internal/mesh_option_classes.h b/STL_Extension/include/CGAL/STL_Extension/internal/mesh_option_classes.h index 659ed137860..201c50e1e4f 100644 --- a/STL_Extension/include/CGAL/STL_Extension/internal/mesh_option_classes.h +++ b/STL_Extension/include/CGAL/STL_Extension/internal/mesh_option_classes.h @@ -14,7 +14,7 @@ #include #include -#include +#include namespace CGAL { @@ -187,20 +187,20 @@ struct Input_const_iterator_container public: Input_const_iterator_container(const Iterator& it) : it_(it) {} - virtual ~Input_const_iterator_container() {} + ~Input_const_iterator_container() override {} - virtual const Value& operator*() + const Value& operator*() override { return *it_; } - virtual Input_const_iterator_interface* operator++() + Input_const_iterator_interface* operator++() override { ++it_; return this; } - virtual bool operator!=(const Input_const_iterator_interface* other) const + bool operator!=(const Input_const_iterator_interface* other) const override { const Self* other_casted = dynamic_cast(other); if (other_casted == nullptr) @@ -208,7 +208,7 @@ public: return it_ != other_casted->it_; } - virtual Input_const_iterator_interface* clone() + Input_const_iterator_interface* clone() override { return new Input_const_iterator_container(it_); }