Function heron::rapier_plugin::rapier2d::parry::query::time_of_impact [−][src]
pub fn time_of_impact(
pos1: &Isometry<f32, Unit<Complex<f32>>, 2_usize>,
vel1: &Matrix<f32, Const<{_: usize}>, Const<1_usize>, ArrayStorage<f32, 2_usize, 1_usize>>,
g1: &(dyn Shape + 'static),
pos2: &Isometry<f32, Unit<Complex<f32>>, 2_usize>,
vel2: &Matrix<f32, Const<{_: usize}>, Const<1_usize>, ArrayStorage<f32, 2_usize, 1_usize>>,
g2: &(dyn Shape + 'static),
max_toi: f32
) -> Result<Option<TOI>, Unsupported>
Expand description
Computes the smallest time when two shapes under translational movement are separated by a
distance smaller or equal to distance
.
Returns 0.0
if the objects are touching or penetrating.