Skip to main content

Counters

Struct Counters 

Source
pub struct Counters {
Show 20 fields pub body_count: i32, pub shape_count: i32, pub contact_count: i32, pub joint_count: i32, pub island_count: i32, pub stack_used: i32, pub arena_capacity: i32, pub static_tree_height: i32, pub tree_height: i32, pub sat_call_count: i32, pub sat_cache_hit_count: i32, pub byte_count: i32, pub task_count: i32, pub color_counts: [i32; 24], pub manifold_counts: [i32; 8], pub awake_contact_count: i32, pub recycled_contact_count: i32, pub distance_iterations: i32, pub push_back_iterations: i32, pub root_iterations: i32,
}
Expand description

World counters reported by Box3D for diagnostics and tests.

Fields§

§body_count: i32

Number of live bodies.

§shape_count: i32

Number of live shapes.

§contact_count: i32

Number of live contacts.

§joint_count: i32

Number of live joints.

§island_count: i32

Number of solver islands.

§stack_used: i32

Stack memory used by Box3D.

§arena_capacity: i32

Arena memory capacity.

§static_tree_height: i32

Static broad-phase tree height.

§tree_height: i32

Dynamic broad-phase tree height.

§sat_call_count: i32

Number of separating-axis test calls.

§sat_cache_hit_count: i32

Number of separating-axis cache hits.

§byte_count: i32

Native byte count reported by Box3D.

§task_count: i32

Number of native tasks scheduled by the last step.

§color_counts: [i32; 24]

Solver graph color distribution.

§manifold_counts: [i32; 8]

Contact manifold point-count distribution.

§awake_contact_count: i32

Number of awake contacts.

§recycled_contact_count: i32

Number of recycled contacts.

§distance_iterations: i32

Distance solver iteration count.

§push_back_iterations: i32

Push-back solver iteration count.

§root_iterations: i32

Root solver iteration count.

Implementations§

Source§

impl Counters

Source

pub const fn from_raw(raw: b3Counters) -> Self

Converts raw Box3D counters into the Rust value type.

Trait Implementations§

Source§

impl Clone for Counters

Source§

fn clone(&self) -> Counters

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Counters

Source§

impl Debug for Counters

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Counters

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Eq for Counters

Source§

impl PartialEq for Counters

Source§

fn eq(&self, other: &Counters) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for Counters

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.