Trait heron::rapier_plugin::rapier::ncollide::query::TOIDispatcher[][src]

pub trait TOIDispatcher<N>: Send + Sync where
    N: RealField
{ pub fn nonlinear_time_of_impact(
        &self,
        root_dispatcher: &dyn TOIDispatcher<N>,
        motion1: &dyn RigidMotion<N>,
        g1: &(dyn Shape<N> + 'static),
        motion2: &dyn RigidMotion<N>,
        g2: &(dyn Shape<N> + 'static),
        max_toi: N,
        target_distance: N
    ) -> Result<Option<TOI<N>>, Unsupported>;
pub fn time_of_impact(
        &self,
        root_dispatcher: &dyn TOIDispatcher<N>,
        m1: &Isometry<N, U3, Unit<Quaternion<N>>>,
        vel1: &Matrix<N, U3, U1, <DefaultAllocator as Allocator<N, U3, U1>>::Buffer>,
        g1: &(dyn Shape<N> + 'static),
        m2: &Isometry<N, U3, Unit<Quaternion<N>>>,
        vel2: &Matrix<N, U3, U1, <DefaultAllocator as Allocator<N, U3, U1>>::Buffer>,
        g2: &(dyn Shape<N> + 'static),
        max_toi: N,
        target_distance: N
    ) -> Result<Option<TOI<N>>, Unsupported>; pub fn chain<U>(self, other: U) -> Chain<Self, U>
    where
        U: TOIDispatcher<N>
, { ... } }

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

pub fn nonlinear_time_of_impact(
    &self,
    root_dispatcher: &dyn TOIDispatcher<N>,
    motion1: &dyn RigidMotion<N>,
    g1: &(dyn Shape<N> + 'static),
    motion2: &dyn RigidMotion<N>,
    g2: &(dyn Shape<N> + 'static),
    max_toi: N,
    target_distance: N
) -> Result<Option<TOI<N>>, Unsupported>
[src]

Computes the smallest time of impact of two shapes under translational movement.

pub fn time_of_impact(
    &self,
    root_dispatcher: &dyn TOIDispatcher<N>,
    m1: &Isometry<N, U3, Unit<Quaternion<N>>>,
    vel1: &Matrix<N, U3, U1, <DefaultAllocator as Allocator<N, U3, U1>>::Buffer>,
    g1: &(dyn Shape<N> + 'static),
    m2: &Isometry<N, U3, Unit<Quaternion<N>>>,
    vel2: &Matrix<N, U3, U1, <DefaultAllocator as Allocator<N, U3, U1>>::Buffer>,
    g2: &(dyn Shape<N> + 'static),
    max_toi: N,
    target_distance: N
) -> Result<Option<TOI<N>>, Unsupported>
[src]

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.

Loading content...

Provided methods

pub fn chain<U>(self, other: U) -> Chain<Self, U> where
    U: TOIDispatcher<N>, 
[src]

Construct a TOIDispatcher that falls back on other for cases not handled by self

Loading content...

Implementors

impl<N> TOIDispatcher<N> for DefaultTOIDispatcher where
    N: RealField
[src]

impl<N, T, U> TOIDispatcher<N> for Chain<T, U> where
    T: TOIDispatcher<N>,
    N: RealField,
    U: TOIDispatcher<N>, 
[src]

Loading content...