[−][src]Trait nphysics2d::material::Material
An abstract material.
Required methods
fn local_properties(
&self,
context: MaterialContext<N>
) -> LocalMaterialProperties<N>
&self,
context: MaterialContext<N>
) -> LocalMaterialProperties<N>
Retrieve the local material properties of a collider at the given contact point.
Implementations
impl<N> dyn Material<N> where
N: Any + 'static,
N: RealField,
[src]
N: Any + 'static,
N: RealField,
pub fn is<__T: Material<N>>(&self) -> bool
[src]
Returns true if the trait object wraps an object of type __T
.
pub fn downcast<__T: Material<N>>(
self: Box<Self>
) -> Result<Box<__T>, Box<Self>>
[src]
self: Box<Self>
) -> Result<Box<__T>, Box<Self>>
Returns a boxed object from a boxed trait object if the underlying object is of type
__T
. Returns the original boxed trait if it isn't.
pub fn downcast_rc<__T: Material<N>>(
self: Rc<Self>
) -> Result<Rc<__T>, Rc<Self>>
[src]
self: Rc<Self>
) -> Result<Rc<__T>, Rc<Self>>
Returns an Rc
-ed object from an Rc
-ed trait object if the underlying object is of
type __T
. Returns the original Rc
-ed trait if it isn't.
pub fn downcast_ref<__T: Material<N>>(&self) -> Option<&__T>
[src]
Returns a reference to the object within the trait object if it is of type __T
, or
None
if it isn't.
pub fn downcast_mut<__T: Material<N>>(&mut self) -> Option<&mut __T>
[src]
Returns a mutable reference to the object within the trait object if it is of type
__T
, or None
if it isn't.
impl<N: RealField> dyn Material<N>
[src]
pub fn combine<M1: ?Sized, M2: ?Sized>(
table: &MaterialsCoefficientsTable<N>,
material1: &M1,
context1: MaterialContext<N>,
material2: &M2,
context2: MaterialContext<N>
) -> LocalMaterialProperties<N> where
M1: Material<N>,
M2: Material<N>,
[src]
table: &MaterialsCoefficientsTable<N>,
material1: &M1,
context1: MaterialContext<N>,
material2: &M2,
context2: MaterialContext<N>
) -> LocalMaterialProperties<N> where
M1: Material<N>,
M2: Material<N>,
Combine two materials given their contexts and a material lookup table.
Trait Implementations
impl<N: RealField> AsRef<dyn Material<N> + 'static> for MaterialHandle<N>
[src]
Implementors
impl<N: RealField> Material<N> for BasicMaterial<N>
[src]
fn local_properties(
&self,
context: MaterialContext<N>
) -> LocalMaterialProperties<N>
[src]
&self,
context: MaterialContext<N>
) -> LocalMaterialProperties<N>