Struct rhusics_core::Material
source · pub struct Material { /* private fields */ }
Expand description
Physics material
Used to describe physical properties of physical entities, such as density and restitution.
The default material has density 1, such that only the volume affects its mass, and restitution 1, such that all energy is preserved in collisions.
Implementations
sourceimpl Material
impl Material
sourcepub const BOUNCY_BALL: Material = _
pub const BOUNCY_BALL: Material = _
Bouncy Ball
sourcepub const SUPER_BALL: Material = _
pub const SUPER_BALL: Material = _
Super Ball
sourcepub fn restitution<S>(&self) -> Swhere
S: BaseFloat,
pub fn restitution<S>(&self) -> Swhere
S: BaseFloat,
Get restitution
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Material
impl Send for Material
impl Sync for Material
impl Unpin for Material
impl UnwindSafe for Material
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