diff --git a/Polygon_mesh_processing/doc/Polygon_mesh_processing/PackageDescription.txt b/Polygon_mesh_processing/doc/Polygon_mesh_processing/PackageDescription.txt index f5bb6f56231..f82c5af569e 100644 --- a/Polygon_mesh_processing/doc/Polygon_mesh_processing/PackageDescription.txt +++ b/Polygon_mesh_processing/doc/Polygon_mesh_processing/PackageDescription.txt @@ -129,7 +129,6 @@ The page \ref bgl_namedparameters "Named Parameters" describes their usage. - `CGAL::Polygon_mesh_processing::smooth_mesh()` (deprecated) - `CGAL::Polygon_mesh_processing::angle_and_area_smoothing()` - `CGAL::Polygon_mesh_processing::tangential_relaxation()` -- `CGAL::Polygon_mesh_processing::tangential_relaxation_with_sizing()` - `CGAL::Polygon_mesh_processing::smooth_shape()` - `CGAL::Polygon_mesh_processing::random_perturbation()` diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h index 3e59249af72..499bbd6c4e3 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h @@ -1071,7 +1071,7 @@ namespace internal { std::cout << " using tangential relaxation weighted with the sizing field"; std::cout << std::endl; #endif - tangential_relaxation_with_sizing( + tangential_relaxation( vertices(mesh_), mesh_, sizing, diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/tangential_relaxation.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/tangential_relaxation.h index a77c5f1595b..ae257f9eb57 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/tangential_relaxation.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/tangential_relaxation.h @@ -119,10 +119,12 @@ struct Allow_all_moves{ * * \todo check if it should really be a triangle mesh or if a polygon mesh is fine */ -template +template void tangential_relaxation(const VertexRange& vertices, TriangleMesh& tm, - const NamedParameters& np = parameters::default_values()) + const CGAL_NP_CLASS& np = parameters::default_values()) { typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; @@ -131,17 +133,17 @@ void tangential_relaxation(const VertexRange& vertices, using parameters::get_parameter; using parameters::choose_parameter; - typedef typename GetGeomTraits::type GT; + typedef typename GetGeomTraits::type GT; GT gt = choose_parameter(get_parameter(np, internal_np::geom_traits), GT()); - typedef typename GetVertexPointMap::type VPMap; + typedef typename GetVertexPointMap::type VPMap; VPMap vpm = choose_parameter(get_parameter(np, internal_np::vertex_point), get_property_map(vertex_point, tm)); typedef Static_boolean_property_map Default_ECM; typedef typename internal_np::Lookup_named_param_def < internal_np::edge_is_constrained_t, - NamedParameters, + CGAL_NP_CLASS, Static_boolean_property_map // default (no constraint) > ::type ECM; ECM ecm = choose_parameter(get_parameter(np, internal_np::edge_is_constrained), @@ -149,7 +151,7 @@ void tangential_relaxation(const VertexRange& vertices, typedef typename internal_np::Lookup_named_param_def < internal_np::vertex_is_constrained_t, - NamedParameters, + CGAL_NP_CLASS, Static_boolean_property_map // default (no constraint) > ::type VCM; VCM vcm = choose_parameter(get_parameter(np, internal_np::vertex_is_constrained), @@ -201,7 +203,7 @@ void tangential_relaxation(const VertexRange& vertices, typedef typename internal_np::Lookup_named_param_def < internal_np::allow_move_functor_t, - NamedParameters, + CGAL_NP_CLASS, internal::Allow_all_moves// default > ::type Shall_move; Shall_move shall_move = choose_parameter(get_parameter(np, internal_np::allow_move_functor), @@ -281,8 +283,6 @@ void tangential_relaxation(const VertexRange& vertices, bary = squared_distance(p1, bary) -void tangential_relaxation_with_sizing(const VertexRange& vertices, - TriangleMesh& tm, - const SizingFunction& sizing, - const NamedParameters& np = parameters::default_values()) + typename CGAL_NP_TEMPLATE_PARAMETERS> +void tangential_relaxation(const VertexRange& vertices, + TriangleMesh& tm, + const SizingFunction& sizing, + const CGAL_NP_CLASS& np = parameters::default_values()) { typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; @@ -430,17 +430,17 @@ void tangential_relaxation_with_sizing(const VertexRange& vertices, using parameters::get_parameter; using parameters::choose_parameter; - typedef typename GetGeomTraits::type GT; + typedef typename GetGeomTraits::type GT; GT gt = choose_parameter(get_parameter(np, internal_np::geom_traits), GT()); - typedef typename GetVertexPointMap::type VPMap; + typedef typename GetVertexPointMap::type VPMap; VPMap vpm = choose_parameter(get_parameter(np, internal_np::vertex_point), get_property_map(vertex_point, tm)); typedef Static_boolean_property_map Default_ECM; typedef typename internal_np::Lookup_named_param_def < internal_np::edge_is_constrained_t, - NamedParameters, + CGAL_NP_CLASS, Static_boolean_property_map // default (no constraint) > ::type ECM; ECM ecm = choose_parameter(get_parameter(np, internal_np::edge_is_constrained), @@ -448,7 +448,7 @@ void tangential_relaxation_with_sizing(const VertexRange& vertices, typedef typename internal_np::Lookup_named_param_def < internal_np::vertex_is_constrained_t, - NamedParameters, + CGAL_NP_CLASS, Static_boolean_property_map // default (no constraint) > ::type VCM; VCM vcm = choose_parameter(get_parameter(np, internal_np::vertex_is_constrained), @@ -500,7 +500,7 @@ void tangential_relaxation_with_sizing(const VertexRange& vertices, typedef typename internal_np::Lookup_named_param_def < internal_np::allow_move_functor_t, - NamedParameters, + CGAL_NP_CLASS, internal::Allow_all_moves// default > ::type Shall_move; Shall_move shall_move = choose_parameter(get_parameter(np, internal_np::allow_move_functor), @@ -634,7 +634,8 @@ void tangential_relaxation_with_sizing(const VertexRange& vertices, */ template -void tangential_relaxation(TriangleMesh& tm, const CGAL_NP_CLASS& np = parameters::default_values()) +void tangential_relaxation(TriangleMesh& tm, + const CGAL_NP_CLASS& np = parameters::default_values()) { tangential_relaxation(vertices(tm), tm, np); } @@ -642,11 +643,11 @@ void tangential_relaxation(TriangleMesh& tm, const CGAL_NP_CLASS& np = parameter template -void tangential_relaxation_with_sizing(TriangleMesh& tm, - const SizingFunction& sizing, - const CGAL_NP_CLASS& np = parameters::default_values()) +void tangential_relaxation(TriangleMesh& tm, + const SizingFunction& sizing, + const CGAL_NP_CLASS& np = parameters::default_values()) { - tangential_relaxation_with_sizing(vertices(tm), tm, sizing, np); + tangential_relaxation(vertices(tm), tm, sizing, np); } } } // CGAL::Polygon_mesh_processing