Package physx.physics

Enum Class PxPairFlagEnum

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

public enum PxPairFlagEnum extends Enum<PxPairFlagEnum>
Collection of flags describing the actions to take for a collision pair.

See also: PxPairFlags PxSimulationFilterShader.filter() PxSimulationFilterCallback

  • Enum Constant Details

    • eSOLVE_CONTACT

      public static final PxPairFlagEnum eSOLVE_CONTACT
      Process the contacts of this collision pair in the dynamics solver.

      Note: Only takes effect if the colliding actors are rigid bodies.

    • eMODIFY_CONTACTS

      public static final PxPairFlagEnum eMODIFY_CONTACTS
      Call contact modification callback for this collision pair

      Note: Only takes effect if the colliding actors are rigid bodies.

      See also: PxContactModifyCallback

    • eNOTIFY_TOUCH_FOUND

      public static final PxPairFlagEnum eNOTIFY_TOUCH_FOUND
      Call contact report callback or trigger callback when this collision pair starts to be in contact.

      If one of the two collision objects is a trigger shape (see #PxShapeFlag::eTRIGGER_SHAPE) then the trigger callback will get called as soon as the other object enters the trigger volume. If none of the two collision objects is a trigger shape then the contact report callback will get called when the actors of this collision pair start to be in contact.

      Note: Only takes effect if the colliding actors are rigid bodies.

      Note: Only takes effect if eDETECT_DISCRETE_CONTACT or eDETECT_CCD_CONTACT is raised

      See also: PxSimulationEventCallback.onContact() PxSimulationEventCallback.onTrigger()

    • eNOTIFY_TOUCH_PERSISTS

      public static final PxPairFlagEnum eNOTIFY_TOUCH_PERSISTS
      Call contact report callback while this collision pair is in contact

      If none of the two collision objects is a trigger shape then the contact report callback will get called while the actors of this collision pair are in contact.

      Note: Triggers do not support this event. Persistent trigger contacts need to be tracked separately by observing eNOTIFY_TOUCH_FOUND/eNOTIFY_TOUCH_LOST events.

      Note: Only takes effect if the colliding actors are rigid bodies.

      Note: No report will get sent if the objects in contact are sleeping.

      Note: Only takes effect if eDETECT_DISCRETE_CONTACT or eDETECT_CCD_CONTACT is raised

      Note: If this flag gets enabled while a pair is in touch already, there will be no eNOTIFY_TOUCH_PERSISTS events until the pair loses and regains touch.

      See also: PxSimulationEventCallback.onContact() PxSimulationEventCallback.onTrigger()

    • eNOTIFY_TOUCH_LOST

      public static final PxPairFlagEnum eNOTIFY_TOUCH_LOST
      Call contact report callback or trigger callback when this collision pair stops to be in contact

      If one of the two collision objects is a trigger shape (see #PxShapeFlag::eTRIGGER_SHAPE) then the trigger callback will get called as soon as the other object leaves the trigger volume. If none of the two collision objects is a trigger shape then the contact report callback will get called when the actors of this collision pair stop to be in contact.

      Note: Only takes effect if the colliding actors are rigid bodies.

      Note: This event will also get triggered if one of the colliding objects gets deleted.

      Note: Only takes effect if eDETECT_DISCRETE_CONTACT or eDETECT_CCD_CONTACT is raised

      See also: PxSimulationEventCallback.onContact() PxSimulationEventCallback.onTrigger()

    • eNOTIFY_TOUCH_CCD

      public static final PxPairFlagEnum eNOTIFY_TOUCH_CCD
      Call contact report callback when this collision pair is in contact during CCD passes.

      If CCD with multiple passes is enabled, then a fast moving object might bounce on and off the same object multiple times. Hence, the same pair might be in contact multiple times during a simulation step. This flag will make sure that all the detected collision during CCD will get reported. For performance reasons, the system can not always tell whether the contact pair lost touch in one of the previous CCD passes and thus can also not always tell whether the contact is new or has persisted. eNOTIFY_TOUCH_CCD just reports when the two collision objects were detected as being in contact during a CCD pass.

      Note: Only takes effect if the colliding actors are rigid bodies.

      Note: Trigger shapes are not supported.

      Note: Only takes effect if eDETECT_CCD_CONTACT is raised

      See also: PxSimulationEventCallback.onContact() PxSimulationEventCallback.onTrigger()

    • eNOTIFY_THRESHOLD_FORCE_FOUND

      public static final PxPairFlagEnum eNOTIFY_THRESHOLD_FORCE_FOUND
      Call contact report callback when the contact force between the actors of this collision pair exceeds one of the actor-defined force thresholds.

      Note: Only takes effect if the colliding actors are rigid bodies.

      Note: Only takes effect if eDETECT_DISCRETE_CONTACT or eDETECT_CCD_CONTACT is raised

      See also: PxSimulationEventCallback.onContact()

    • eNOTIFY_THRESHOLD_FORCE_PERSISTS

      public static final PxPairFlagEnum eNOTIFY_THRESHOLD_FORCE_PERSISTS
      Call contact report callback when the contact force between the actors of this collision pair continues to exceed one of the actor-defined force thresholds.

      Note: Only takes effect if the colliding actors are rigid bodies.

      Note: If a pair gets re-filtered and this flag has previously been disabled, then the report will not get fired in the same frame even if the force threshold has been reached in the previous one (unless #eNOTIFY_THRESHOLD_FORCE_FOUND has been set in the previous frame).

      Note: Only takes effect if eDETECT_DISCRETE_CONTACT or eDETECT_CCD_CONTACT is raised

      See also: PxSimulationEventCallback.onContact()

    • eNOTIFY_THRESHOLD_FORCE_LOST

      public static final PxPairFlagEnum eNOTIFY_THRESHOLD_FORCE_LOST
      Call contact report callback when the contact force between the actors of this collision pair falls below one of the actor-defined force thresholds (includes the case where this collision pair stops being in contact).

      Note: Only takes effect if the colliding actors are rigid bodies.

      Note: If a pair gets re-filtered and this flag has previously been disabled, then the report will not get fired in the same frame even if the force threshold has been reached in the previous one (unless #eNOTIFY_THRESHOLD_FORCE_FOUND or #eNOTIFY_THRESHOLD_FORCE_PERSISTS has been set in the previous frame).

      Note: Only takes effect if eDETECT_DISCRETE_CONTACT or eDETECT_CCD_CONTACT is raised

      See also: PxSimulationEventCallback.onContact()

    • eNOTIFY_CONTACT_POINTS

      public static final PxPairFlagEnum eNOTIFY_CONTACT_POINTS
      Provide contact points in contact reports for this collision pair.

      Note: Only takes effect if the colliding actors are rigid bodies and if used in combination with the flags eNOTIFY_TOUCH_... or eNOTIFY_THRESHOLD_FORCE_...

      Note: Only takes effect if eDETECT_DISCRETE_CONTACT or eDETECT_CCD_CONTACT is raised

      See also: PxSimulationEventCallback.onContact() PxContactPair PxContactPair.extractContacts()

    • eDETECT_DISCRETE_CONTACT

      public static final PxPairFlagEnum eDETECT_DISCRETE_CONTACT
      This flag is used to indicate whether this pair generates discrete collision detection contacts.

      Note: Contacts are only responded to if eSOLVE_CONTACT is enabled.

    • eDETECT_CCD_CONTACT

      public static final PxPairFlagEnum eDETECT_CCD_CONTACT
      This flag is used to indicate whether this pair generates CCD contacts.

      Note: The contacts will only be responded to if eSOLVE_CONTACT is enabled on this pair. Note: The scene must have PxSceneFlag::eENABLE_CCD enabled to use this feature. Note: Non-static bodies of the pair should have PxRigidBodyFlag::eENABLE_CCD specified for this feature to work correctly. Note: This flag is not supported with trigger shapes. However, CCD trigger events can be emulated using non-trigger shapes and requesting eNOTIFY_TOUCH_FOUND and eNOTIFY_TOUCH_LOST and not raising eSOLVE_CONTACT on the pair.

      See also: PxRigidBodyFlag::eENABLE_CCD See also: PxSceneFlag::eENABLE_CCD

    • ePRE_SOLVER_VELOCITY

      public static final PxPairFlagEnum ePRE_SOLVER_VELOCITY
      Provide pre solver velocities in contact reports for this collision pair.

      If the collision pair has contact reports enabled, the velocities of the rigid bodies before contacts have been solved will be provided in the contact report callback unless the pair lost touch in which case no data will be provided.

      Note: Usually it is not necessary to request these velocities as they will be available by querying the velocity from the provided PxRigidActor object directly. However, it might be the case that the velocity of a rigid body gets set while the simulation is running in which case the PxRigidActor would return this new velocity in the contact report callback and not the velocity the simulation used.

      See also: PxSimulationEventCallback.onContact(), PxContactPairVelocity, PxContactPairHeader.extraDataStream

    • ePOST_SOLVER_VELOCITY

      public static final PxPairFlagEnum ePOST_SOLVER_VELOCITY
      Provide post solver velocities in contact reports for this collision pair.

      If the collision pair has contact reports enabled, the velocities of the rigid bodies after contacts have been solved will be provided in the contact report callback unless the pair lost touch in which case no data will be provided.

      See also: PxSimulationEventCallback.onContact(), PxContactPairVelocity, PxContactPairHeader.extraDataStream

    • eCONTACT_EVENT_POSE

      public static final PxPairFlagEnum eCONTACT_EVENT_POSE
      Provide rigid body poses in contact reports for this collision pair.

      If the collision pair has contact reports enabled, the rigid body poses at the contact event will be provided in the contact report callback unless the pair lost touch in which case no data will be provided.

      Note: Usually it is not necessary to request these poses as they will be available by querying the pose from the provided PxRigidActor object directly. However, it might be the case that the pose of a rigid body gets set while the simulation is running in which case the PxRigidActor would return this new pose in the contact report callback and not the pose the simulation used. Another use case is related to CCD with multiple passes enabled, A fast moving object might bounce on and off the same object multiple times. This flag can be used to request the rigid body poses at the time of impact for each such collision event.

      See also: PxSimulationEventCallback.onContact(), PxContactPairPose, PxContactPairHeader.extraDataStream

    • eNEXT_FREE

      public static final PxPairFlagEnum eNEXT_FREE
      For internal use only.
    • eCONTACT_DEFAULT

      public static final PxPairFlagEnum eCONTACT_DEFAULT
      Provided default flag to do simple contact processing for this collision pair.
    • eTRIGGER_DEFAULT

      public static final PxPairFlagEnum eTRIGGER_DEFAULT
      Provided default flag to get commonly used trigger behavior for this collision pair.
  • Field Details

    • value

      public final int value
  • Method Details

    • values

      public static PxPairFlagEnum[] 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 PxPairFlagEnum 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 PxPairFlagEnum forValue(int value)