diff options
| author | Crozet Sébastien <developer@crozet.re> | 2021-02-11 18:52:07 +0100 |
|---|---|---|
| committer | Crozet Sébastien <developer@crozet.re> | 2021-02-11 18:52:07 +0100 |
| commit | cc80e40067d100d0f519c9a20abb020726dd8514 (patch) | |
| tree | c182c675e883b7e29eb38932d6f702af707dbd8c /src/dynamics/solver/joint_constraint/joint_constraint.rs | |
| parent | 5b80c4efbf93ad1294c9d3d390d8c8f090681b0e (diff) | |
| download | rapier-cc80e40067d100d0f519c9a20abb020726dd8514.tar.gz rapier-cc80e40067d100d0f519c9a20abb020726dd8514.tar.bz2 rapier-cc80e40067d100d0f519c9a20abb020726dd8514.zip | |
More experiments with the way the generic joint is stabilized.
Diffstat (limited to 'src/dynamics/solver/joint_constraint/joint_constraint.rs')
| -rw-r--r-- | src/dynamics/solver/joint_constraint/joint_constraint.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/dynamics/solver/joint_constraint/joint_constraint.rs b/src/dynamics/solver/joint_constraint/joint_constraint.rs index 12b8f77..78332e8 100644 --- a/src/dynamics/solver/joint_constraint/joint_constraint.rs +++ b/src/dynamics/solver/joint_constraint/joint_constraint.rs @@ -333,6 +333,23 @@ impl AnyJointVelocityConstraint { } } + pub fn solve2( + &mut self, + mj_lambdas: &mut [DeltaVel<Real>], + mj_lambdas_pos: &mut [DeltaVel<Real>], + ) { + match self { + AnyJointVelocityConstraint::GenericConstraint(c) => { + c.solve2(mj_lambdas, mj_lambdas_pos) + } + AnyJointVelocityConstraint::GenericGroundConstraint(c) => { + c.solve2(mj_lambdas, mj_lambdas_pos) + } + AnyJointVelocityConstraint::Empty => unreachable!(), + _ => {} + } + } + pub fn writeback_impulses(&self, joints_all: &mut [JointGraphEdge]) { match self { AnyJointVelocityConstraint::BallConstraint(c) => c.writeback_impulses(joints_all), |
