diff --git a/BGL/include/CGAL/boost/graph/named_params_helper.h b/BGL/include/CGAL/boost/graph/named_params_helper.h index e80cae78072..948de5dded6 100644 --- a/BGL/include/CGAL/boost/graph/named_params_helper.h +++ b/BGL/include/CGAL/boost/graph/named_params_helper.h @@ -336,7 +336,7 @@ struct Point_set_processing_3_np_helper return parameters::choose_parameter(parameters::get_parameter(np, internal_np::geom_traits)); } - static constexpr bool has_normal_map(const PointRange&, const NamedParameters&) + static constexpr bool has_normal_map() { using CGAL::parameters::is_default_parameter; return !(is_default_parameter::value); diff --git a/Point_set_3/include/CGAL/Point_set_3.h b/Point_set_3/include/CGAL/Point_set_3.h index fc1da7fe601..539c75e7db6 100644 --- a/Point_set_3/include/CGAL/Point_set_3.h +++ b/Point_set_3/include/CGAL/Point_set_3.h @@ -1357,9 +1357,9 @@ struct Point_set_processing_3_np_helper, NamedParamet return parameters::choose_parameter(parameters::get_parameter(np, internal_np::geom_traits)); } - static constexpr bool has_normal_map(const Point_set_3&, const NamedParameters&) + static constexpr bool has_normal_map() { - return true;//either available in np, or in point set + return true; // either available in named parameters, and always available in Point_set_3 otherwise } }; diff --git a/Point_set_processing_3/include/CGAL/IO/read_ply_points.h b/Point_set_processing_3/include/CGAL/IO/read_ply_points.h index dd780cc6436..fad8715c3fc 100644 --- a/Point_set_processing_3/include/CGAL/IO/read_ply_points.h +++ b/Point_set_processing_3/include/CGAL/IO/read_ply_points.h @@ -262,8 +262,8 @@ bool read_PLY(std::istream& is, NormalMap normal_map = NP_helper::get_normal_map(np); return read_PLY_with_properties(is, output, - make_ply_point_reader(point_map), - make_ply_normal_reader(normal_map)); + make_ply_point_reader(point_map), + make_ply_normal_reader(normal_map)); } /** diff --git a/Point_set_processing_3/include/CGAL/IO/write_off_points.h b/Point_set_processing_3/include/CGAL/IO/write_off_points.h index 2fb38456379..a3435090bb8 100644 --- a/Point_set_processing_3/include/CGAL/IO/write_off_points.h +++ b/Point_set_processing_3/include/CGAL/IO/write_off_points.h @@ -46,7 +46,7 @@ bool write_OFF_PSP(std::ostream& os, typedef typename NP_helper::Const_point_map PointMap; typedef typename NP_helper::Normal_map NormalMap; - bool has_normals = NP_helper::has_normal_map(points, np); + bool has_normals = NP_helper::has_normal_map(); PointMap point_map = NP_helper::get_const_point_map(points, np); NormalMap normal_map = NP_helper::get_normal_map(points, np); diff --git a/Point_set_processing_3/include/CGAL/IO/write_ply_points.h b/Point_set_processing_3/include/CGAL/IO/write_ply_points.h index d151871a541..38b361ff779 100644 --- a/Point_set_processing_3/include/CGAL/IO/write_ply_points.h +++ b/Point_set_processing_3/include/CGAL/IO/write_ply_points.h @@ -201,7 +201,7 @@ bool write_PLY(std::ostream& os, typedef typename NP_helper::Const_point_map PointMap; typedef typename NP_helper::Normal_map NormalMap; - bool has_normals = NP_helper::has_normal_map(points, np); + bool has_normals = NP_helper::has_normal_map(); PointMap point_map = NP_helper::get_const_point_map(points, np); NormalMap normal_map = NP_helper::get_normal_map(points, np); diff --git a/Point_set_processing_3/include/CGAL/IO/write_xyz_points.h b/Point_set_processing_3/include/CGAL/IO/write_xyz_points.h index b98ebb247df..73610c9545f 100644 --- a/Point_set_processing_3/include/CGAL/IO/write_xyz_points.h +++ b/Point_set_processing_3/include/CGAL/IO/write_xyz_points.h @@ -47,7 +47,7 @@ bool write_XYZ_PSP(std::ostream& os, typedef typename NP_helper::Const_point_map PointMap; typedef typename NP_helper::Normal_map NormalMap; - bool has_normals = NP_helper::has_normal_map(points, np); + bool has_normals = NP_helper::has_normal_map(); PointMap point_map = NP_helper::get_const_point_map(points, np); NormalMap normal_map = NP_helper::get_normal_map(points, np); diff --git a/Point_set_processing_3/include/CGAL/bilateral_smooth_point_set.h b/Point_set_processing_3/include/CGAL/bilateral_smooth_point_set.h index 5c1d2d7cf25..86fa5d23b19 100644 --- a/Point_set_processing_3/include/CGAL/bilateral_smooth_point_set.h +++ b/Point_set_processing_3/include/CGAL/bilateral_smooth_point_set.h @@ -278,7 +278,7 @@ bilateral_smooth_point_set( typedef typename Kernel::Point_3 Point_3; typedef typename Kernel::Vector_3 Vector_3; - CGAL_assertion_msg(NP_helper::has_normal_map(points, np), "Error: no normal map"); + CGAL_static_assertion_msg(NP_helper::has_normal_map(), "Error: no normal map"); typedef typename Kernel::FT FT; diff --git a/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h b/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h index 7bcb43eaf8f..507418d45b8 100644 --- a/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h +++ b/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h @@ -367,7 +367,7 @@ edge_aware_upsample_point_set( typedef typename NP_helper::Geom_traits Kernel; - CGAL_assertion_msg(NP_helper::has_normal_map(points, np), "Error: no normal map"); + CGAL_static_assertion_msg(NP_helper::has_normal_map(), "Error: no normal map"); typedef typename Kernel::Point_3 Point; typedef typename Kernel::Vector_3 Vector; diff --git a/Point_set_processing_3/include/CGAL/jet_estimate_normals.h b/Point_set_processing_3/include/CGAL/jet_estimate_normals.h index 092c479c53d..da74d6e93ee 100644 --- a/Point_set_processing_3/include/CGAL/jet_estimate_normals.h +++ b/Point_set_processing_3/include/CGAL/jet_estimate_normals.h @@ -196,7 +196,7 @@ jet_estimate_normals( typedef typename Kernel::FT FT; typedef typename GetSvdTraits::type SvdTraits; - CGAL_assertion_msg(NP_helper::has_normal_map(points, np), "Error: no normal map"); + CGAL_static_assertion_msg(NP_helper::has_normal_map(), "Error: no normal map"); CGAL_static_assertion_msg(!(boost::is_same::NoTraits>::value), "Error: no SVD traits"); diff --git a/Point_set_processing_3/include/CGAL/mst_orient_normals.h b/Point_set_processing_3/include/CGAL/mst_orient_normals.h index 18be66609e5..909dc37a63d 100644 --- a/Point_set_processing_3/include/CGAL/mst_orient_normals.h +++ b/Point_set_processing_3/include/CGAL/mst_orient_normals.h @@ -631,7 +631,7 @@ mst_orient_normals( typedef typename NP_helper::Geom_traits Kernel; typedef typename Point_set_processing_3::GetIsConstrainedMap::type ConstrainedMap; - CGAL_assertion_msg(NP_helper::has_normal_map(points, np), "Error: no normal map"); + CGAL_static_assertion_msg(NP_helper::has_normal_map(), "Error: no normal map"); PointMap point_map = NP_helper::get_point_map(points, np); NormalMap normal_map = NP_helper::get_normal_map(points, np); diff --git a/Point_set_processing_3/include/CGAL/pca_estimate_normals.h b/Point_set_processing_3/include/CGAL/pca_estimate_normals.h index 9c4f5cde3e6..8447ae952ff 100644 --- a/Point_set_processing_3/include/CGAL/pca_estimate_normals.h +++ b/Point_set_processing_3/include/CGAL/pca_estimate_normals.h @@ -168,7 +168,7 @@ pca_estimate_normals( typedef typename NP_helper::Geom_traits Kernel; typedef typename Kernel::FT FT; - CGAL_assertion_msg(NP_helper::has_normal_map(points, np), "Error: no normal map"); + CGAL_static_assertion_msg(NP_helper::has_normal_map(), "Error: no normal map"); PointMap point_map = NP_helper::get_point_map(points, np); NormalMap normal_map = NP_helper::get_normal_map(points, np); diff --git a/Point_set_processing_3/include/CGAL/scanline_orient_normals.h b/Point_set_processing_3/include/CGAL/scanline_orient_normals.h index 272ce021158..02f956f2416 100644 --- a/Point_set_processing_3/include/CGAL/scanline_orient_normals.h +++ b/Point_set_processing_3/include/CGAL/scanline_orient_normals.h @@ -478,7 +478,7 @@ void scanline_orient_normals (PointRange& points, const NamedParameters& np = pa ::type; using Fallback_scanline_ID = Boolean_tag::value>; - CGAL_assertion_msg(NP_helper::has_normal_map(points, np), "Error: no normal map"); + CGAL_static_assertion_msg(NP_helper::has_normal_map(), "Error: no normal map"); PointMap point_map = NP_helper::get_point_map(points, np); NormalMap normal_map = NP_helper::get_normal_map(points, np); diff --git a/Point_set_processing_3/include/CGAL/structure_point_set.h b/Point_set_processing_3/include/CGAL/structure_point_set.h index 5930d4b08f0..f0a9fc34c86 100644 --- a/Point_set_processing_3/include/CGAL/structure_point_set.h +++ b/Point_set_processing_3/include/CGAL/structure_point_set.h @@ -234,7 +234,7 @@ public: typedef typename Point_set_processing_3::GetPlaneMap::type PlaneMap; typedef typename Point_set_processing_3::GetPlaneIndexMap::type PlaneIndexMap; - CGAL_assertion_msg(NP_helper::has_normal_map(points, np), "Error: no normal map"); + CGAL_static_assertion_msg(NP_helper::has_normal_map(), "Error: no normal map"); CGAL_static_assertion_msg((!is_default_parameter::value), "Error: no plane index map"); diff --git a/Point_set_processing_3/include/CGAL/vcm_estimate_normals.h b/Point_set_processing_3/include/CGAL/vcm_estimate_normals.h index de0c26d68f6..5b69f3ef0f9 100644 --- a/Point_set_processing_3/include/CGAL/vcm_estimate_normals.h +++ b/Point_set_processing_3/include/CGAL/vcm_estimate_normals.h @@ -321,7 +321,7 @@ vcm_estimate_normals_internal (PointRange& points, typedef typename NP_helper::Geom_traits Kernel; typedef typename GetDiagonalizeTraits::type DiagonalizeTraits; - CGAL_assertion_msg(NP_helper::has_normal_map(points, np), "Error: no normal map"); + CGAL_static_assertion_msg(NP_helper::has_normal_map(), "Error: no normal map"); PointMap point_map = NP_helper::get_point_map(points, np); NormalMap normal_map = NP_helper::get_normal_map(points, np);