Skip to main content

ray_triangle_intersect

Function ray_triangle_intersect 

Source
pub fn ray_triangle_intersect(
    origin: [f64; 3],
    direction: [f64; 3],
    v0: [f64; 3],
    v1: [f64; 3],
    v2: [f64; 3],
) -> Option<f64>
Expand description

Möller-Trumbore ray-triangle intersection.

Returns the parametric distance t along the ray if the ray intersects the triangle from the front, or None otherwise.