30 using my_kd_tree_t = nanoflann::
31 KDTreeSingleIndexAdaptor<nanoflann::L2_Simple_Adaptor<double, PointCloud>,
PointCloud, 3>;
34 KNN(
const std::vector<Vector3d>& pts);
36 void nearest_neighbor(
37 const Vector3d& query_point,
38 uint32_t& nearest_point_index,
39 double& sq_dist)
const;
41 void nearest_neighbors(
42 const Vector3d& query_point,
43 std::vector<uint32_t>& nearest_point_indices,
44 std::vector<double>& sq_dist)
const;
46 const Vector3d& point(
const uint32_t& index)
const {
return point_cloud.pts[index]; }
50 std::unique_ptr<my_kd_tree_t> m_kd_tree;