Skip to main content

kd_batch_knn

Function kd_batch_knn 

Source
pub fn kd_batch_knn(
    tree: &KdTree,
    queries: &[Vec3],
    k: usize,
) -> Vec<Vec<(usize, f64)>>
Expand description

Batch k-nearest-neighbor query.

For each query point, returns the k nearest points from the tree. More efficient than calling k_nearest repeatedly if many queries share the same tree.