aboutsummaryrefslogtreecommitdiff
path: root/src/counters/collision_detection_counters.rs
diff options
context:
space:
mode:
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 {