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 is the default friction logic (Couloumb type friction model). Friction gets computed per contact patch. Up to two contact points lying in the contact patch area are selected as friction anchors to which friction impulses are applied. If there are more than two contact points, to select anchors from, the anchors are selected using a heuristic that tries to maximize the distance between the anchors within the contact patch area. For each contact patch, two perpendicular axes of the contact patch plane are selected. A 1D-constraint along each of the two axes is used to implement friction at a friction anchor point. Note that the two axes are processed separately when the PGS solver type is selected. This can lead to asymmetries when transitioning from dynamic to static friction and vice versa in certain edge cases. The TGS solver type, on the other hand, works with the combined impulse along the two axes and as such avoids this potential problem, but this is slightly more computationally expensive. Another difference between TGS and PGS is that TGS applies friction throughout all position and all velocity iterations, while PGS by default applies friction throughout the last 3 position iterations and all velocity iterations (unless #PxSceneFlag::eENABLE_FRICTION_EVERY_ITERATION is used).

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

  • Enum Constant Details

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