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

pub trait ContactModel<N: RealField>: Downcast + Send + Sync {
    fn num_velocity_constraints(
        &self,
        manifold: &ColliderContactManifold<N>
    ) -> usize;
fn constraints(
        &mut self,
        params: &IntegrationParameters<N>,
        material_coefficients: &MaterialsCoefficientsTable<N>,
        bodies: &BodySet<N>,
        ext_vels: &DVector<N>,
        manifolds: &[ColliderContactManifold<N>],
        ground_j_id: &mut usize,
        j_id: &mut usize,
        jacobians: &mut [N],
        constraints: &mut ConstraintSet<N>
    );
fn cache_impulses(&mut self, constraints: &ConstraintSet<N>); }

The modeling of a contact.

Required methods

fn num_velocity_constraints(
    &self,
    manifold: &ColliderContactManifold<N>
) -> usize

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

fn constraints(
    &mut self,
    params: &IntegrationParameters<N>,
    material_coefficients: &MaterialsCoefficientsTable<N>,
    bodies: &BodySet<N>,
    ext_vels: &DVector<N>,
    manifolds: &[ColliderContactManifold<N>],
    ground_j_id: &mut usize,
    j_id: &mut usize,
    jacobians: &mut [N],
    constraints: &mut ConstraintSet<N>
)

Generate all constraints for the given contact manifolds.

fn cache_impulses(&mut self, constraints: &ConstraintSet<N>)

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

Loading content...

Methods

impl<N> dyn ContactModel<N> where
    N: Any + 'static,
    N: RealField

pub fn is<__T: ContactModel<N>>(&self) -> bool

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

pub fn downcast<__T: ContactModel<N>>(
    self: Box<Self>
) -> Result<Box<__T>, Box<Self>>

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.

pub fn downcast_ref<__T: ContactModel<N>>(&self) -> Option<&__T>

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

pub fn downcast_mut<__T: ContactModel<N>>(&mut self) -> Option<&mut __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

impl<N: RealField> ContactModel<N> for SignoriniCoulombPyramidModel<N>[src]

impl<N: RealField> ContactModel<N> for SignoriniModel<N>[src]

Loading content...