ClosestPointBVH
Closest-point search over a point cloud using the turnkey PointCloudBVH class (see
Point clouds), which hides the whole point-cloud search pipeline – grouping points
into SIMD-friendly leaves, building the PackedBVH, and running the pruned traversal – behind a
single constructor and a couple of query methods (closestPoint() for the nearest point,
closestPoints() for the k nearest, ascending by distance). This is the external query form:
the query points are arbitrary, not members of the cloud, unlike its neighbor-graph counterpart
NearestNeighborBVH.
The source for this example is at Examples/ClosestPointBVH/main.cpp. See Building
for how to compile it with CMake, GNU Make, or a direct compiler invocation.
cd Examples/ClosestPointBVH
./ClosestPointBVH.ex