continuous_triangle3d_sphere_collision

Function continuous_triangle3d_sphere_collision 

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

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

§Arguments

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

§Returns

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