Module ray_triangle

Module ray_triangle 

Source
Expand description

Ray-triangle intersection queries for mesh-geometry.

Structs§

Ray
A 3D ray: origin + t·dir, with dir not necessarily normalized.

Functions§

ray_intersects_triangle
If the ray intersects the triangle (a,b,c), returns Some((t,u,v)) where intersection = origin + t·dir, and (u,v) are barycentric coords. Otherwise returns None.