- All Implemented Interfaces:
Serializable,Comparable<PxCombineModeEnum>,Constable
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).
Notes that the restitution coefficient is overloaded if it is negative and represents a spring stiffness for compliant contacts. In the compliant contact case, the following rules apply: * If a compliant (restitution < 0) material interacts with a rigid (restitution >= 0) material, the compliant behavior will be chosen independent of combine mode. In all other cases (i.e., also for compliant-compliant interactions) the combine mode is used. * For a compliant-compliant interaction with eMULTIPLY combine mode, we multiply the values but keep the sign negative. * The material damping follows the same logic, i.e., for the compliant vs non-compliant case, we take the damping value of the compliant material. Otherwise the combine mode is respected. * In an interaction between a compliant-force and a compliant-acceleration body the latter will dominate and exclusively determine the collision behavior with its parameters.
See also: PxMaterial.setFrictionCombineMode() PxMaterial.getFrictionCombineMode() PxMaterial.setRestitutionCombineMode() PxMaterial.getFrictionCombineMode()
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic PxCombineModeEnumforValue(int value) static PxCombineModeEnumReturns the enum constant of this class with the specified name.static PxCombineModeEnum[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
eAVERAGE
Average: (a + b)/2 -
eMIN
Minimum: minimum(a,b) -
eMULTIPLY
Multiply: a*b -
eMAX
Maximum: maximum(a,b)
-
-
Field Details
-
value
public final int value
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
forValue
-