#[repr(C)]pub struct b2SurfaceMaterial {
pub friction: f32,
pub restitution: f32,
pub rollingResistance: f32,
pub tangentSpeed: f32,
pub userMaterialId: u64,
pub customColor: u32,
}Expand description
Surface materials allow chain shapes to have per segment surface properties. @ingroup shape
Fields§
§friction: f32The Coulomb (dry) friction coefficient, usually in the range [0,1].
restitution: f32The coefficient of restitution (bounce) usually in the range [0,1]. https://en.wikipedia.org/wiki/Coefficient_of_restitution
rollingResistance: f32The rolling resistance usually in the range [0,1].
tangentSpeed: f32The tangent speed for conveyor belts
userMaterialId: u64User material identifier. This is passed with query results and to friction and restitution combining functions. It is not used internally.
customColor: u32Custom debug draw color.
Trait Implementations§
Source§impl Clone for b2SurfaceMaterial
impl Clone for b2SurfaceMaterial
Source§fn clone(&self) -> b2SurfaceMaterial
fn clone(&self) -> b2SurfaceMaterial
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for b2SurfaceMaterial
impl Debug for b2SurfaceMaterial
impl Copy for b2SurfaceMaterial
Auto Trait Implementations§
impl Freeze for b2SurfaceMaterial
impl RefUnwindSafe for b2SurfaceMaterial
impl Send for b2SurfaceMaterial
impl Sync for b2SurfaceMaterial
impl Unpin for b2SurfaceMaterial
impl UnwindSafe for b2SurfaceMaterial
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)