From 790ed44613a9a72b9ba4807cfd2a05502d7a9994 Mon Sep 17 00:00:00 2001 From: Simon Giraudot Date: Wed, 21 Aug 2019 14:51:04 +0200 Subject: [PATCH 1/4] Fix distance range type --- .../CGAL/Polygon_mesh_processing/distance.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h index 217f6e37f6e..f05a8c7d931 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h @@ -81,17 +81,19 @@ triangle_grid_sampling( const typename Kernel::Point_3& p0, } #if defined(CGAL_LINKED_WITH_TBB) -template +template struct Distance_computation{ + typedef typename PointRange::const_iterator::value_type Point_3; + const AABB_tree& tree; - const std::vector& sample_points; + const PointRange& sample_points; Point_3 initial_hint; tbb::atomic* distance; Distance_computation( const AABB_tree& tree, const Point_3& p, - const std::vector& sample_points, + const PointRange& sample_points, tbb::atomic* d) : tree(tree) , sample_points(sample_points) @@ -106,9 +108,9 @@ struct Distance_computation{ double hdist = 0; for( std::size_t i = range.begin(); i != range.end(); ++i) { - hint = tree.closest_point(sample_points[i], hint); + hint = tree.closest_point(*(sample_points.begin() + i), hint); typename Kernel_traits::Kernel::Compute_squared_distance_3 squared_distance; - double d = to_double(CGAL::approximate_sqrt( squared_distance(hint,sample_points[i]) )); + double d = to_double(CGAL::approximate_sqrt( squared_distance(hint,*(sample_points.begin() + i)) )); if (d>hdist) hdist=d; } @@ -139,7 +141,7 @@ double approximate_Hausdorff_distance_impl( { tbb::atomic distance; distance=0; - Distance_computation f(tree, hint, sample_points, &distance); + Distance_computation f(tree, hint, sample_points, &distance); tbb::parallel_for(tbb::blocked_range(0, sample_points.size()), f); return distance; } From 66d7f39ef88bccd96c73a1b9cdc2c23b372110ba Mon Sep 17 00:00:00 2001 From: Simon Giraudot Date: Wed, 21 Aug 2019 15:17:42 +0200 Subject: [PATCH 2/4] Fix missing doxygen character --- Point_set_processing_3/include/CGAL/IO/read_ply_points.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Point_set_processing_3/include/CGAL/IO/read_ply_points.h b/Point_set_processing_3/include/CGAL/IO/read_ply_points.h index d80f3864fc1..36560ae093b 100644 --- a/Point_set_processing_3/include/CGAL/IO/read_ply_points.h +++ b/Point_set_processing_3/include/CGAL/IO/read_ply_points.h @@ -722,7 +722,7 @@ namespace internal { /// \endcond -/* +/** \ingroup PkgPointSetProcessingIOPly Reads user-selected points properties from a .ply stream (ASCII or From 2e4d7981dc331917086039ed6cc1e0d22cb19f9f Mon Sep 17 00:00:00 2001 From: Simon Giraudot Date: Wed, 21 Aug 2019 15:19:07 +0200 Subject: [PATCH 3/4] Fix doc: no point map but property maps --- Point_set_processing_3/include/CGAL/IO/write_ply_points.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Point_set_processing_3/include/CGAL/IO/write_ply_points.h b/Point_set_processing_3/include/CGAL/IO/write_ply_points.h index 0819a35461f..8400619c350 100644 --- a/Point_set_processing_3/include/CGAL/IO/write_ply_points.h +++ b/Point_set_processing_3/include/CGAL/IO/write_ply_points.h @@ -355,7 +355,8 @@ namespace internal { \cgalRequiresCPP11 \tparam PointRange is a model of `ConstRange`. The value type of - its iterator is the key type of the named parameter `point_map`. + its iterator is the key type of the `PropertyMap` objects provided + within the `PropertyHandler` parameter. \tparam PropertyHandler handlers to recover properties. \return `true` on success. From dd5fe73996af90cde65223449771a04f90f85ec3 Mon Sep 17 00:00:00 2001 From: Simon Giraudot Date: Wed, 21 Aug 2019 15:43:50 +0200 Subject: [PATCH 4/4] Document type of iterator (random access) --- .../include/CGAL/Polygon_mesh_processing/distance.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h index f05a8c7d931..7cc6dbbb1f9 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h @@ -663,7 +663,7 @@ double approximate_symmetric_Hausdorff_distance( * \ingroup PMP_distance_grp * returns the distance to `tm` of the point from `points` * that is the furthest from `tm`. - * @tparam PointRange a range of `Point_3`, model of `Range`. + * @tparam PointRange a range of `Point_3`, model of `Range`. Its iterator type is `RandomAccessIterator`. * @tparam TriangleMesh a model of the concept `FaceListGraph` * @tparam NamedParameters a sequence of \ref pmp_namedparameters "Named Parameters" * @param points the range of points of interest