#[repr(i32)]
pub enum PxMaterialFlag { DisableFriction = 1, DisableStrongFriction = 2, ImprovedPatchFriction = 4, CompliantContact = 8, }
Expand description

Flags which control the behavior of a material.

Variants§

§

DisableFriction = 1

If this flag is set, friction computations are always skipped between shapes with this material and any other shape.

§

DisableStrongFriction = 2

Whether to use strong friction. The difference between “normal” and “strong” friction is that the strong friction feature remembers the “friction error” between simulation steps. The friction is a force trying to hold objects in place (or slow them down) and this is handled in the solver. But since the solver is only an approximation, the result of the friction calculation can include a small “error” - e.g. a box resting on a slope should not move at all if the static friction is in action, but could slowly glide down the slope because of a small friction error in each simulation step. The strong friction counter-acts this by remembering the small error and taking it to account during the next simulation step.

However, in some cases the strong friction could cause problems, and this is why it is possible to disable the strong friction feature by setting this flag. One example is raycast vehicles that are sliding fast across the surface, but still need a precise steering behavior. It may be a good idea to reenable the strong friction when objects are coming to a rest, to prevent them from slowly creeping down inclines.

Note: This flag only has an effect if the PxMaterialFlag::eDISABLE_FRICTION bit is 0.

§

ImprovedPatchFriction = 4

Whether to use the patch friction model. This flag only has an effect if PxFrictionType::ePATCH friction model is used.

When using the patch friction model, up to 2 friction anchors are generated per patch. As the number of friction anchors can be smaller than the number of contacts, the normal force is accumulated over all contacts and used to compute friction for all anchors. Where there are more than 2 anchors, this can produce frictional behavior that is too strong (approximately 2x as strong as analytical models suggest).

This flag causes the normal force to be distributed between the friction anchors such that the total amount of friction applied does not exceed the analytical results.

§

CompliantContact = 8

This flag has the effect of enabling an implicit spring model for the normal force computation.

Trait Implementations§

source§

impl Clone for PxMaterialFlag

source§

fn clone(&self) -> PxMaterialFlag

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PxMaterialFlag

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for PxMaterialFlag

source§

fn eq(&self, other: &PxMaterialFlag) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for PxMaterialFlag

source§

impl Eq for PxMaterialFlag

source§

impl StructuralEq for PxMaterialFlag

source§

impl StructuralPartialEq for PxMaterialFlag

Auto Trait Implementations§

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> 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> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

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>,

§

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.