[][src]Struct nphysics2d::material::BasicMaterial

pub struct BasicMaterial<N: Real> {
    pub id: Option<u32>,
    pub restitution: N,
    pub friction: N,
    pub surface_velocity: Option<Vector<N>>,
    pub restitution_combine_mode: MaterialCombineMode,
    pub friction_combine_mode: MaterialCombineMode,
}

Description of the state of surface of a solid.

Strictly speaking, the coefficient provided here only exist when considering a pair of touching surfaces. In practice, nphysics will average the coefficient of the two surfaces in contact in order to deduce the restitution/friction coefficient.

Fields

The ID of this material for automatic lookup.

Restitution coefficient of the surface.

Friction coefficient of the surface.

The fictitious velocity at the surface of this material.

The way restitution coefficients are combined if no match was found in the material lookup tables.

The way friction coefficients are combined if no match was found in the material lookup tables.

Methods

impl<N: Real> BasicMaterial<N>
[src]

Initialize a material with the specified restitution and friction coefficients.

Trait Implementations

impl<N: Real> Material<N> for BasicMaterial<N>
[src]

impl<N: Copy + Real> Copy for BasicMaterial<N>
[src]

impl<N: Clone + Real> Clone for BasicMaterial<N>
[src]

Performs copy-assignment from source. Read more

impl<N: Real> Default for BasicMaterial<N>
[src]

impl<N: Debug + Real> Debug for BasicMaterial<N>
[src]

Auto Trait Implementations

impl<N> Send for BasicMaterial<N> where
    N: Scalar

impl<N> Sync for BasicMaterial<N> where
    N: Scalar

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Downcast for T where
    T: Any

impl<SS, SP> SupersetOf for SP where
    SS: SubsetOf<SP>, 

impl<T> Same for T

Should always be Self