-
Nested Class Summary
Nested classes/interfaces inherited from class physx.NativeObject
NativeObject.Allocator<T> -
Field Summary
FieldsFields inherited from class physx.NativeObject
address, isExternallyAllocated, SIZEOF_BYTE, SIZEOF_DOUBLE, SIZEOF_FLOAT, SIZEOF_INT, SIZEOF_LONG, SIZEOF_POINTER, SIZEOF_SHORT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PxArticulationSensorarrayGet(long baseAddress, int index) voiddestroy()Returns the articulation that this sensor is part of.getFlags()Returns the sensor's flags.Returns the spatial force in the local frame of the sensor.intgetIndex()Returns the index of this sensor inside the articulation.getLink()Returns the link that this sensor is attached to.Returns the relative pose between this sensor and the body frame of the link that the sensor is attached to.user can assign this to whatever, usually to create a 1:1 relationship with a user object.voidsetFlag(PxArticulationSensorFlagEnum flag, boolean enabled) Sets a flag of the sensor.voidsetRelativePose(PxTransform pose) Sets the relative pose between this sensor and the body frame of the link that the sensor is attached to.voidsetUserData(NativeObject value) user can assign this to whatever, usually to create a 1:1 relationship with a user object.static PxArticulationSensorwrapPointer(long address) Methods inherited from class physx.common.PxBase
getBaseFlags, getConcreteType, getConcreteTypeName, isReleasable, release, setBaseFlag, setBaseFlagsMethods inherited from class physx.NativeObject
checkNotNull, equals, getAddress, hashCode
-
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
-
arrayGet
-
destroy
public void destroy() -
getUserData
user can assign this to whatever, usually to create a 1:1 relationship with a user object. -
setUserData
user can assign this to whatever, usually to create a 1:1 relationship with a user object. -
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
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
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
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
Returns the articulation that this sensor is part of.- Returns:
- A pointer to the articulation.
-
getFlags
Returns the sensor's flags.- Returns:
- The current set of flags of the sensor.
-
setFlag
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.
-