Skip to content

Commit

Permalink
macos????
Browse files Browse the repository at this point in the history
  • Loading branch information
fwilliams committed Sep 14, 2023
1 parent e413c6e commit 4d997bc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/point_cloud_normals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <tuple>
#include <cmath>
#include <thread>
#include <random>

#if defined(_OPENMP)
#include <omp.h>
Expand Down Expand Up @@ -76,7 +77,7 @@ std::tuple<bool, Eigen::RowVector3d> 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);
}

Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 4d997bc

Please sign in to comment.