lighttransport / nanort

NanoRT, single header only modern ray tracing kernel.
MIT License
1.07k stars 89 forks source link

[feature] Point query: Find nearest hit surface for a given point #67

Open syoyo opened 3 years ago

syoyo commented 3 years ago

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.