PxCombineMode

Defined in include/PxMaterial.h

struct PxCombineMode

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).

Public Types

enum Enum

Values:

enumerator eAVERAGE

Average: (a + b)/2.

enumerator eMIN

Minimum: minimum(a,b)

enumerator eMULTIPLY

Multiply: a*b.

enumerator eMAX

Maximum: maximum(a,b)

enumerator eN_VALUES

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.

enumerator ePAD_32

This is not a valid combine mode, it is to assure that the size of the enum type is big enough.