Struct physx::material::PxMaterial
source · [−]#[repr(transparent)]pub struct PxMaterial<U> { /* private fields */ }
Expand description
A new type wrapper for PxMaterial. Parametrized by it’s user data type.
Trait Implementations
sourceimpl<P, U> Class<P> for PxMaterial<U>where
PxMaterial: Class<P>,
impl<P, U> Class<P> for PxMaterial<U>where
PxMaterial: Class<P>,
sourcefn as_ptr(&self) -> *const P
fn as_ptr(&self) -> *const P
Returns a raw const pointer to the wrapped type.
Retrieving a raw pointer is safe. However, pretty much any use of a raw pointer is unsafe.
In particular: this pointer should not be used to construct a second owning wrapper around the pointer. Read more
sourcefn as_mut_ptr(&mut self) -> *mut P
fn as_mut_ptr(&mut self) -> *mut P
Returns a raw mut pointer to the wrapped type.
Retrieving a raw pointer is safe. However, pretty much any use of a raw pointer is unsafe.
In particular: this pointer should not be used to construct a second owning wrapper around the pointer. Read more
sourceimpl<U> Drop for PxMaterial<U>
impl<U> Drop for PxMaterial<U>
sourceimpl<M> Material for PxMaterial<M>
impl<M> Material for PxMaterial<M>
sourceunsafe fn from_raw(
ptr: *mut PxMaterial,
user_data: Self::UserData
) -> Option<Owner<Self>>
unsafe fn from_raw(
ptr: *mut PxMaterial,
user_data: Self::UserData
) -> Option<Owner<Self>>
Safety Read more
sourcefn get_user_data(&self) -> &Self::UserData
fn get_user_data(&self) -> &Self::UserData
Get a reference to the user data.
sourcefn get_user_data_mut(&mut self) -> &mut Self::UserData
fn get_user_data_mut(&mut self) -> &mut Self::UserData
Get a mutable reference to the user data.
sourcefn get_reference_count(&self) -> u32
fn get_reference_count(&self) -> u32
Get the current ref count of the material.
sourcefn acquire_reference(&mut self)
fn acquire_reference(&mut self)
Increment the ref count of the material.
sourcefn set_dynamic_friction(&mut self, coefficient: f32)
fn set_dynamic_friction(&mut self, coefficient: f32)
Set the dynamic friction. Read more
sourcefn get_dynamic_friction(&self) -> f32
fn get_dynamic_friction(&self) -> f32
Get the dynamic friction.
sourcefn set_static_friction(&mut self, coefficient: f32)
fn set_static_friction(&mut self, coefficient: f32)
Set the static friction. Read more
sourcefn get_static_friction(&self) -> f32
fn get_static_friction(&self) -> f32
Get the static frction.
sourcefn set_restitution(&mut self, restitution: f32)
fn set_restitution(&mut self, restitution: f32)
Set the restitution. Read more
sourcefn get_restitution(&self) -> f32
fn get_restitution(&self) -> f32
Get the restitution.
sourcefn set_flag(&mut self, flag: MaterialFlag, set: bool)
fn set_flag(&mut self, flag: MaterialFlag, set: bool)
Set a material flag.
sourcefn set_flags(&mut self, flags: MaterialFlags)
fn set_flags(&mut self, flags: MaterialFlags)
Set all the material flags.
sourcefn get_flags(&self) -> MaterialFlags
fn get_flags(&self) -> MaterialFlags
Get the material flags.
sourcefn set_friction_combined_mode(&mut self, combine_mode: CombineMode)
fn set_friction_combined_mode(&mut self, combine_mode: CombineMode)
Set the friction combine mode.
sourcefn get_friction_combine_mode(&self) -> CombineMode
fn get_friction_combine_mode(&self) -> CombineMode
Get the friction combine mode.
sourcefn set_restitution_combine_mode(&mut self, combine_mode: CombineMode)
fn set_restitution_combine_mode(&mut self, combine_mode: CombineMode)
Set the restitution combine mode.
sourcefn get_restitution_combine_mode(&self) -> CombineMode
fn get_restitution_combine_mode(&self) -> CombineMode
Get the restitution combine mode.
impl<U: Send> Send for PxMaterial<U>
impl<U: Sync> Sync for PxMaterial<U>
Auto Trait Implementations
impl<U> RefUnwindSafe for PxMaterial<U>where
U: RefUnwindSafe,
impl<U> Unpin for PxMaterial<U>where
U: Unpin,
impl<U> UnwindSafe for PxMaterial<U>where
U: UnwindSafe,
Blanket Implementations
sourceimpl<T> Base for Twhere
T: Class<PxBase>,
impl<T> Base for Twhere
T: Class<PxBase>,
sourcefn get_concrete_type_name(&self) -> Option<&str>
fn get_concrete_type_name(&self) -> Option<&str>
Get the name of the real type referenced by this pointer, or None if the returned string is not valid
sourcefn get_concrete_type(&self) -> ConcreteType
fn get_concrete_type(&self) -> ConcreteType
Returns an enumerated value identifying the type. This may return ConcreteType::Undefined
in surprising situations, notably this does not seem to work with
get_active_actors
. Use
get_type
for actors if possible. Read moresourcefn set_base_flag(&mut self, flag: BaseFlag, value: bool)
fn set_base_flag(&mut self, flag: BaseFlag, value: bool)
Set or unset the specified flag on this object.
sourcefn set_base_flags(&mut self, in_flags: BitFlags<BaseFlag>)
fn set_base_flags(&mut self, in_flags: BitFlags<BaseFlag>)
Set the BaseFlags of this object. Note that replaces all flags currently
on the object. Use
set_base_flag
to set individual flags. Read moresourcefn get_base_flags(&self) -> BitFlags<BaseFlag>
fn get_base_flags(&self) -> BitFlags<BaseFlag>
Read the BaseFlags of this object
sourcefn is_releasable(&self) -> bool
fn is_releasable(&self) -> bool
Returns true if this object can be released, i.e., it is not subordinate.
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more