PxMaterial

Struct PxMaterial 

Source
pub struct PxMaterial<U> { /* private fields */ }
Expand description

A new type wrapper for PxMaterial. Parametrized by its user data type.

Trait Implementations§

Source§

impl<P, U> Class<P> for PxMaterial<U>
where PxMaterial: Class<P>,

Source§

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.
Source§

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.
Source§

impl<U> Drop for PxMaterial<U>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl<M> Material for PxMaterial<M>

Source§

unsafe fn from_raw( ptr: *mut PxMaterial, user_data: Self::UserData, ) -> Option<Owner<Self>>

Safety Read more
Source§

fn get_user_data(&self) -> &Self::UserData

Get a reference to the user data.
Source§

fn get_user_data_mut(&mut self) -> &mut Self::UserData

Get a mutable reference to the user data.
Source§

fn set_dynamic_friction(&mut self, coefficient: f32)

Set the dynamic friction. Read more
Source§

fn get_dynamic_friction(&self) -> f32

Get the dynamic friction.
Source§

fn set_static_friction(&mut self, coefficient: f32)

Set the static friction. Read more
Source§

fn get_static_friction(&self) -> f32

Get the static frction.
Source§

fn set_restitution(&mut self, restitution: f32)

Set the restitution. Read more
Source§

fn get_restitution(&self) -> f32

Get the restitution.
Source§

fn set_flag(&mut self, flag: MaterialFlag, set: bool)

Set a material flag.
Source§

fn set_flags(&mut self, flags: MaterialFlags)

Set all the material flags.
Source§

fn get_flags(&self) -> MaterialFlags

Get the material flags.
Source§

fn set_friction_combined_mode(&mut self, combine_mode: CombineMode)

Set the friction combine mode.
Source§

fn get_friction_combine_mode(&self) -> CombineMode

Get the friction combine mode.
Source§

fn set_restitution_combine_mode(&mut self, combine_mode: CombineMode)

Set the restitution combine mode.
Source§

fn get_restitution_combine_mode(&self) -> CombineMode

Get the restitution combine mode.
Source§

impl<U: Send> Send for PxMaterial<U>

Source§

impl<U: Sync> Sync for PxMaterial<U>

Auto Trait Implementations§

§

impl<U> Freeze for PxMaterial<U>

§

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§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Base for T
where T: Class<PxBase>,

Source§

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
Source§

fn get_concrete_type(&self) -> ConcreteType

Returns an enumerated value identifying the type. Read more
Source§

fn set_base_flag(&mut self, flag: BaseFlag, value: bool)

Set or unset the specified flag on this object.
Source§

fn set_base_flags(&mut self, in_flags: BaseFlags)

Set the BaseFlags of this object. Note that replaces all flags currently on the object. Use set_base_flag to set individual flags.
Source§

fn get_base_flags(&self) -> BaseFlags

Read the BaseFlags of this object
Source§

fn is_releasable(&self) -> bool

Returns true if this object can be released, i.e., it is not subordinate.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> RefCounted for T
where T: Class<PxRefCounted>,

Source§

fn release(&mut self)

Decrements the reference count of the object and releases it if the new reference count is zero.
Source§

fn get_reference_count(&self) -> u32

Returns the reference count of the object. Read more
Source§

fn acquire_reference(&mut self)

Acquires a counted reference to this object. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.