Struct nphysics3d::object::ActivationStatus [−][src]
pub struct ActivationStatus<N: Real> { /* fields omitted */ }
The activation status of a body.
This controls whether a body is sleeping or not.
Methods
impl<N: Real> ActivationStatus<N>
[src]
impl<N: Real> ActivationStatus<N>
pub fn default_threshold() -> N
[src]
pub fn default_threshold() -> N
The default amount of energy bellow which a body can be put to sleep by nphysics.
pub fn new_active() -> Self
[src]
pub fn new_active() -> Self
Create a new activation status initialised with the default activation threshold and is active.
pub fn new_inactive() -> Self
[src]
pub fn new_inactive() -> Self
Create a new activation status initialised with the default activation threshold and is inactive.
pub fn is_active(&self) -> bool
[src]
pub fn is_active(&self) -> bool
Retuns true
if the body is not asleep.
pub fn deactivation_threshold(&self) -> Option<N>
[src]
pub fn deactivation_threshold(&self) -> Option<N>
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]
pub fn set_deactivation_threshold(&mut self, threshold: Option<N>)
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]
pub fn energy(&self) -> N
The current energy averaged through several frames.
pub fn set_energy(&mut self, energy: N)
[src]
pub fn set_energy(&mut self, energy: N)
Sets the current average energy of the body.
Trait Implementations
impl<N: Copy + Real> Copy for ActivationStatus<N>
[src]
impl<N: Copy + Real> Copy for ActivationStatus<N>
impl<N: Clone + Real> Clone for ActivationStatus<N>
[src]
impl<N: Clone + Real> Clone for ActivationStatus<N>
fn clone(&self) -> ActivationStatus<N>
[src]
fn clone(&self) -> ActivationStatus<N>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<N: Debug + Real> Debug for ActivationStatus<N>
[src]
impl<N: Debug + Real> Debug for ActivationStatus<N>
Auto Trait Implementations
impl<N> Send for ActivationStatus<N>
impl<N> Send for ActivationStatus<N>
impl<N> Sync for ActivationStatus<N>
impl<N> Sync for ActivationStatus<N>