diff --git a/Point_set_shape_detection_3/test/Point_set_shape_detection_3/test_regularization.cpp b/Point_set_shape_detection_3/test/Point_set_shape_detection_3/test_regularization.cpp index 1e1cc39bdd3..aef2e8bc985 100644 --- a/Point_set_shape_detection_3/test/Point_set_shape_detection_3/test_regularization.cpp +++ b/Point_set_shape_detection_3/test/Point_set_shape_detection_3/test_regularization.cpp @@ -160,13 +160,28 @@ int main() check_ransac_size (ransac, 2); std::vector before = get_ransac_planes(ransac); - CGAL::regularize_planes (ransac, true, false, false, false, 5.); + + // Test regularization + typename Efficient_ransac::Plane_range planes = ransac.planes(); + CGAL::regularize_planes (points, + Point_map(), + planes, + CGAL::Shape_detection_3::Plane_map(), + CGAL::Shape_detection_3::Point_to_shape_index_map(points, planes), + true, false, false, false, 5.); + std::vector after = get_ransac_planes(ransac); std::cerr << " * Nothing should change now..." << std::endl; check_planes_unchanged (before, after); - CGAL::regularize_planes (ransac, true, false, false, false, 15.); + CGAL::regularize_planes (points, + Point_map(), + planes, + CGAL::Shape_detection_3::Plane_map(), + CGAL::Shape_detection_3::Point_to_shape_index_map(points, planes), + true, false, false, false, 15.); + after = get_ransac_planes(ransac); std::cerr << " * Something should change now..." << std::endl; @@ -192,13 +207,27 @@ int main() check_ransac_size (ransac, 2); std::vector before = get_ransac_planes(ransac); - CGAL::regularize_planes (ransac, false, true, false, true, 5.); + + typename Efficient_ransac::Plane_range planes = ransac.planes(); + CGAL::regularize_planes (points, + Point_map(), + planes, + CGAL::Shape_detection_3::Plane_map(), + CGAL::Shape_detection_3::Point_to_shape_index_map(points, planes), + false, true, false, true, 5.); + std::vector after = get_ransac_planes(ransac); std::cerr << " * Nothing should change now..." << std::endl; check_planes_unchanged (before, after); - CGAL::regularize_planes (ransac, false, true, false, true, 15.); + CGAL::regularize_planes (points, + Point_map(), + planes, + CGAL::Shape_detection_3::Plane_map(), + CGAL::Shape_detection_3::Point_to_shape_index_map(points, planes), + false, true, false, true, 15.); + after = get_ransac_planes(ransac); std::cerr << " * Something should change now..." << std::endl; @@ -223,13 +252,27 @@ int main() check_ransac_size (ransac, 2); std::vector before = get_ransac_planes(ransac); - CGAL::regularize_planes (ransac, true, false, true, false, 5., 0.1); + + typename Efficient_ransac::Plane_range planes = ransac.planes(); + CGAL::regularize_planes (points, + Point_map(), + planes, + CGAL::Shape_detection_3::Plane_map(), + CGAL::Shape_detection_3::Point_to_shape_index_map(points, planes), + true, false, true, false, 5., 0.1); + std::vector after = get_ransac_planes(ransac); std::cerr << " * Nothing should change now..." << std::endl; check_planes_unchanged (before, after); - CGAL::regularize_planes (ransac, true, false, true, false, 5., 0.3); + CGAL::regularize_planes (points, + Point_map(), + planes, + CGAL::Shape_detection_3::Plane_map(), + CGAL::Shape_detection_3::Point_to_shape_index_map(points, planes), + true, false, true, false, 5., 0.3); + after = get_ransac_planes(ransac); std::cerr << " * Something should change now..." << std::endl; @@ -259,13 +302,26 @@ int main() check_ransac_size (ransac, 2); std::vector before = get_ransac_planes(ransac); - CGAL::regularize_planes (ransac, false, false, false, true, 5., 0.01, Vector(1., 0., 0.)); + typename Efficient_ransac::Plane_range planes = ransac.planes(); + CGAL::regularize_planes (points, + Point_map(), + planes, + CGAL::Shape_detection_3::Plane_map(), + CGAL::Shape_detection_3::Point_to_shape_index_map(points, planes), + false, false, false, true, 5., 0.01, Vector(1., 0., 0.)); + std::vector after = get_ransac_planes(ransac); std::cerr << " * Nothing should change now..." << std::endl; check_planes_unchanged (before, after); - CGAL::regularize_planes (ransac, false, false, false, true, 15., 0.01, Vector(1., 0., 0.)); + CGAL::regularize_planes (points, + Point_map(), + planes, + CGAL::Shape_detection_3::Plane_map(), + CGAL::Shape_detection_3::Point_to_shape_index_map(points, planes), + false, false, false, true, 15., 0.01, Vector(1., 0., 0.)); + after = get_ransac_planes(ransac); std::cerr << " * Something should change now..." << std::endl; diff --git a/Point_set_shape_detection_3/test/Point_set_shape_detection_3/test_scene.cpp b/Point_set_shape_detection_3/test/Point_set_shape_detection_3/test_scene.cpp index b68753dd059..80b8f46f0a1 100644 --- a/Point_set_shape_detection_3/test/Point_set_shape_detection_3/test_scene.cpp +++ b/Point_set_shape_detection_3/test/Point_set_shape_detection_3/test_scene.cpp @@ -128,7 +128,13 @@ bool test_scene() { } // Test regularization - CGAL::regularize_planes (ransac, true, true, true, true, + typename Efficient_ransac::Plane_range planes = ransac.planes(); + CGAL::regularize_planes (points, + Point_map(), + planes, + CGAL::Shape_detection_3::Plane_map(), + CGAL::Shape_detection_3::Point_to_shape_index_map(points, planes), + true, true, true, true, (FT)50., (FT)0.01); Point_index_range pts = ransac.indices_of_unassigned_points();