PxArticulationFixedTendon

Defined in include/PxArticulationTendon.h

class PxArticulationFixedTendon : public PxArticulationTendon

A fixed tendon that can be used to link multiple degrees of freedom of multiple articulation joints via length and limit constraints.

Fixed tendons allow the simulation of coupled relationships between joint degrees of freedom in an articulation. Fixed tendons do not allow linking arbitrary joint axes of the articulation: The respective joints must all be directly connected to each other in the articulation structure, i.e. each of the joints in the tendon must be connected by a single articulation link to another joint in the same tendon. This implies both that 1) fixed tendons can branch along a branching articulation; and 2) they cannot be used to create relationships between axes in a spherical joint with more than one degree of freedom. Locked joint axes or fixed joints are currently not supported.

Public Functions

Creates an articulation tendon joint and adds it to the list of children in the parent tendon joint.

Creating a tendon joint is not allowed while the articulation is in a scene. In order to add the joint, remove and then re-add the articulation to the scene.

See also

PxArticulationTendonJoint PxArticulationAxis

Note

  • The axis motion must not be configured as PxArticulationMotion::eLOCKED.

  • The axis cannot be part of a fixed joint, i.e. joint configured as PxArticulationJointType::eFIX.

Parameters
  • parent[in] The parent tendon joint. Can be NULL for the root tendon joint of a tendon.

  • axis[in] The degree of freedom that this tendon joint is associated with.

  • coefficient[in] A user-defined scale that the accumulated tendon length is scaled by.

  • recipCoefficient[in] The scale that the tendon’s response is multiplied by when applying to this tendon joint.

  • link[in] The link (and the link’s incoming joint in particular) that this tendon joint is associated with.

Returns

The newly-created tendon joint if creation was successful, otherwise a null pointer.

virtual PxU32 getTendonJoints(PxArticulationTendonJoint **userBuffer, PxU32 bufferSize, PxU32 startIndex = 0) const = 0

Fills a user-provided buffer of tendon-joint pointers with the set of tendon joints.

See also

getNbTendonJoints

Parameters
  • userBuffer[in] The user-provided buffer.

  • bufferSize[in] The size of the buffer. If this is not large enough to contain all the pointers to tendon joints, only as many as can fit are written. Use getNbTendonJoints to size for all tendon joints.

  • startIndex[in] Index of first tendon joint pointer to be retrieved.

Returns

The number of tendon joints filled into the user buffer.

virtual PxU32 getNbTendonJoints() const = 0

Returns the number of tendon joints in the tendon.

Returns

The number of tendon joints.

virtual void setRestLength(const PxReal restLength) = 0

Sets the spring rest length of the tendon.

The accumulated “length” of a fixed tendon is a linear combination of the joint axis positions that the tendon is associated with, scaled by the respective tendon joints’ coefficients. As such, when the joint positions of all joints are zero, the accumulated length of a fixed tendon is zero.

The spring of the tendon is not exerting any force on the articulation when the rest length is equal to the tendon’s accumulated length plus the tendon offset.

See also

getRestLength()

Parameters

restLength[in] The spring rest length of the tendon.

virtual PxReal getRestLength() const = 0

Gets the spring rest length of the tendon.

See also

setRestLength()

Returns

The spring rest length of the tendon.

virtual void setLimitParameters(const PxArticulationTendonLimit &parameter) = 0

Sets the low and high limit on the length of the tendon.

The limits, together with the damping and limit stiffness parameters, act on the accumulated length of the tendon.

See also

PxArticulationTendonLimit getLimitParameters() setRestLength()

Parameters

parameter[in] Struct with the low and high limit.

virtual PxArticulationTendonLimit getLimitParameters() const = 0

Gets the low and high limit on the length of the tendon.

See also

PxArticulationTendonLimit setLimitParameters()

Returns

Struct with the low and high limit.

inline virtual const char *getConcreteTypeName() const

Returns the string name of the dynamic type.

Returns

The string name.

inline virtual ~PxArticulationFixedTendon()
virtual void setStiffness(const PxReal stiffness) = 0

Sets the spring stiffness term acting on the tendon length.

See also

getStiffness()

Parameters

stiffness[in] The spring stiffness. Default: 0

virtual PxReal getStiffness() const = 0

Gets the spring stiffness of the tendon.

See also

setStiffness()

Returns

The spring stiffness.

virtual void setDamping(const PxReal damping) = 0

Sets the damping term acting both on the tendon length and tendon-length limits.

See also

getDamping()

Parameters

damping[in] The damping term. Default: 0

virtual PxReal getDamping() const = 0

Gets the damping term acting both on the tendon length and tendon-length limits.

See also

setDamping()

Returns

The damping term.

virtual void setLimitStiffness(const PxReal stiffness) = 0

Sets the limit stiffness term acting on the tendon’s length limits.

For spatial tendons, this parameter applies to all its leaf attachments / sub-tendons.

See also

getLimitStiffness()

Parameters

stiffness[in] The limit stiffness term. Default: 0

virtual PxReal getLimitStiffness() const = 0

Gets the limit stiffness term acting on the tendon’s length limits.

For spatial tendons, this parameter applies to all its leaf attachments / sub-tendons.

See also

setLimitStiffness()

Returns

The limit stiffness term.

virtual void setOffset(const PxReal offset, bool autowake = true) = 0

Sets the length offset term for the tendon.

An offset defines an amount to be added to the accumulated length computed for the tendon. It allows the application to actuate the tendon by shortening or lengthening it.

See also

getOffset()

Parameters
  • offset[in] The offset term. Default: 0

  • autowake[in] If true and the articulation is in a scene, the call wakes up the articulation and increases the wake counter to PxSceneDesc::wakeCounterResetValue if the counter value is below the reset value.

virtual PxReal getOffset() const = 0

Gets the length offset term for the tendon.

See also

setOffset()

Returns

The offset term.

virtual PxArticulationReducedCoordinate *getArticulation() const = 0

Gets the articulation that the tendon is a part of.

See also

PxArticulationReducedCoordinate

Returns

The articulation.

virtual void release() = 0

Releases a tendon to remove it from the articulation and free its associated memory.

When an articulation is released, its attached tendons are automatically released.

Note

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

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.

See also

PxSerialization::isSerializable

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 PxArticulationFixedTendon(PxType concreteType, PxBaseFlags baseFlags)
inline PxArticulationFixedTendon(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