Struct let_engine::objects::physics::RigidBodyActivation
source · pub struct RigidBodyActivation {
pub 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§
§linear_threshold: f32The threshold linear velocity bellow which the body can fall asleep.
angular_threshold: f32The angular linear velocity bellow which the body can fall asleep.
time_until_sleep: f32The amount of time the rigid-body must remain below the thresholds to be put to sleep.
time_since_can_sleep: f32Since how much time can this body sleep?
sleeping: boolIs this body sleeping?
Implementations§
source§impl RigidBodyActivation
impl RigidBodyActivation
sourcepub fn default_linear_threshold() -> f32
pub fn default_linear_threshold() -> f32
The default linear velocity bellow which a body can be put to sleep.
sourcepub fn default_angular_threshold() -> f32
pub fn default_angular_threshold() -> f32
The default angular velocity bellow 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 bellow it’s linear and angular velocity threshold before falling to sleep.
sourcepub fn active() -> RigidBodyActivation
pub fn active() -> RigidBodyActivation
Create a new rb_activation status initialised with the default rb_activation threshold and is active.
sourcepub fn inactive() -> RigidBodyActivation
pub fn inactive() -> RigidBodyActivation
Create a new rb_activation status initialised with the default rb_activation threshold and is inactive.
sourcepub fn cannot_sleep() -> RigidBodyActivation
pub fn cannot_sleep() -> RigidBodyActivation
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§fn default() -> RigidBodyActivation
fn default() -> RigidBodyActivation
source§impl PartialEq for RigidBodyActivation
impl PartialEq for RigidBodyActivation
source§fn eq(&self, other: &RigidBodyActivation) -> bool
fn eq(&self, other: &RigidBodyActivation) -> bool
self and other values to be equal, and is used
by ==.impl Copy for RigidBodyActivation
impl StructuralPartialEq for RigidBodyActivation
Auto Trait Implementations§
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§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.§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.§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.§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.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§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).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.