Skip to main content

ray_triangle_moller_trumbore

Function ray_triangle_moller_trumbore 

pub fn ray_triangle_moller_trumbore(
    origin: [f32; 3],
    dir: [f32; 3],
    v0: [f32; 3],
    v1: [f32; 3],
    v2: [f32; 3],
    max_toi: f32,
) -> Option<(f32, [f32; 3])>
Expand description

Möller–Trumbore ray-triangle intersection test (HotZeroHeap).

Returns Some((toi, normal)) if the ray origin + t * dir hits triangle (v0, v1, v2) within 0.0 <= t <= max_toi.