Package physx.physics

Class PxArticulationSensor

java.lang.Object
physx.NativeObject
physx.common.PxBase
physx.physics.PxArticulationSensor

public class PxArticulationSensor extends PxBase
A force sensor that can be attached to articulation links to measure spatial force.
  • Field Details

    • SIZEOF

      public static final int SIZEOF
    • ALIGNOF

      public static final int ALIGNOF
      See Also:
  • Constructor Details

    • PxArticulationSensor

      protected PxArticulationSensor()
    • PxArticulationSensor

      protected PxArticulationSensor(long address)
  • Method Details

    • wrapPointer

      public static PxArticulationSensor wrapPointer(long address)
    • arrayGet

      public static PxArticulationSensor arrayGet(long baseAddress, int index)
    • destroy

      public void destroy()
    • getUserData

      public NativeObject getUserData()
      user can assign this to whatever, usually to create a 1:1 relationship with a user object.
    • setUserData

      public void setUserData(NativeObject value)
      user can assign this to whatever, usually to create a 1:1 relationship with a user object.
    • getForces

      public PxSpatialForce getForces()
      Returns the spatial force in the local frame of the sensor.
      Returns:
      The spatial force.

      Note: This call is not allowed while the simulation is running except in a split simulation during #PxScene::collide() and up to #PxScene::advance(), and in PxContactModifyCallback or in contact report callbacks.

      See Also:
    • getRelativePose

      public PxTransform getRelativePose()
      Returns the relative pose between this sensor and the body frame of the link that the sensor is attached to.

      The link body frame is at the center of mass and aligned with the principal axes of inertia, see PxRigidBody::getCMassLocalPose.

      Returns:
      The transform link body frame -> sensor frame.
      See Also:
    • setRelativePose

      public void setRelativePose(PxTransform pose)
      Sets the relative pose between this sensor and the body frame of the link that the sensor is attached to.

      The link body frame is at the center of mass and aligned with the principal axes of inertia, see PxRigidBody::getCMassLocalPose.

      Parameters:
      pose - The transform link body frame -> sensor frame.

      Note: Setting the sensor relative pose is not allowed while the articulation is in a scene. In order to set the pose, remove and then re-add the articulation to the scene.

      See Also:
    • getLink

      public PxArticulationLink getLink()
      Returns the link that this sensor is attached to.
      Returns:
      A pointer to the link.
    • getIndex

      public int getIndex()
      Returns the index of this sensor inside the articulation.

      The return value is only valid for sensors attached to articulations that are in a scene.

      Returns:
      The low-level index, or 0xFFFFFFFF if the articulation is not in a scene.
    • getArticulation

      public PxArticulationReducedCoordinate getArticulation()
      Returns the articulation that this sensor is part of.
      Returns:
      A pointer to the articulation.
    • getFlags

      public PxArticulationSensorFlags getFlags()
      Returns the sensor's flags.
      Returns:
      The current set of flags of the sensor.
    • setFlag

      public void setFlag(PxArticulationSensorFlagEnum flag, boolean enabled)
      Sets a flag of the sensor.
      Parameters:
      flag - The flag to set.
      enabled - The value to set the flag to.

      Note: Setting the sensor flags is not allowed while the articulation is in a scene. In order to set the flags, remove and then re-add the articulation to the scene.