[][src]Struct nphysics3d::object::ActivationStatus

pub struct ActivationStatus<N: RealField> { /* fields omitted */ }

The activation status of a body.

This controls whether a body is sleeping or not.

Methods

impl<N: RealField> ActivationStatus<N>[src]

pub fn default_threshold() -> N[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]

Retuns true if the body is not asleep.

pub fn deactivation_threshold(&self) -> Option<N>[src]

The threshold bellow which the body can be put to sleep.

A value of None indicates that the body cannot sleep.

pub fn set_deactivation_threshold(&mut self, threshold: Option<N>)[src]

Set the threshold bellow which the body can be put to sleep.

A value of None prevents the body from sleeping.

pub fn energy(&self) -> N[src]

The current energy averaged through several frames.

pub fn set_energy(&mut self, energy: N)[src]

Sets the current average energy of the body.

Trait Implementations

impl<N: Clone + RealField> Clone for ActivationStatus<N>[src]

impl<N: Copy + RealField> Copy for ActivationStatus<N>[src]

impl<N: Debug + RealField> Debug for ActivationStatus<N>[src]

Auto Trait Implementations

impl<N> RefUnwindSafe for ActivationStatus<N> where
    N: RefUnwindSafe

impl<N> Send for ActivationStatus<N>

impl<N> Sync for ActivationStatus<N>

impl<N> Unpin for ActivationStatus<N> where
    N: Unpin

impl<N> UnwindSafe for ActivationStatus<N> where
    N: UnwindSafe

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

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

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Slottable for T where
    T: Copy
[src]

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

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>,