Skip to main content

ray_toi_with_ball

Function ray_toi_with_ball 

Source
pub fn ray_toi_with_ball(
    center: &Point<f64>,
    radius: f64,
    ray: &Ray,
    solid: bool,
) -> (bool, Option<f64>)
Expand description

Computes the time of impact of a ray on a ball.

The first result element is true if the ray started inside of the ball.