From 4d997bc53f4dcd30b9ea634ef304b42b197a3533 Mon Sep 17 00:00:00 2001 From: Francis Williams Date: Thu, 14 Sep 2023 18:15:42 -0400 Subject: [PATCH] macos???? --- src/point_cloud_normals.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/point_cloud_normals.cpp b/src/point_cloud_normals.cpp index c4466d5..41ab7d6 100644 --- a/src/point_cloud_normals.cpp +++ b/src/point_cloud_normals.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #if defined(_OPENMP) #include @@ -76,7 +77,7 @@ std::tuple estimate_local_normal_rbf(const KdTreeType& } if (max_pts_per_ball > 0) { - std::random_shuffle(out_nbrs.begin(), out_nbrs.end()); + std::shuffle(out_nbrs.begin(), out_nbrs.end(), std::default_random_engine(rand())); founds = std::min((size_t) max_pts_per_ball, founds); } @@ -353,7 +354,7 @@ npe_begin_code() } else { throw pybind11::value_error("Invalid weight_function, must be one of 'constant' or 'rbf'."); } - + auto normal_estimator = [&](int pt_index) { return estimate_local_normal_rbf(tree, points, view_dirs, pt_index, radius, min_pts_per_ball, max_pts_per_ball, drop_angle_threshold,