Implement the ability to run multiple CCD substeps.
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -114,6 +114,18 @@ impl Counters {
|
||||
pub fn set_ncontact_pairs(&mut self, n: usize) {
|
||||
self.cd.ncontact_pairs = n;
|
||||
}
|
||||
|
||||
/// Resets all the counters and timers.
|
||||
pub fn reset(&mut self) {
|
||||
if self.enabled {
|
||||
self.step_time.reset();
|
||||
self.custom.reset();
|
||||
self.stages.reset();
|
||||
self.cd.reset();
|
||||
self.solver.reset();
|
||||
self.ccd.reset();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
macro_rules! measure_method {
|
||||
|
||||
@@ -27,6 +27,15 @@ impl StagesCounters {
|
||||
ccd_time: Timer::new(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Resets all the counters and timers.
|
||||
pub fn reset(&mut self) {
|
||||
self.update_time.reset();
|
||||
self.collision_detection_time.reset();
|
||||
self.island_construction_time.reset();
|
||||
self.solver_time.reset();
|
||||
self.ccd_time.reset();
|
||||
}
|
||||
}
|
||||
|
||||
impl Display for StagesCounters {
|
||||
|
||||
Reference in New Issue
Block a user