continuous_point_triangle3d_collision

Function continuous_point_triangle3d_collision 

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

Tests if a moving point will collide with a static triangle within a time step

§Arguments

  • point - The initial position of the point [x, y, z]
  • velocity - The velocity of the point [vx, vy, vz]
  • triangle - The static triangle
  • time_step - The time step to check for collision

§Returns

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