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§
Source§impl 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 Freeze for Material
impl RefUnwindSafe for Material
impl Send for Material
impl Sync for Material
impl Unpin for Material
impl UnwindSafe for Material
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
Mutably borrows from an owned value. Read more