pub struct RigidBodyActivation {
pub normalized_linear_threshold: f32,
pub angular_threshold: f32,
pub time_until_sleep: f32,
pub time_since_can_sleep: f32,
pub sleeping: bool,
}
Expand description
The rb_activation status of a body.
This controls whether a body is sleeping or not. If the threshold is negative, the body never sleeps.
Fields§
§normalized_linear_threshold: f32
The threshold linear velocity below which the body can fall asleep.
The value is “normalized”, i.e., the actual threshold applied by the physics engine
is equal to this value multiplied by IntegrationParameters::length_unit
.
angular_threshold: f32
The angular linear velocity below which the body can fall asleep.
time_until_sleep: f32
The amount of time the rigid-body must remain below the thresholds to be put to sleep.
time_since_can_sleep: f32
Since how much time can this body sleep?
sleeping: bool
Is this body sleeping?
Implementations§
Source§impl RigidBodyActivation
impl RigidBodyActivation
Sourcepub fn default_normalized_linear_threshold() -> f32
pub fn default_normalized_linear_threshold() -> f32
The default linear velocity below which a body can be put to sleep.
Sourcepub fn default_angular_threshold() -> f32
pub fn default_angular_threshold() -> f32
The default angular velocity below which a body can be put to sleep.
Sourcepub fn default_time_until_sleep() -> f32
pub fn default_time_until_sleep() -> f32
The amount of time the rigid-body must remain below it’s linear and angular velocity threshold before falling to sleep.
Sourcepub fn active() -> Self
pub fn active() -> Self
Create a new rb_activation status initialised with the default rb_activation threshold and is active.
Sourcepub fn inactive() -> Self
pub fn inactive() -> Self
Create a new rb_activation status initialised with the default rb_activation threshold and is inactive.
Sourcepub fn cannot_sleep() -> Self
pub fn cannot_sleep() -> Self
Create a new activation status that prevents the rigid-body from sleeping.
Trait Implementations§
Source§impl Clone for RigidBodyActivation
impl Clone for RigidBodyActivation
Source§fn clone(&self) -> RigidBodyActivation
fn clone(&self) -> RigidBodyActivation
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for RigidBodyActivation
impl Debug for RigidBodyActivation
Source§impl Default for RigidBodyActivation
impl Default for RigidBodyActivation
Source§impl PartialEq for RigidBodyActivation
impl PartialEq for RigidBodyActivation
impl Copy for RigidBodyActivation
impl StructuralPartialEq for RigidBodyActivation
Auto Trait Implementations§
impl Freeze for RigidBodyActivation
impl RefUnwindSafe for RigidBodyActivation
impl Send for RigidBodyActivation
impl Sync for RigidBodyActivation
impl Unpin for RigidBodyActivation
impl UnwindSafe for RigidBodyActivation
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.