PxArticulationSensor

Defined in include/PxArticulationReducedCoordinate.h

Inheritance Relationships

Base Type

class PxArticulationSensor : public PxBase

A force sensor that can be attached to articulation links to measure spatial force.

Public Functions

virtual void release() = 0

Releases the sensor.

Note

Releasing a sensor is not allowed while the articulation is in a scene. In order to release a sensor, remove and then re-add the articulation to the scene.

virtual PxSpatialForce getForces() const = 0

Returns the spatial force in the local frame of the sensor.

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.

Returns

The spatial force.

virtual PxTransform getRelativePose() const = 0

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.

See also

setRelativePose

Returns

The transform link body frame -> sensor frame.

virtual void setRelativePose(const PxTransform &pose) = 0

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.

See also

getRelativePose

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.

Parameters

pose[in] The transform link body frame -> sensor frame.

virtual PxArticulationLink *getLink() const = 0

Returns the link that this sensor is attached to.

Returns

A pointer to the link.

virtual PxU32 getIndex() const = 0

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.

virtual PxArticulationReducedCoordinate *getArticulation() const = 0

Returns the articulation that this sensor is part of.

Returns

A pointer to the articulation.

virtual PxArticulationSensorFlags getFlags() const = 0

Returns the sensor’s flags.

Returns

The current set of flags of the sensor.

virtual void setFlag(PxArticulationSensorFlag::Enum flag, bool enabled) = 0

Sets a flag of the sensor.

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.

Parameters
  • flag[in] The flag to set.

  • enabled[in] The value to set the flag to.

inline virtual const char *getConcreteTypeName() const

Returns the string name of the dynamic type.

Returns

The string name.

inline virtual ~PxArticulationSensor()
template<class T>
inline T *is()
template<class T>
inline const T *is() const
inline PxType getConcreteType() const

Returns concrete type of object.

See also

PxConcreteType

Returns

PxConcreteType::Enum of serialized object

inline void setBaseFlag(PxBaseFlag::Enum flag, bool value)

Set PxBaseFlag

Parameters
  • flag[in] The flag to be set

  • value[in] The flags new value

inline void setBaseFlags(PxBaseFlags inFlags)

Set PxBaseFlags

See also

PxBaseFlags

Parameters

inFlags[in] The flags to be set

inline PxBaseFlags getBaseFlags() const

Returns PxBaseFlags.

See also

PxBaseFlags

Returns

PxBaseFlags

inline virtual bool isReleasable() const

Whether the object is subordinate.

A class is subordinate, if it can only be instantiated in the context of another class.

Returns

Whether the class is subordinate

Public Members

void *userData

user can assign this to whatever, usually to create a 1:1 relationship with a user object.

Protected Functions

inline PxArticulationSensor(PxType concreteType, PxBaseFlags baseFlags)
inline PxArticulationSensor(PxBaseFlags baseFlags)
inline virtual bool isKindOf(const char *superClass) const

Returns whether a given type name matches with the type of this instance.

template<class T>
inline bool typeMatch() const

Protected Attributes

PxType mConcreteType
PxBaseFlags mBaseFlags
PxU32 mBuiltInRefCount