Struct rhusics_core::PhysicalEntity
source · pub struct PhysicalEntity<S> { /* private fields */ }
Expand description
Physical entity
Implementations
sourceimpl<S> PhysicalEntity<S>where
S: BaseFloat,
impl<S> PhysicalEntity<S>where
S: BaseFloat,
sourcepub fn with_gravity_scale(self, gravity_scale: S) -> Self
pub fn with_gravity_scale(self, gravity_scale: S) -> Self
Set the amount that gravity will affect this entity The gravity constant is set globally for the physics world.
sourcepub fn with_damping(self, damping: S) -> Self
pub fn with_damping(self, damping: S) -> Self
Override the velocity damping for the entity The physics world control have a global damping set which is overriden by this.
sourcepub fn gravity_scale(&self) -> S
pub fn gravity_scale(&self) -> S
Get gravity scale
sourcepub fn deactivate(&mut self)
pub fn deactivate(&mut self)
Set entity to inactive, meaning physics will not act on it
Trait Implementations
sourceimpl<S: Clone> Clone for PhysicalEntity<S>
impl<S: Clone> Clone for PhysicalEntity<S>
sourcefn clone(&self) -> PhysicalEntity<S>
fn clone(&self) -> PhysicalEntity<S>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<S: Debug> Debug for PhysicalEntity<S>
impl<S: Debug> Debug for PhysicalEntity<S>
Auto Trait Implementations
impl<S> RefUnwindSafe for PhysicalEntity<S>where
S: RefUnwindSafe,
impl<S> Send for PhysicalEntity<S>where
S: Send,
impl<S> Sync for PhysicalEntity<S>where
S: Sync,
impl<S> Unpin for PhysicalEntity<S>where
S: Unpin,
impl<S> UnwindSafe for PhysicalEntity<S>where
S: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more