From e9aa5b9b3b84f24faace3b68b5979ff1baa8e53a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Pa=C4=91en?= <49401914+ipadjen@users.noreply.github.com> Date: Fri, 29 Sep 2023 21:40:18 -0600 Subject: [PATCH] Replace vpmap constructor with np in Adaptive_sizing_field --- .../Adaptive_sizing_field.h | 61 ++++--------------- 1 file changed, 13 insertions(+), 48 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/Adaptive_sizing_field.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/Adaptive_sizing_field.h index df9f21fec20..61a9545d55e 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/Adaptive_sizing_field.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/Adaptive_sizing_field.h @@ -82,13 +82,21 @@ public: * edge lengths * @param face_range the range of triangular faces defining one or several surface patches * to be remeshed. It should be the same as the range of faces passed to `isotropic_remeshing()`. - * \param vpmap is the input vertex point map that associates points to the vertices of - * the input mesh. * @param pmesh a polygon mesh with triangulated surface patches to be remeshed. It should be the * same mesh as the one passed to `isotropic_remeshing()`. * @param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below * \cgalNamedParamsBegin + * \cgalParamNBegin{vertex_point_map} + * \cgalParamDescription{a property map associating points to the vertices of `pmesh`} + * \cgalParamType{a class model of `ReadWritePropertyMap` with + * `boost::graph_traits::%vertex_descriptor` + * as key type and `%Point_3` as value type} + * \cgalParamDefault{`boost::get(CGAL::vertex_point, pmesh)`} + * \cgalParamExtra{If this parameter is omitted, an internal property map for `CGAL::vertex_point_t` + * must be available in `PolygonMesh`.} + * \cgalParamNEnd + * * \cgalParamNBegin{ball_radius} * \cgalParamDescription{`ball_radius` parameter passed to `interpolated_corrected_curvatures()`} * \cgalParamNEnd @@ -99,13 +107,14 @@ public: Adaptive_sizing_field(const FT tol , const std::pair& edge_len_min_max , const FaceRange& face_range - , const VPMap& vpmap , PolygonMesh& pmesh , const NamedParameters& np = parameters::default_values()) : tol(tol) , m_short(edge_len_min_max.first) , m_long(edge_len_min_max.second) - , m_vpmap(vpmap) + , m_vpmap(parameters::choose_parameter( + parameters::get_parameter(np, internal_np::vertex_point), + get_property_map(vertex_point, pmesh))) , m_vertex_sizing_map(get(Vertex_property_tag(), pmesh)) { if (face_range.size() == faces(pmesh).size()) @@ -128,50 +137,6 @@ public: } } - /*! - * returns an object to serve as criteria for adaptive curvature-based edge lengths. It calls - * the first constructor using default values for the vertex point map of the input polygon mesh. - * - * @tparam FaceRange range of `boost::graph_traits::%face_descriptor`, - * model of `Range`. Its iterator type is `ForwardIterator`. - * @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" - * - * @param tol the error tolerance, used together with curvature to derive target edge length. - * Lower tolerance values will result in shorter mesh edges. - * @param edge_len_min_max is the stopping criterion for minimum and maximum allowed - * edge length. - * @param face_range the range of triangular faces defining one or several surface patches - * to be remeshed. It should be the same as the range of faces used for `isotropic_remeshing()`. - * @param pmesh a polygon mesh with triangulated surface patches to be remeshed. It should be the - * same mesh as the one used in `isotropic_remeshing()`. Additionally, the default vertex point - * map of pmesh is used to construct the class. - * @param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below - - * \cgalNamedParamsBegin - * \cgalParamNBegin{ball_radius} - * \cgalParamDescription{a scalar value specifying the radius used for expanding curvature measures. - * It can potentially smooth the curvature and consequently the sizing field in the - * case of noisy input.} - * \cgalParamDescription{a scalar value specifying the radius used for expanding curvature measures. - * It can effectively smooth the curvature field and consequently the sizing field.} - * \cgalParamType{`Base::FT`} - * \cgalParamDefault{`-1`} - * \cgalParamExtra{If this parameter is omitted (`-1`), the expansion will just by a weightless sum of - * measures on faces around the vertex.} - * \cgalParamNEnd - * \cgalNamedParamsEnd - */ - template - Adaptive_sizing_field(const FT tol - , const std::pair& edge_len_min_max - , const FaceRange& face_range - , PolygonMesh& pmesh - , const NamedParameters& np = parameters::default_values()) - : Adaptive_sizing_field(tol, edge_len_min_max, face_range, - get(CGAL::vertex_point, pmesh), pmesh, np) - {} - ///@} private: