Enum physx_sys::PxCombineMode
source · #[repr(i32)]pub enum PxCombineMode {
Average = 0,
Min = 1,
Multiply = 2,
Max = 3,
NValues = 4,
Pad32 = 2_147_483_647,
}
Expand description
Enumeration that determines the way in which two material properties will be combined to yield a friction or restitution coefficient for a collision.
When two actors come in contact with each other, they each have materials with various coefficients, but we only need a single set of coefficients for the pair.
Physics doesn’t have any inherent combinations because the coefficients are determined empirically on a case by case basis. However, simulating this with a pairwise lookup table is often impractical.
For this reason the following combine behaviors are available:
eAVERAGE eMIN eMULTIPLY eMAX
The effective combine mode for the pair is maximum(material0.combineMode, material1.combineMode).
Variants§
Average = 0
Average: (a + b)/2
Min = 1
Minimum: minimum(a,b)
Multiply = 2
Multiply: a*b
Max = 3
Maximum: maximum(a,b)
NValues = 4
This is not a valid combine mode, it is a sentinel to denote the number of possible values. We assert that the variable’s value is smaller than this.
Pad32 = 2_147_483_647
This is not a valid combine mode, it is to assure that the size of the enum type is big enough.
Trait Implementations§
source§impl Clone for PxCombineMode
impl Clone for PxCombineMode
source§fn clone(&self) -> PxCombineMode
fn clone(&self) -> PxCombineMode
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for PxCombineMode
impl Debug for PxCombineMode
source§impl PartialEq for PxCombineMode
impl PartialEq for PxCombineMode
source§fn eq(&self, other: &PxCombineMode) -> bool
fn eq(&self, other: &PxCombineMode) -> bool
self
and other
values to be equal, and is used
by ==
.