diff --git a/Point_set_shape_detection_3/include/CGAL/Plane_regularization.h b/Point_set_shape_detection_3/include/CGAL/Plane_regularization.h index 5a82b2cbac7..6dddf719cb8 100644 --- a/Point_set_shape_detection_3/include/CGAL/Plane_regularization.h +++ b/Point_set_shape_detection_3/include/CGAL/Plane_regularization.h @@ -68,6 +68,8 @@ namespace CGAL { Normal_map m_normal_pmap; std::vector > m_planes; + std::vector m_centroids; + std::vector m_areas; public: @@ -107,45 +109,15 @@ namespace CGAL { void clear () { std::vector > ().swap (m_planes); + std::vector ().swap (m_centroids); + std::vector ().swap (m_areas); } std::size_t run (FT epsilon, FT tolerance_coplanarity) { - // WRAPPER BEGIN - std::vector > plane_point_index; - std::vector primitive_index (m_input_end - m_input_begin, -1); - std::vector label_plane (m_input_end - m_input_begin, -1); - std::vector list_centroid; - std::vector list_areas; - - for (std::size_t i = 0; i < m_planes.size (); ++ i) - { - plane_point_index.push_back (std::vector()); - std::copy (m_planes[i]->indices_of_assigned_points().begin (), - m_planes[i]->indices_of_assigned_points().end (), - std::back_inserter (plane_point_index.back ())); - - std::vector < Point > listp; - for (std::size_t j = 0; j < plane_point_index.back ().size (); ++ j) - { - primitive_index[j] = i; - - int yy = plane_point_index.back()[j]; - label_plane[yy] = i; - - Point pt = get (m_point_pmap, *(m_input_begin + yy)); - listp.push_back(pt); - } - list_centroid.push_back (CGAL::centroid (listp.begin (), listp.end ())); - list_areas.push_back ((double)(plane_point_index.back().size()) / 100.); - } - - // WRAPPER END - - - // std::cout<