- All Implemented Interfaces:
Serializable,Comparable<PxMaterialFlagEnum>,Constable
See also: PxMaterial
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionIf this flag is set, friction computations are always skipped between shapes with this material and any other shape.Whether to use strong friction.Whether to correct the friction force applied by the patch friction model to better match analytical models. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic PxMaterialFlagEnumforValue(int value) static PxMaterialFlagEnumReturns the enum constant of this class with the specified name.static PxMaterialFlagEnum[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
eDISABLE_FRICTION
If this flag is set, friction computations are always skipped between shapes with this material and any other shape. -
eDISABLE_STRONG_FRICTION
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.
-
eIMPROVED_PATCH_FRICTION
Whether to correct the friction force applied by the patch friction model to better match analytical models. This flag only has an effect if the PxFrictionType::ePATCH friction model is used.Note: At a future point, the PhysX SDK will always behave as if this flag was set and no longer support the legacy behavior mentioned further below. At that point this flag will be removed. Until then, it is highly recommended to always set this flag to adapt to the corresponding friction behavior (note that this flag is currently raised by default when creating a PxMaterial).
When using the patch friction model, up to two friction anchors are generated per patch. The normal force of all contacts in the patch is accumulated and equally distributed among the anchors in order to compute friction forces. If this flag is disabled, the legacy behavior is active which produces double the expected friction force in the case of two anchors, since the full accumulated normal force is used in both anchors for the friction computation.
-
-
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
-