Package physx.physics

Enum Class PxRigidBodyFlagEnum

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

public enum PxRigidBodyFlagEnum extends Enum<PxRigidBodyFlagEnum>
Collection of flags describing the behavior of a rigid body.

See also: PxRigidBody.setRigidBodyFlag(), PxRigidBody.getRigidBodyFlags()

  • Enum Constant Details

    • eKINEMATIC

      public static final PxRigidBodyFlagEnum eKINEMATIC
      Enables kinematic mode for the actor.

      Kinematic actors are special dynamic actors that are not influenced by forces (such as gravity), and have no momentum. They are considered to have infinite mass and can be moved around the world using the setKinematicTarget() method. They will push regular dynamic actors out of the way. Kinematics will not collide with static or other kinematic objects.

      Kinematic actors are great for moving platforms or characters, where direct motion control is desired.

      You can not connect Reduced joints to kinematic actors. Lagrange joints work ok if the platform is moving with a relatively low, uniform velocity.

      Sleeping: \li Setting this flag on a dynamic actor will put the actor to sleep and set the velocities to 0. \li If this flag gets cleared, the current sleep state of the actor will be kept.

      Note: kinematic actors are incompatible with CCD so raising this flag will automatically clear eENABLE_CCD

      See also: PxRigidDynamic.setKinematicTarget()

    • eUSE_KINEMATIC_TARGET_FOR_SCENE_QUERIES

      public static final PxRigidBodyFlagEnum eUSE_KINEMATIC_TARGET_FOR_SCENE_QUERIES
      Use the kinematic target transform for scene queries.

      If this flag is raised, then scene queries will treat the kinematic target transform as the current pose of the body (instead of using the actual pose). Without this flag, the kinematic target will only take effect with respect to scene queries after a simulation step.

      See also: PxRigidDynamic.setKinematicTarget()

    • eENABLE_CCD

      public static final PxRigidBodyFlagEnum eENABLE_CCD
      Enables swept integration for the actor.

      If this flag is raised and CCD is enabled on the scene, then this body will be simulated by the CCD system to ensure that collisions are not missed due to high-speed motion. Note individual shape pairs still need to enable PxPairFlag::eDETECT_CCD_CONTACT in the collision filtering to enable the CCD to respond to individual interactions.

      Note: kinematic actors are incompatible with CCD so this flag will be cleared automatically when raised on a kinematic actor

    • eENABLE_CCD_FRICTION

      public static final PxRigidBodyFlagEnum eENABLE_CCD_FRICTION
      Enabled CCD in swept integration for the actor.

      If this flag is raised and CCD is enabled, CCD interactions will simulate friction. By default, friction is disabled in CCD interactions because CCD friction has been observed to introduce some simulation artifacts. CCD friction was enabled in previous versions of the SDK. Raising this flag will result in behavior that is a closer match for previous versions of the SDK.

      Note: This flag requires PxRigidBodyFlag::eENABLE_CCD to be raised to have any effect.

    • eENABLE_POSE_INTEGRATION_PREVIEW

      public static final PxRigidBodyFlagEnum eENABLE_POSE_INTEGRATION_PREVIEW
      Register a rigid body for reporting pose changes by the simulation at an early stage.

      Sometimes it might be advantageous to get access to the new pose of a rigid body as early as possible and not wait until the call to fetchResults() returns. Setting this flag will schedule the rigid body to get reported in #PxSimulationEventCallback::onAdvance(). Please refer to the documentation of that callback to understand the behavior and limitations of this functionality.

      See also: PxSimulationEventCallback::onAdvance()

    • eENABLE_SPECULATIVE_CCD

      public static final PxRigidBodyFlagEnum eENABLE_SPECULATIVE_CCD
      Register a rigid body to dynamically adjust contact offset based on velocity. This can be used to achieve a CCD effect.

      If both eENABLE_CCD and eENABLE_SPECULATIVE_CCD are set on the same body, then angular motions are handled by speculative contacts (eENABLE_SPECULATIVE_CCD) while linear motions are handled by sweeps (eENABLE_CCD).

    • eENABLE_CCD_MAX_CONTACT_IMPULSE

      public static final PxRigidBodyFlagEnum eENABLE_CCD_MAX_CONTACT_IMPULSE
      Permit CCD to limit maxContactImpulse. This is useful for use-cases like a destruction system but can cause visual artefacts so is not enabled by default.
    • eRETAIN_ACCELERATIONS

      public static final PxRigidBodyFlagEnum eRETAIN_ACCELERATIONS
      Carries over forces/torques between frames, rather than clearing them

      If this flag is raised, forces and torques will carry over between frames. Impulses applied with PxForceMode::eIMPULSE will not be retained.

      Note: Clearing this flag will retain the accelerations for an additional frame before clearing them. To reset the forces immediately for the next frame, a call to PxRigidBody::clearForce() / PxRigidBody::clearTorque() is needed.

      See also: PxRigidBody::addForce(), PxRigidBody::AddTorque(), PxRigidBody::setForceAndTorque(), PxRigidBody::clearForce(), PxRigidBody::clearTorque()

  • Field Details

    • value

      public final int value
  • Method Details

    • values

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