pub struct Counters {
pub enabled: bool,
pub step_time: Timer,
pub custom: Timer,
pub stages: StagesCounters,
pub cd: CollisionDetectionCounters,
pub solver: SolverCounters,
pub ccd: CCDCounters,
}
Expand description
Aggregation of all the performances counters tracked by rapier.
Fields
enabled: bool
Whether thi counter is enabled or not.
step_time: Timer
Timer for a whole timestep.
custom: Timer
Timer used for debugging.
stages: StagesCounters
Counters of every satge of one time step.
cd: CollisionDetectionCounters
Counters of the collision-detection stage.
solver: SolverCounters
Counters of the constraints resolution and force computation stage.
ccd: CCDCounters
Counters for the CCD resolution stage.
Implementations
sourceimpl Counters
impl Counters
sourcepub fn step_started(&mut self)
pub fn step_started(&mut self)
Notify that the time-step has started.
sourcepub fn step_completed(&mut self)
pub fn step_completed(&mut self)
Notfy that the time-step has finished.
sourcepub fn custom_started(&mut self)
pub fn custom_started(&mut self)
Notify that the custom operation has started.
sourcepub fn custom_completed(&mut self)
pub fn custom_completed(&mut self)
Notfy that the custom operation has finished.
sourcepub fn custom_time(&self) -> f64
pub fn custom_time(&self) -> f64
Total time of a custom event.
sourcepub fn set_nconstraints(&mut self, n: usize)
pub fn set_nconstraints(&mut self, n: usize)
Set the number of constraints generated.
sourcepub fn set_ncontacts(&mut self, n: usize)
pub fn set_ncontacts(&mut self, n: usize)
Set the number of contacts generated.
sourcepub fn set_ncontact_pairs(&mut self, n: usize)
pub fn set_ncontact_pairs(&mut self, n: usize)
Set the number of contact pairs generated.
sourceimpl Counters
impl Counters
sourcepub fn update_started(&mut self)
pub fn update_started(&mut self)
Start this timer.
sourcepub fn update_completed(&mut self)
pub fn update_completed(&mut self)
Stop this timer.
sourcepub fn update_time(&self) -> f64
pub fn update_time(&self) -> f64
Gets the time elapsed for this timer.
sourceimpl Counters
impl Counters
sourcepub fn collision_detection_started(&mut self)
pub fn collision_detection_started(&mut self)
Start this timer.
sourcepub fn collision_detection_completed(&mut self)
pub fn collision_detection_completed(&mut self)
Stop this timer.
sourcepub fn collision_detection_time(&self) -> f64
pub fn collision_detection_time(&self) -> f64
Gets the time elapsed for this timer.
sourceimpl Counters
impl Counters
sourcepub fn island_construction_started(&mut self)
pub fn island_construction_started(&mut self)
Start this timer.
sourcepub fn island_construction_completed(&mut self)
pub fn island_construction_completed(&mut self)
Stop this timer.
sourcepub fn island_construction_time(&self) -> f64
pub fn island_construction_time(&self) -> f64
Gets the time elapsed for this timer.
sourceimpl Counters
impl Counters
sourcepub fn solver_started(&mut self)
pub fn solver_started(&mut self)
Start this timer.
sourcepub fn solver_completed(&mut self)
pub fn solver_completed(&mut self)
Stop this timer.
sourcepub fn solver_time(&self) -> f64
pub fn solver_time(&self) -> f64
Gets the time elapsed for this timer.
sourceimpl Counters
impl Counters
sourcepub fn ccd_started(&mut self)
pub fn ccd_started(&mut self)
Start this timer.
sourcepub fn ccd_completed(&mut self)
pub fn ccd_completed(&mut self)
Stop this timer.
sourceimpl Counters
impl Counters
sourcepub fn assembly_started(&mut self)
pub fn assembly_started(&mut self)
Start this timer.
sourcepub fn assembly_completed(&mut self)
pub fn assembly_completed(&mut self)
Stop this timer.
sourcepub fn assembly_time(&self) -> f64
pub fn assembly_time(&self) -> f64
Gets the time elapsed for this timer.
sourceimpl Counters
impl Counters
sourcepub fn velocity_resolution_started(&mut self)
pub fn velocity_resolution_started(&mut self)
Start this timer.
sourcepub fn velocity_resolution_completed(&mut self)
pub fn velocity_resolution_completed(&mut self)
Stop this timer.
sourcepub fn velocity_resolution_time(&self) -> f64
pub fn velocity_resolution_time(&self) -> f64
Gets the time elapsed for this timer.
sourceimpl Counters
impl Counters
sourcepub fn velocity_update_started(&mut self)
pub fn velocity_update_started(&mut self)
Start this timer.
sourcepub fn velocity_update_completed(&mut self)
pub fn velocity_update_completed(&mut self)
Stop this timer.
sourcepub fn velocity_update_time(&self) -> f64
pub fn velocity_update_time(&self) -> f64
Gets the time elapsed for this timer.
sourceimpl Counters
impl Counters
sourcepub fn position_resolution_started(&mut self)
pub fn position_resolution_started(&mut self)
Start this timer.
sourcepub fn position_resolution_completed(&mut self)
pub fn position_resolution_completed(&mut self)
Stop this timer.
sourcepub fn position_resolution_time(&self) -> f64
pub fn position_resolution_time(&self) -> f64
Gets the time elapsed for this timer.
sourceimpl Counters
impl Counters
sourcepub fn broad_phase_started(&mut self)
pub fn broad_phase_started(&mut self)
Start this timer.
sourcepub fn broad_phase_completed(&mut self)
pub fn broad_phase_completed(&mut self)
Stop this timer.
sourcepub fn broad_phase_time(&self) -> f64
pub fn broad_phase_time(&self) -> f64
Gets the time elapsed for this timer.
sourceimpl Counters
impl Counters
sourcepub fn narrow_phase_started(&mut self)
pub fn narrow_phase_started(&mut self)
Start this timer.
sourcepub fn narrow_phase_completed(&mut self)
pub fn narrow_phase_completed(&mut self)
Stop this timer.
sourcepub fn narrow_phase_time(&self) -> f64
pub fn narrow_phase_time(&self) -> f64
Gets the time elapsed for this timer.
Trait Implementations
impl Copy for Counters
Auto Trait Implementations
impl RefUnwindSafe for Counters
impl Send for Counters
impl Sync for Counters
impl Unpin for Counters
impl UnwindSafe for Counters
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
sourcefn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
sourcefn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
sourcefn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
sourcefn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
sourceimpl<T> DowncastSync for T where
T: Any + Send + Sync,
impl<T> DowncastSync for T where
T: Any + Send + Sync,
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
sourcefn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
sourcefn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if self
is actually part of its subset T
(and can be converted to it).
sourcefn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
sourcefn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more