[][src]Struct nphysics3d::material::MaterialsCoefficientsTable

pub struct MaterialsCoefficientsTable<N: RealField> { /* fields omitted */ }

A lookup table for friction and restitution coefficient associated to certain pairs of materials.

Methods

impl<N: RealField> MaterialsCoefficientsTable<N>[src]

pub fn new() -> Self[src]

Initialize an empty table of friction and restitution coefficients.

pub fn set_friction_coefficient(
    &mut self,
    m1: MaterialId,
    m2: MaterialId,
    coeff: N
)
[src]

Sets the friction coefficient associated to this pair of materials.

pub fn set_restitution_coefficient(
    &mut self,
    m1: MaterialId,
    m2: MaterialId,
    coeff: N
)
[src]

Sets the restitution coefficient associated to this pair of materials.

pub fn friction_coefficient(&self, m1: MaterialId, m2: MaterialId) -> Option<N>[src]

Retrieves the friction coefficient associated to this pair of materials.

Returns None if no coefficient was associated to this pair.

pub fn restitution_coefficient(
    &self,
    m1: MaterialId,
    m2: MaterialId
) -> Option<N>
[src]

Retrieves the restitution coefficient associated to this pair of materials.

Returns None if no coefficient was associated to this pair.

Auto Trait Implementations

Blanket Implementations

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

impl<T> From for T[src]

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

type Error = Infallible

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> BorrowMut for T where
    T: ?Sized
[src]

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

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Downcast for T where
    T: Any
[src]

impl<SS, SP> SupersetOf for SP where
    SS: SubsetOf<SP>, 
[src]

impl<T> Same for T

type Output = T

Should always be Self