Trait nphysics3d::solver::ContactModel[][src]

pub trait ContactModel<N: RealField + Copy, Handle: BodyHandle, CollHandle: ColliderHandle>: Downcast + Send + Sync {
    fn num_velocity_constraints(
        &self,
        manifold: &ColliderContactManifold<'_, N, Handle, CollHandle>
    ) -> usize;
fn constraints(
        &mut self,
        parameters: &IntegrationParameters<N>,
        material_coefficients: &MaterialsCoefficientsTable<N>,
        bodies: &dyn BodySet<N, Handle = Handle>,
        ext_vels: &DVector<N>,
        manifolds: &[ColliderContactManifold<'_, N, Handle, CollHandle>],
        ground_j_id: &mut usize,
        j_id: &mut usize,
        jacobians: &mut [N],
        constraints: &mut ConstraintSet<N, Handle, CollHandle, ContactId>
    );
fn cache_impulses(
        &mut self,
        constraints: &ConstraintSet<N, Handle, CollHandle, ContactId>
    ); }
Expand description

The modeling of a contact.

Required methods

Maximum number of velocity constraint to be generated for each contact.

Generate all constraints for the given contact manifolds.

Stores all the impulses found by the solver into a cache for warmstarting.

Implementations

Returns true if the trait object wraps an object of type __T.

Returns a boxed object from a boxed trait object if the underlying object is of type __T. Returns the original boxed trait if it isn’t.

Returns an Rc-ed object from an Rc-ed trait object if the underlying object is of type __T. Returns the original Rc-ed trait if it isn’t.

Returns a reference to the object within the trait object if it is of type __T, or None if it isn’t.

Returns a mutable reference to the object within the trait object if it is of type __T, or None if it isn’t.

Implementors