diff --git a/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/PS_demo_normal_estimation_plugin.cpp b/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/PS_demo_normal_estimation_plugin.cpp index 075af85b1e4..e5f166ceb02 100644 --- a/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/PS_demo_normal_estimation_plugin.cpp +++ b/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/PS_demo_normal_estimation_plugin.cpp @@ -127,7 +127,12 @@ void PS_demo_normal_estimation_plugin::on_actionNormalEstimation_triggered() // Estimates normals direction. CGAL::pca_estimate_normals(points->begin(), points->end(), - CGAL::make_normal_of_point_with_normal_pmap(points->begin()), +#ifdef CGAL_USE_OLD_PAIR_PROPERTY_MAPS + CGAL::make_normal_of_point_with_normal_pmap(points->begin()), +#else + CGAL::make_normal_of_point_with_normal_pmap(Point_set::value_type()), +#endif + dialog.directionNbNeighbors()); // Mark all normals as unoriented @@ -145,7 +150,11 @@ void PS_demo_normal_estimation_plugin::on_actionNormalEstimation_triggered() // Estimates normals direction. CGAL::jet_estimate_normals(points->begin(), points->end(), - CGAL::make_normal_of_point_with_normal_pmap(points->begin()), +#ifdef CGAL_USE_OLD_PAIR_PROPERTY_MAPS + CGAL::make_normal_of_point_with_normal_pmap(points->begin()), +#else + CGAL::make_normal_of_point_with_normal_pmap(Point_set::value_type()), +#endif dialog.directionNbNeighbors()); // Mark all normals as unoriented @@ -167,7 +176,11 @@ void PS_demo_normal_estimation_plugin::on_actionNormalEstimation_triggered() // Tries to orient normals first_unoriented_point = CGAL::mst_orient_normals(points->begin(), points->end(), - CGAL::make_normal_of_point_with_normal_pmap(points->begin()), +#ifdef CGAL_USE_OLD_PAIR_PROPERTY_MAPS + CGAL::make_normal_of_point_with_normal_pmap(points->begin()), +#else + CGAL::make_normal_of_point_with_normal_pmap(Point_set::value_type()), +#endif dialog.orientationNbNeighbors()); int nb_unoriented_normals = std::distance(first_unoriented_point, points->end()); diff --git a/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/PS_demo_poisson_plugin_cgal_code.cpp b/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/PS_demo_poisson_plugin_cgal_code.cpp index 751af7822cc..26f58658ce5 100644 --- a/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/PS_demo_poisson_plugin_cgal_code.cpp +++ b/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/PS_demo_poisson_plugin_cgal_code.cpp @@ -89,8 +89,13 @@ Polyhedron* poisson_reconstruct(const Point_set& points, // + property maps to access each point's position and normal. // The position property map can be omitted here as we use iterators over Point_3 elements. Poisson_reconstruction_function function( - points.begin(), points.end(), - CGAL::make_normal_of_point_with_normal_pmap(points.begin()) ); + points.begin(), points.end(), +#ifdef CGAL_USE_OLD_PAIR_PROPERTY_MAPS + CGAL::make_normal_of_point_with_normal_pmap(points.begin()) +#else + CGAL::make_normal_of_point_with_normal_pmap(Point_set::value_type()) +#endif + ); bool ok = false; #ifdef CGAL_TAUCS_ENABLED diff --git a/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/Point_set_scene_item.cpp b/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/Point_set_scene_item.cpp index 3865f3d2219..4a5b370f433 100644 --- a/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/Point_set_scene_item.cpp +++ b/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/Point_set_scene_item.cpp @@ -102,8 +102,13 @@ bool Point_set_scene_item::read_off_point_set(std::istream& stream) m_points->clear(); bool ok = stream && CGAL::read_off_points_and_normals(stream, - std::back_inserter(*m_points), - CGAL::make_normal_of_point_with_normal_pmap(std::back_inserter(*m_points))) && + std::back_inserter(*m_points), +#ifdef CGAL_USE_OLD_PAIR_PROPERTY_MAPS + CGAL::make_normal_of_point_with_normal_pmap(std::back_inserter(*m_points)) +#else + CGAL::make_normal_of_point_with_normal_pmap(Point_set::value_type()) +#endif + ) && !isEmpty(); return ok; @@ -116,8 +121,13 @@ bool Point_set_scene_item::write_off_point_set(std::ostream& stream) const return stream && CGAL::write_off_points_and_normals(stream, - m_points->begin(), m_points->end(), - CGAL::make_normal_of_point_with_normal_pmap(m_points->begin())); + m_points->begin(), m_points->end(), +#ifdef CGAL_USE_OLD_PAIR_PROPERTY_MAPS + CGAL::make_normal_of_point_with_normal_pmap(m_points->begin()) +#else + CGAL::make_normal_of_point_with_normal_pmap(Point_set::value_type()) +#endif + ); } // Loads point set from .XYZ file @@ -129,7 +139,12 @@ bool Point_set_scene_item::read_xyz_point_set(std::istream& stream) bool ok = stream && CGAL::read_xyz_points_and_normals(stream, std::back_inserter(*m_points), - CGAL::make_normal_of_point_with_normal_pmap(std::back_inserter(*m_points))) && +#ifdef CGAL_USE_OLD_PAIR_PROPERTY_MAPS + CGAL::make_normal_of_point_with_normal_pmap(std::back_inserter(*m_points)) +#else + CGAL::make_normal_of_point_with_normal_pmap(Point_set::value_type()) +#endif + ) && !isEmpty(); return ok; @@ -142,8 +157,13 @@ bool Point_set_scene_item::write_xyz_point_set(std::ostream& stream) const return stream && CGAL::write_xyz_points_and_normals(stream, - m_points->begin(), m_points->end(), - CGAL::make_normal_of_point_with_normal_pmap(m_points->begin())); + m_points->begin(), m_points->end(), +#ifdef CGAL_USE_OLD_PAIR_PROPERTY_MAPS + CGAL::make_normal_of_point_with_normal_pmap(m_points->begin()) +#else + CGAL::make_normal_of_point_with_normal_pmap(Point_set::value_type()) +#endif + ); } QString