Package physx.physics

Enum Class PxFrictionTypeEnum

java.lang.Object
java.lang.Enum<PxFrictionTypeEnum>
physx.physics.PxFrictionTypeEnum
All Implemented Interfaces:
Serializable, Comparable<PxFrictionTypeEnum>, Constable

public enum PxFrictionTypeEnum extends Enum<PxFrictionTypeEnum>
Enum for selecting the friction algorithm used for simulation.

#PxFrictionType::ePATCH selects the patch friction model which typically leads to the most stable results at low solver iteration counts and is also quite inexpensive, as it uses only up to four scalar solver constraints per pair of touching objects. The patch friction model is the same basic strong friction algorithm as PhysX 3.2 and before.

#PxFrictionType::eONE_DIRECTIONAL is a simplification of the Coulomb friction model, in which the friction for a given point of contact is applied in the alternating tangent directions of the contact's normal. This simplification allows us to reduce the number of iterations required for convergence but is not as accurate as the two directional model.

#PxFrictionType::eTWO_DIRECTIONAL is identical to the one directional model, but it applies friction in both tangent directions simultaneously. This hurts convergence a bit so it requires more solver iterations, but is more accurate. Like the one directional model, it is applied at every contact point, which makes it potentially more expensive than patch friction for scenarios with many contact points.

#PxFrictionType::eFRICTION_COUNT is the total numer of friction models supported by the SDK.

  • Enum Constant Details

    • ePATCH

      public static final PxFrictionTypeEnum ePATCH
      Select default patch-friction model.
    • eONE_DIRECTIONAL

      public static final PxFrictionTypeEnum eONE_DIRECTIONAL
      Select one directional per-contact friction model.
    • eTWO_DIRECTIONAL

      public static final PxFrictionTypeEnum eTWO_DIRECTIONAL
      Select two directional per-contact friction model.
    • eFRICTION_COUNT

      public static final PxFrictionTypeEnum eFRICTION_COUNT
  • Field Details

    • value

      public final int value
  • Method Details

    • values

      public static PxFrictionTypeEnum[] 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

      public static PxFrictionTypeEnum valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • forValue

      public static PxFrictionTypeEnum forValue(int value)