Trait ncollide3d::query::TOIDispatcher [−][src]
pub trait TOIDispatcher<N: RealField>: Send + Sync { fn nonlinear_time_of_impact(
&self,
root_dispatcher: &dyn TOIDispatcher<N>,
motion1: &dyn RigidMotion<N>,
g1: &dyn Shape<N>,
motion2: &dyn RigidMotion<N>,
g2: &dyn Shape<N>,
max_toi: N,
target_distance: N
) -> Result<Option<TOI<N>>, Unsupported>; fn time_of_impact(
&self,
root_dispatcher: &dyn TOIDispatcher<N>,
m1: &Isometry<N>,
vel1: &Vector<N>,
g1: &dyn Shape<N>,
m2: &Isometry<N>,
vel2: &Vector<N>,
g2: &dyn Shape<N>,
max_toi: N,
target_distance: N
) -> Result<Option<TOI<N>>, Unsupported>; fn chain<U: TOIDispatcher<N>>(self, other: U) -> Chain<Self, U>
where
Self: Sized, { ... } }
Dispatcher for time-of-impact queries
Custom implementations allow crates that support an abstract TOIDispatcher
to handle custom
shapes. Methods take root_dispatcher
to allow dispatchers to delegate to eachother. Callers
that will not themselves be used to implement a TOIDispatcher
should pass self
.
Required methods
fn nonlinear_time_of_impact(
&self,
root_dispatcher: &dyn TOIDispatcher<N>,
motion1: &dyn RigidMotion<N>,
g1: &dyn Shape<N>,
motion2: &dyn RigidMotion<N>,
g2: &dyn Shape<N>,
max_toi: N,
target_distance: N
) -> Result<Option<TOI<N>>, Unsupported>
[src]
&self,
root_dispatcher: &dyn TOIDispatcher<N>,
motion1: &dyn RigidMotion<N>,
g1: &dyn Shape<N>,
motion2: &dyn RigidMotion<N>,
g2: &dyn Shape<N>,
max_toi: N,
target_distance: N
) -> Result<Option<TOI<N>>, Unsupported>
Computes the smallest time of impact of two shapes under translational movement.
fn time_of_impact(
&self,
root_dispatcher: &dyn TOIDispatcher<N>,
m1: &Isometry<N>,
vel1: &Vector<N>,
g1: &dyn Shape<N>,
m2: &Isometry<N>,
vel2: &Vector<N>,
g2: &dyn Shape<N>,
max_toi: N,
target_distance: N
) -> Result<Option<TOI<N>>, Unsupported>
[src]
&self,
root_dispatcher: &dyn TOIDispatcher<N>,
m1: &Isometry<N>,
vel1: &Vector<N>,
g1: &dyn Shape<N>,
m2: &Isometry<N>,
vel2: &Vector<N>,
g2: &dyn Shape<N>,
max_toi: N,
target_distance: N
) -> Result<Option<TOI<N>>, Unsupported>
Computes the smallest time at with 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.
Provided methods
fn chain<U: TOIDispatcher<N>>(self, other: U) -> Chain<Self, U> where
Self: Sized,
[src]
Self: Sized,
Construct a TOIDispatcher
that falls back on other
for cases not handled by self
Implementors
impl<N, T, U> TOIDispatcher<N> for Chain<T, U> where
N: RealField,
T: TOIDispatcher<N>,
U: TOIDispatcher<N>,
[src]
impl<N, T, U> TOIDispatcher<N> for Chain<T, U> where
N: RealField,
T: TOIDispatcher<N>,
U: TOIDispatcher<N>,
[src]fn nonlinear_time_of_impact(
&self,
root_dispatcher: &dyn TOIDispatcher<N>,
motion1: &dyn RigidMotion<N>,
g1: &dyn Shape<N>,
motion2: &dyn RigidMotion<N>,
g2: &dyn Shape<N>,
max_toi: N,
target_distance: N
) -> Result<Option<TOI<N>>, Unsupported>
[src]
&self,
root_dispatcher: &dyn TOIDispatcher<N>,
motion1: &dyn RigidMotion<N>,
g1: &dyn Shape<N>,
motion2: &dyn RigidMotion<N>,
g2: &dyn Shape<N>,
max_toi: N,
target_distance: N
) -> Result<Option<TOI<N>>, Unsupported>
fn time_of_impact(
&self,
root_dispatcher: &dyn TOIDispatcher<N>,
m1: &Isometry<N>,
vel1: &Vector<N>,
g1: &dyn Shape<N>,
m2: &Isometry<N>,
vel2: &Vector<N>,
g2: &dyn Shape<N>,
max_toi: N,
target_distance: N
) -> Result<Option<TOI<N>>, Unsupported>
[src]
&self,
root_dispatcher: &dyn TOIDispatcher<N>,
m1: &Isometry<N>,
vel1: &Vector<N>,
g1: &dyn Shape<N>,
m2: &Isometry<N>,
vel2: &Vector<N>,
g2: &dyn Shape<N>,
max_toi: N,
target_distance: N
) -> Result<Option<TOI<N>>, Unsupported>
impl<N: RealField> TOIDispatcher<N> for DefaultTOIDispatcher
[src]
impl<N: RealField> TOIDispatcher<N> for DefaultTOIDispatcher
[src]fn nonlinear_time_of_impact(
&self,
root_dispatcher: &dyn TOIDispatcher<N>,
motion1: &dyn RigidMotion<N>,
g1: &dyn Shape<N>,
motion2: &dyn RigidMotion<N>,
g2: &dyn Shape<N>,
max_toi: N,
target_distance: N
) -> Result<Option<TOI<N>>, Unsupported>
[src]
&self,
root_dispatcher: &dyn TOIDispatcher<N>,
motion1: &dyn RigidMotion<N>,
g1: &dyn Shape<N>,
motion2: &dyn RigidMotion<N>,
g2: &dyn Shape<N>,
max_toi: N,
target_distance: N
) -> Result<Option<TOI<N>>, Unsupported>
fn time_of_impact(
&self,
root_dispatcher: &dyn TOIDispatcher<N>,
m1: &Isometry<N>,
vel1: &Vector<N>,
g1: &dyn Shape<N>,
m2: &Isometry<N>,
vel2: &Vector<N>,
g2: &dyn Shape<N>,
max_toi: N,
target_distance: N
) -> Result<Option<TOI<N>>, Unsupported>
[src]
&self,
root_dispatcher: &dyn TOIDispatcher<N>,
m1: &Isometry<N>,
vel1: &Vector<N>,
g1: &dyn Shape<N>,
m2: &Isometry<N>,
vel2: &Vector<N>,
g2: &dyn Shape<N>,
max_toi: N,
target_distance: N
) -> Result<Option<TOI<N>>, Unsupported>