pub struct SurfaceMaterial(/* private fields */);Expand description
Shape surface material parameters.
Implementations§
Source§impl SurfaceMaterial
impl SurfaceMaterial
pub const fn from_raw(raw: b2SurfaceMaterial) -> Self
pub const fn into_raw(self) -> b2SurfaceMaterial
pub const fn friction(&self) -> f32
pub const fn restitution(&self) -> f32
pub const fn rolling_resistance(&self) -> f32
pub const fn tangent_speed(&self) -> f32
pub const fn user_material_id(&self) -> u64
pub const fn custom_color(&self) -> HexColor
pub fn with_friction(self, v: f32) -> Self
pub fn with_restitution(self, v: f32) -> Self
pub fn with_rolling_resistance(self, v: f32) -> Self
pub fn with_tangent_speed(self, v: f32) -> Self
pub fn with_user_material_id(self, v: u64) -> Self
pub fn with_custom_color(self, color: HexColor) -> Self
pub fn validate(&self) -> ApiResult<()>
Trait Implementations§
Source§impl Clone for SurfaceMaterial
impl Clone for SurfaceMaterial
Source§fn clone(&self) -> SurfaceMaterial
fn clone(&self) -> SurfaceMaterial
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SurfaceMaterial
impl Debug for SurfaceMaterial
Source§impl Default for SurfaceMaterial
impl Default for SurfaceMaterial
Source§impl PartialEq for SurfaceMaterial
impl PartialEq for SurfaceMaterial
impl Copy for SurfaceMaterial
Auto Trait Implementations§
impl Freeze for SurfaceMaterial
impl RefUnwindSafe for SurfaceMaterial
impl Send for SurfaceMaterial
impl Sync for SurfaceMaterial
impl Unpin for SurfaceMaterial
impl UnsafeUnpin for SurfaceMaterial
impl UnwindSafe for SurfaceMaterial
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