[][src]Struct rapier3d::dynamics::ActivationStatus

pub struct ActivationStatus {
    pub threshold: Real,
    pub energy: Real,
    pub sleeping: bool,
}

The activation status of a body.

This controls whether a body is sleeping or not. If the threshold is negative, the body never sleeps.

Fields

threshold: Real

The threshold pseudo-kinetic energy bellow which the body can fall asleep.

energy: Real

The current pseudo-kinetic energy of the body.

sleeping: bool

Is this body already sleeping?

Implementations

impl ActivationStatus[src]

pub fn default_threshold() -> Real[src]

The default amount of energy bellow which a body can be put to sleep by nphysics.

pub fn new_active() -> Self[src]

Create a new activation status initialised with the default activation threshold and is active.

pub fn new_inactive() -> Self[src]

Create a new activation status initialised with the default activation threshold and is inactive.

pub fn is_active(&self) -> bool[src]

Returns true if the body is not asleep.

Trait Implementations

impl Clone for ActivationStatus[src]

impl Copy for ActivationStatus[src]

impl Debug for ActivationStatus[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Downcast for T where
    T: Any
[src]

impl<T> DowncastSync for T where
    T: Send + Sync + Any
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,