@@ -9,19 +9,19 @@ use crate::prelude::ContactManifold;
99
1010#[ derive( Debug ) ]
1111pub enum AnyContactConstraintMut < ' a > {
12- GenericTwoBodies ( & ' a mut GenericContactConstraint ) ,
13- SimdTwoBodiesCoulomb ( & ' a mut ContactWithCoulombFriction ) ,
12+ Generic ( & ' a mut GenericContactConstraint ) ,
13+ WithCoulombFriction ( & ' a mut ContactWithCoulombFriction ) ,
1414 #[ cfg( feature = "dim3" ) ]
15- SimdTwoBodiesTwist ( & ' a mut ContactWithTwistFriction ) ,
15+ WithTwistFriction ( & ' a mut ContactWithTwistFriction ) ,
1616}
1717
1818impl AnyContactConstraintMut < ' _ > {
1919 pub fn remove_bias ( & mut self ) {
2020 match self {
21- Self :: GenericTwoBodies ( c) => c. remove_cfm_and_bias_from_rhs ( ) ,
22- Self :: SimdTwoBodiesCoulomb ( c) => c. remove_cfm_and_bias_from_rhs ( ) ,
21+ Self :: Generic ( c) => c. remove_cfm_and_bias_from_rhs ( ) ,
22+ Self :: WithCoulombFriction ( c) => c. remove_cfm_and_bias_from_rhs ( ) ,
2323 #[ cfg( feature = "dim3" ) ]
24- Self :: SimdTwoBodiesTwist ( c) => c. remove_cfm_and_bias_from_rhs ( ) ,
24+ Self :: WithTwistFriction ( c) => c. remove_cfm_and_bias_from_rhs ( ) ,
2525 }
2626 }
2727 pub fn warmstart (
@@ -31,12 +31,10 @@ impl AnyContactConstraintMut<'_> {
3131 generic_solver_vels : & mut DVector < Real > ,
3232 ) {
3333 match self {
34- Self :: GenericTwoBodies ( c) => {
35- c. warmstart ( generic_jacobians, solver_vels, generic_solver_vels)
36- }
37- Self :: SimdTwoBodiesCoulomb ( c) => c. warmstart ( solver_vels) ,
34+ Self :: Generic ( c) => c. warmstart ( generic_jacobians, solver_vels, generic_solver_vels) ,
35+ Self :: WithCoulombFriction ( c) => c. warmstart ( solver_vels) ,
3836 #[ cfg( feature = "dim3" ) ]
39- Self :: SimdTwoBodiesTwist ( c) => c. warmstart ( solver_vels) ,
37+ Self :: WithTwistFriction ( c) => c. warmstart ( solver_vels) ,
4038 }
4139 }
4240
@@ -47,21 +45,19 @@ impl AnyContactConstraintMut<'_> {
4745 generic_solver_vels : & mut DVector < Real > ,
4846 ) {
4947 match self {
50- Self :: GenericTwoBodies ( c) => {
51- c. solve ( generic_jacobians, bodies, generic_solver_vels, true , true )
52- }
53- Self :: SimdTwoBodiesCoulomb ( c) => c. solve ( bodies, true , true ) ,
48+ Self :: Generic ( c) => c. solve ( generic_jacobians, bodies, generic_solver_vels, true , true ) ,
49+ Self :: WithCoulombFriction ( c) => c. solve ( bodies, true , true ) ,
5450 #[ cfg( feature = "dim3" ) ]
55- Self :: SimdTwoBodiesTwist ( c) => c. solve ( bodies, true , true ) ,
51+ Self :: WithTwistFriction ( c) => c. solve ( bodies, true , true ) ,
5652 }
5753 }
5854
5955 pub fn writeback_impulses ( & mut self , manifolds_all : & mut [ & mut ContactManifold ] ) {
6056 match self {
61- Self :: GenericTwoBodies ( c) => c. writeback_impulses ( manifolds_all) ,
62- Self :: SimdTwoBodiesCoulomb ( c) => c. writeback_impulses ( manifolds_all) ,
57+ Self :: Generic ( c) => c. writeback_impulses ( manifolds_all) ,
58+ Self :: WithCoulombFriction ( c) => c. writeback_impulses ( manifolds_all) ,
6359 #[ cfg( feature = "dim3" ) ]
64- Self :: SimdTwoBodiesTwist ( c) => c. writeback_impulses ( manifolds_all) ,
60+ Self :: WithTwistFriction ( c) => c. writeback_impulses ( manifolds_all) ,
6561 }
6662 }
6763}
0 commit comments