continuous_sphere_triangle3d_collision

Function continuous_sphere_triangle3d_collision 

Source
pub fn continuous_sphere_triangle3d_collision(
    sphere: &Sphere,
    velocity: &[f64; 3],
    triangle: &Triangle3D,
    time_step: f64,
) -> Option<f64>
Expand description

Tests if a moving sphere collides with a static triangle within a time step

§Arguments

  • sphere - The sphere
  • velocity - The velocity of the sphere [vx, vy, vz]
  • triangle - The static triangle
  • time_step - The time step to check for collision

§Returns

Some(time) if the sphere will collide with the triangle within the time step, None otherwise