Skip to main content

trace_ray

Function trace_ray 

Source
pub fn trace_ray(ray: &Ray, triangles: &[GpuTriangle]) -> Option<HitRecord>
Expand description

Find the closest triangle hit by ray in triangles.

Returns Some(HitRecord) if any triangle is hit, None otherwise.