pub trait NonlinearConstraintGenerator<N, Handle>where
    N: RealField + Copy,
    Handle: BodyHandle,{
    // Required methods
    fn num_position_constraints(
        &self,
        bodies: &dyn BodySet<N, Handle = Handle>
    ) -> usize;
    fn position_constraint(
        &self,
        parameters: &IntegrationParameters<N>,
        i: usize,
        bodies: &mut dyn BodySet<N, Handle = Handle>,
        jacobians: &mut [N]
    ) -> Option<GenericNonlinearConstraint<N, Handle>>;
}
Expand description

Implemented by structures that generate non-linear constraints.

Required Methods§

source

fn num_position_constraints( &self, bodies: &dyn BodySet<N, Handle = Handle> ) -> usize

Maximum of non-linear position constraint this generator needs to output.

source

fn position_constraint( &self, parameters: &IntegrationParameters<N>, i: usize, bodies: &mut dyn BodySet<N, Handle = Handle>, jacobians: &mut [N] ) -> Option<GenericNonlinearConstraint<N, Handle>>

Generate the i-th position constraint of this generator.

Implementors§

source§

impl<N, Handle> NonlinearConstraintGenerator<N, Handle> for CartesianConstraint<N, Handle>where N: RealField + Copy, Handle: BodyHandle,

source§

impl<N, Handle> NonlinearConstraintGenerator<N, Handle> for FixedConstraint<N, Handle>where N: RealField + Copy, Handle: BodyHandle,

source§

impl<N, Handle> NonlinearConstraintGenerator<N, Handle> for MouseConstraint<N, Handle>where N: RealField + Copy, Handle: BodyHandle,

source§

impl<N, Handle> NonlinearConstraintGenerator<N, Handle> for PrismaticConstraint<N, Handle>where N: RealField + Copy, Handle: BodyHandle,

source§

impl<N, Handle> NonlinearConstraintGenerator<N, Handle> for RevoluteConstraint<N, Handle>where N: RealField + Copy, Handle: BodyHandle,

source§

impl<N, Handle> NonlinearConstraintGenerator<N, Handle> for MultibodyJointLimitsNonlinearConstraintGeneratorwhere N: RealField + Copy, Handle: BodyHandle,