feat: persistent islands + manifold reduction (#895)

* feat: initial implementation of contact manifold reduction

* feat: try bepu-like manifold reduction

* feat: simplification of the constraints counting and indexing logic

* feat: add concept of incremental islands with a single awake island

More islands manager fixes

* feat: start adding support for multiple awake islands

* feat: add more timings

* feat: implement incremental island split & merge

* chore: refactor islands manager into multiple files

* chore: refactor manifold reduction to its own file + add naive reduction method

* feat: add islands manager validation checks

* fix various bugs in the new islands system

* chore: remove redundant active_set_offset field
This commit is contained in:
Sébastien Crozet
2026-01-09 17:04:02 +01:00
committed by GitHub
parent 134132900a
commit 48de83817e
40 changed files with 2099 additions and 1114 deletions

View File

@@ -8,6 +8,9 @@ pub struct CollisionDetectionCounters {
pub ncontact_pairs: usize,
/// Time spent for the broad-phase of the collision detection.
pub broad_phase_time: Timer,
/// Time spent by the final broad-phase AABB update after body movement to keep
/// user scene queries valid.
pub final_broad_phase_time: Timer,
/// Time spent for the narrow-phase of the collision detection.
pub narrow_phase_time: Timer,
}
@@ -18,6 +21,7 @@ impl CollisionDetectionCounters {
CollisionDetectionCounters {
ncontact_pairs: 0,
broad_phase_time: Timer::new(),
final_broad_phase_time: Timer::new(),
narrow_phase_time: Timer::new(),
}
}
@@ -26,6 +30,7 @@ impl CollisionDetectionCounters {
pub fn reset(&mut self) {
self.ncontact_pairs = 0;
self.broad_phase_time.reset();
self.final_broad_phase_time.reset();
self.narrow_phase_time.reset();
}
}
@@ -34,6 +39,7 @@ impl Display for CollisionDetectionCounters {
fn fmt(&self, f: &mut Formatter) -> Result {
writeln!(f, "Number of contact pairs: {}", self.ncontact_pairs)?;
writeln!(f, "Broad-phase time: {}", self.broad_phase_time)?;
writeln!(f, "Final broad-phase time: {}", self.final_broad_phase_time)?;
writeln!(f, "Narrow-phase time: {}", self.narrow_phase_time)
}
}