nanort
nanort copied to clipboard
[feature] Point query: Find nearest hit surface for a given point
Point query feature(find nearest hit surface point for a given point) is useful for physics(collision detection), distance fields(e.g. monte carlo geometry processing) and so on.
Here is an example from Embree.
https://www.embree.org/tutorials.html#closest-point
Changes required should be rather small since we already have BVH traversal and ray/prim intersection logics.