[][src]Trait nphysics2d::joint::JointConstraint

pub trait JointConstraint<N: Real>: NonlinearConstraintGenerator<N> + Downcast + Send + Sync {
    fn num_velocity_constraints(&self) -> usize;
fn anchors(&self) -> (BodyPartHandle, BodyPartHandle);
fn velocity_constraints(
        &mut self,
        params: &IntegrationParameters<N>,
        bodies: &BodySet<N>,
        ext_vels: &DVector<N>,
        ground_j_id: &mut usize,
        j_id: &mut usize,
        jacobians: &mut [N],
        velocity_constraints: &mut ConstraintSet<N>
    );
fn cache_impulses(&mut self, constraints: &ConstraintSet<N>); fn is_active(&self, bodies: &BodySet<N>) -> bool { ... } }

Trait implemented by joint that operate by generating constraints to restrict the relative motion of two body parts.

Required Methods

The maximum number of velocity constraints generated by this joint.

The two body parts affected by this joint.

Initialize and retrieve all the constraints appied to the bodies attached to this joint.

Called after velocity constraint resolution, allows the joint to keep a cache of impulses generated for each constraint.

Provided Methods

Return true if the constraint is active.

Typically, a constraint is disable if it is between two sleeping bodies, or, between bodies without any degrees of freedom.

Methods

impl<N> dyn JointConstraint<N> where
    N: Any + 'static,
    N: Real, 

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 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

impl<N: Real> JointConstraint<N> for CartesianConstraint<N>
[src]

impl<N: Real> JointConstraint<N> for FixedConstraint<N>
[src]

impl<N: Real> JointConstraint<N> for MouseConstraint<N>
[src]

impl<N: Real> JointConstraint<N> for PrismaticConstraint<N>
[src]

impl<N: Real> JointConstraint<N> for RevoluteConstraint<N>
[src]