aboutsummaryrefslogtreecommitdiff
path: root/src/counters/collision_detection_counters.rs
diff options
context:
space:
mode:
authorSébastien Crozet <developer@crozet.re>2021-04-01 11:00:27 +0200
committerGitHub <noreply@github.com>2021-04-01 11:00:27 +0200
commitf8536e73fc092da5ded5c793d513c59296949aff (patch)
tree50af9e4312b22ea2c1cabc0e6d80dc73e59b3104 /src/counters/collision_detection_counters.rs
parent4b637c66ca40695f97f1ebdc38965e0d83ac5934 (diff)
parentcc3f16eb85f23a86ddd9d182d967cb12acc32354 (diff)
downloadrapier-f8536e73fc092da5ded5c793d513c59296949aff.tar.gz
rapier-f8536e73fc092da5ded5c793d513c59296949aff.tar.bz2
rapier-f8536e73fc092da5ded5c793d513c59296949aff.zip
Merge pull request #157 from dimforge/ccd
Implement Continuous Collision Detection
Diffstat (limited to 'src/counters/collision_detection_counters.rs')
-rw-r--r--src/counters/collision_detection_counters.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/counters/collision_detection_counters.rs b/src/counters/collision_detection_counters.rs
index d164452..90c5141 100644
--- a/src/counters/collision_detection_counters.rs
+++ b/src/counters/collision_detection_counters.rs
@@ -21,6 +21,13 @@ impl CollisionDetectionCounters {
narrow_phase_time: Timer::new(),
}
}
+
+ /// Resets all the coounters and timers.
+ pub fn reset(&mut self) {
+ self.ncontact_pairs = 0;
+ self.broad_phase_time.reset();
+ self.narrow_phase_time.reset();
+ }
}
impl Display for CollisionDetectionCounters {