[][src]Function libraymarcher::cast_ray

pub fn cast_ray<C: Color, O: SceneObject<C>>(
    object: &O,
    point: Vec3,
    dir: Vec3,
    backplanes: Vec3,
    t: f64
) -> Option<RayResult>

Performs the raymarching algorithm on a scene.

Arguments

Returns

Some(result) if the ray hit an object in the scene None if the ray did not hit anything or hit one of the backplanes