diff options
| author | Crozet Sébastien <developer@crozet.re> | 2021-01-04 17:59:51 +0100 |
|---|---|---|
| committer | Crozet Sébastien <developer@crozet.re> | 2021-01-04 17:59:56 +0100 |
| commit | c28b14d31c43e1eb97a81df7673127d0c22d8deb (patch) | |
| tree | 05c85c5d00017235037d4be0782d3351ba5f3dff /src/dynamics/solver/position_constraint.rs | |
| parent | aa61fe65e3ff0289ecab57b4053a3410cf6d4a87 (diff) | |
| download | rapier-c28b14d31c43e1eb97a81df7673127d0c22d8deb.tar.gz rapier-c28b14d31c43e1eb97a81df7673127d0c22d8deb.tar.bz2 rapier-c28b14d31c43e1eb97a81df7673127d0c22d8deb.zip | |
Refactor the parallel solver code the same way we did with the non-parallel solver.
Diffstat (limited to 'src/dynamics/solver/position_constraint.rs')
| -rw-r--r-- | src/dynamics/solver/position_constraint.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dynamics/solver/position_constraint.rs b/src/dynamics/solver/position_constraint.rs index e7188f8..9aa10bb 100644 --- a/src/dynamics/solver/position_constraint.rs +++ b/src/dynamics/solver/position_constraint.rs @@ -53,8 +53,8 @@ pub(crate) struct PositionConstraint { impl PositionConstraint { #[cfg(feature = "parallel")] pub fn num_active_constraints(manifold: &ContactManifold) -> usize { - let rest = manifold.num_active_contacts() % MAX_MANIFOLD_POINTS != 0; - manifold.num_active_contacts() / MAX_MANIFOLD_POINTS + rest as usize + let rest = manifold.data.solver_contacts.len() % MAX_MANIFOLD_POINTS != 0; + manifold.data.solver_contacts.len() / MAX_MANIFOLD_POINTS + rest as usize } pub fn generate( |
