[−][src]Trait nphysics3d::solver::ContactModel
The modeling of a contact.
Required methods
fn num_velocity_constraints(
&self,
manifold: &ColliderContactManifold<N>
) -> usize
&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>
)
&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.
Methods
impl<N> dyn ContactModel<N> where
N: Any + 'static,
N: RealField,
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>>
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]
fn num_velocity_constraints(&self, c: &ColliderContactManifold<N>) -> usize
[src]
fn constraints(
&mut self,
params: &IntegrationParameters<N>,
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>
)
[src]
&mut self,
params: &IntegrationParameters<N>,
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>)
[src]
impl<N: RealField> ContactModel<N> for SignoriniModel<N>
[src]
fn num_velocity_constraints(&self, c: &ColliderContactManifold<N>) -> usize
[src]
fn constraints(
&mut self,
params: &IntegrationParameters<N>,
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>
)
[src]
&mut self,
params: &IntegrationParameters<N>,
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>
)