mirror of https://github.com/CGAL/cgal
Merge branch 'PSP-fix_has_normal_map-GF' of https://github.com/janetournois/cgal into PSP-fix_has_normal_map-GF
This commit is contained in:
commit
826b2a19c4
|
|
@ -336,7 +336,7 @@ struct Point_set_processing_3_np_helper
|
|||
return parameters::choose_parameter<Geom_traits>(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<NamedParameters, internal_np::normal_t>::value);
|
||||
|
|
|
|||
|
|
@ -1357,9 +1357,9 @@ struct Point_set_processing_3_np_helper<Point_set_3<Point, Vector>, NamedParamet
|
|||
return parameters::choose_parameter<Geom_traits>(parameters::get_parameter(np, internal_np::geom_traits));
|
||||
}
|
||||
|
||||
static constexpr bool has_normal_map(const Point_set_3<Point, Vector>&, 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
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -196,7 +196,7 @@ jet_estimate_normals(
|
|||
typedef typename Kernel::FT FT;
|
||||
typedef typename GetSvdTraits<NamedParameters>::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<SvdTraits,
|
||||
typename GetSvdTraits<NamedParameters>::NoTraits>::value),
|
||||
"Error: no SVD traits");
|
||||
|
|
|
|||
|
|
@ -631,7 +631,7 @@ mst_orient_normals(
|
|||
typedef typename NP_helper::Geom_traits Kernel;
|
||||
typedef typename Point_set_processing_3::GetIsConstrainedMap<PointRange, NamedParameters>::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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -478,7 +478,7 @@ void scanline_orient_normals (PointRange& points, const NamedParameters& np = pa
|
|||
<internal_np::scanline_id_t, NamedParameters, No_map>::type;
|
||||
using Fallback_scanline_ID = Boolean_tag<std::is_same<ScanlineIDMap, No_map>::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);
|
||||
|
|
|
|||
|
|
@ -234,7 +234,7 @@ public:
|
|||
typedef typename Point_set_processing_3::GetPlaneMap<PlaneRange, NamedParameters>::type PlaneMap;
|
||||
typedef typename Point_set_processing_3::GetPlaneIndexMap<NamedParameters>::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<NamedParameters, internal_np::plane_index_t>::value),
|
||||
"Error: no plane index map");
|
||||
|
||||
|
|
|
|||
|
|
@ -321,7 +321,7 @@ vcm_estimate_normals_internal (PointRange& points,
|
|||
typedef typename NP_helper::Geom_traits Kernel;
|
||||
typedef typename GetDiagonalizeTraits<NamedParameters, double, 3>::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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue