mirror of https://github.com/CGAL/cgal
Merge branch 'cgal/releases/CGAL-4.14-branch'
This commit is contained in:
commit
551313ac5c
|
|
@ -100,8 +100,8 @@ namespace CGAL {
|
|||
make_ply_normal_reader(VectorMap normal_map);
|
||||
#endif // DOXYGEN_RUNNING
|
||||
|
||||
/*
|
||||
\ingroup PkgPointSetProcessing3IOPly
|
||||
/**
|
||||
\ingroup PkgPointSetProcessingIOPly
|
||||
|
||||
Reads user-selected points properties from a .ply stream (ASCII or
|
||||
binary).
|
||||
|
|
|
|||
|
|
@ -115,7 +115,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.
|
||||
|
|
|
|||
|
|
@ -80,17 +80,19 @@ triangle_grid_sampling( const typename Kernel::Point_3& p0,
|
|||
}
|
||||
|
||||
#if defined(CGAL_LINKED_WITH_TBB)
|
||||
template <class AABB_tree, class Point_3>
|
||||
template <class AABB_tree, class PointRange>
|
||||
struct Distance_computation{
|
||||
typedef typename PointRange::const_iterator::value_type Point_3;
|
||||
|
||||
const AABB_tree& tree;
|
||||
const std::vector<Point_3>& sample_points;
|
||||
const PointRange& sample_points;
|
||||
Point_3 initial_hint;
|
||||
tbb::atomic<double>* distance;
|
||||
|
||||
Distance_computation(
|
||||
const AABB_tree& tree,
|
||||
const Point_3& p,
|
||||
const std::vector<Point_3>& sample_points,
|
||||
const PointRange& sample_points,
|
||||
tbb::atomic<double>* d)
|
||||
: tree(tree)
|
||||
, sample_points(sample_points)
|
||||
|
|
@ -105,9 +107,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<Point_3>::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;
|
||||
}
|
||||
|
||||
|
|
@ -138,7 +140,7 @@ double approximate_Hausdorff_distance_impl(
|
|||
{
|
||||
tbb::atomic<double> distance;
|
||||
distance=0;
|
||||
Distance_computation<AABBTree, typename Kernel::Point_3> f(tree, hint, sample_points, &distance);
|
||||
Distance_computation<AABBTree, PointRange> f(tree, hint, sample_points, &distance);
|
||||
tbb::parallel_for(tbb::blocked_range<std::size_t>(0, sample_points.size()), f);
|
||||
return distance;
|
||||
}
|
||||
|
|
@ -660,7 +662,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
|
||||
|
|
|
|||
Loading…
Reference in New Issue