Trait physx::material::Material [−][src]
Provided methods
unsafe fn from_raw(
ptr: *mut PxMaterial,
user_data: Self::UserData
) -> Option<Owner<Self>>
[src]
ptr: *mut PxMaterial,
user_data: Self::UserData
) -> Option<Owner<Self>>
Safety
Owner's own the pointer they wrap, using the pointer after dropping the Owner,
or creating multiple Owners from the same pointer will cause UB. Use into_ptr
to
retrieve the pointer and consume the Owner without dropping the pointee.
fn get_user_data(&self) -> &Self::UserData
[src]
Get a reference to the user data.
fn get_user_data_mut(&mut self) -> &mut Self::UserData
[src]
Get a mutable reference to the user data.
fn get_reference_count(&self) -> u32
[src]
Get the current ref count of the material.
fn acquire_reference(&mut self)
[src]
Increment the ref count of the material.
fn set_dynamic_friction(&mut self, coefficient: f32)
[src]
Set the dynamic friction.
- Friction must be positive.
- If greater than static friction, effective static friction will be increased to match.
- Will not wake actors.
fn get_dynamic_friction(&self) -> f32
[src]
Get the dynamic friction.
fn set_static_friction(&mut self, coefficient: f32)
[src]
Set the static friction.
- Friction must be positive, negative friction is set to 0.0.
- Will not wake actors.
fn get_static_friction(&self) -> f32
[src]
Get the static frction.
fn set_restitution(&mut self, restitution: f32)
[src]
Set the restitution.
- Restitution must be in [0.0 ..= 1.0], values outside tyhe range are clamped.
- A reitution of 0.0 minimizes bouncing, higher values mean more bounce.
fn get_restitution(&self) -> f32
[src]
Get the restitution.
fn set_flag(&mut self, flag: MaterialFlag, set: bool)
[src]
Set a material flag.
fn set_flags(&mut self, flags: MaterialFlags)
[src]
Set all the material flags.
fn get_flags(&self) -> MaterialFlags
[src]
Get the material flags.
fn set_friction_combined_mode(&mut self, combine_mode: CombineMode)
[src]
Set the friction combine mode.
fn get_friction_combine_mode(&self) -> CombineMode
[src]
Get the friction combine mode.
fn set_restitution_combine_mode(&mut self, combine_mode: CombineMode)
[src]
Set the restitution combine mode.
fn get_restitution_combine_mode(&self) -> CombineMode
[src]
Get the restitution combine mode.