|
MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
|
|
inline |
Find the closest entity to a ray within a tolerance radius.
| index | Published SpatialIndex3D to query. |
| ray | World-space ray (from screen_to_ray or constructed manually). |
| tolerance | Maximum perpendicular distance from the ray axis for a hit. |
Iterates all entities in the published snapshot. Entities behind the ray origin (t < 0) are rejected. Among forward candidates within tolerance, returns the one with the smallest perpendicular distance. Ties broken by smaller t (closer to camera).
Definition at line 115 of file HitTest.hpp.
References MayaFlux::Kinesis::SpatialIndex< PointT >::all(), distance(), MayaFlux::Kinesis::HitResult::id, id, and point_ray_distance_sq().
Here is the call graph for this function: