From a195583c9d5f9b477eaa00e322d799e5fb46e1f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 3 Oct 2016 10:26:07 +0200 Subject: [PATCH] fix the default vertex point map used --- Generator/doc/Generator/CGAL/point_generators_3.h | 13 ++++++------- Generator/include/CGAL/point_generators_3.h | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Generator/doc/Generator/CGAL/point_generators_3.h b/Generator/doc/Generator/CGAL/point_generators_3.h index 129b1627be7..5691d6d983d 100644 --- a/Generator/doc/Generator/CGAL/point_generators_3.h +++ b/Generator/doc/Generator/CGAL/point_generators_3.h @@ -465,19 +465,18 @@ typedef const Point_3& reference; -/*! -Creates an input iterator `g` generating points of type `Point_3` uniformly -distributed in the mesh faces. Each triangle has a probability to be chosen to hold the point depending on its area. - -*/ -Random_points_in_triangle_mesh_3(const TriangleMesh& mesh, Random& rnd = get_default_random() ); - /*! Creates an input iterator `g` generating points of type `Point_3` uniformly distributed in the mesh faces based on `vpm`. Each triangle has a probability to be chosen to hold the point depending on its area. */ Random_points_in_triangle_mesh_3(const TriangleMesh& mesh, VertexPointMap vpm, Random& rnd = get_default_random() ); +/*! +Similar to the previous constructor using `get(vertex_point, mesh)` as vertex point map. +*/ +Random_points_in_triangle_mesh_3(const TriangleMesh& mesh, Random& rnd = get_default_random() ); + + /// @} }; /* end Random_points_in_triangle_mesh_3 */ diff --git a/Generator/include/CGAL/point_generators_3.h b/Generator/include/CGAL/point_generators_3.h index 3114edf3471..f1ece8e4df4 100644 --- a/Generator/include/CGAL/point_generators_3.h +++ b/Generator/include/CGAL/point_generators_3.h @@ -334,7 +334,7 @@ struct Random_points_in_triangle_mesh_3 Random_points_in_triangle_mesh_3( const TriangleMesh& mesh,Random& rnd = get_default_random()) : Base( faces(mesh), - CGAL::Property_map_to_unary_function(&mesh), + CGAL::Property_map_to_unary_function(Pmap(&mesh, get(vertex_point, mesh))), internal::Apply_approx_sqrt::Kernel::Compute_squared_area_3>(), rnd ) {