PxArticulationSpatialTendon
Defined in include/PxArticulationTendon.h
Inheritance Relationships
Base Type
public PxArticulationTendon
(PxArticulationTendon)
-
class PxArticulationSpatialTendon : public PxArticulationTendon
A spatial tendon that attaches to an articulation.
A spatial tendon attaches to multiple links in an articulation using a set of PxArticulationAttachments. The tendon is defined as a tree of attachment points, where each attachment can have an arbitrary number of children. Each leaf of the attachment tree defines a subtendon between itself and the root attachment. The subtendon then applies forces at the leaf, and an equal but opposing force at the root, in order to satisfy the spring-damper and limit constraints that the user sets up. Attachments in between the root and leaf do not exert any force on the articulation, but define the geometry of the tendon from which the length is computed together with the attachment coefficients.
Public Functions
-
virtual PxArticulationAttachment *createAttachment(PxArticulationAttachment *parent, const PxReal coefficient, const PxVec3 relativeOffset, PxArticulationLink *link) = 0
Creates an articulation attachment and adds it to the list of children in the parent attachment.
Creating an attachment is not allowed while the articulation is in a scene. In order to add the attachment, remove and then re-add the articulation to the scene.
See also
releaseAttachment()
- Parameters
parent – [in] The parent attachment. Can be NULL for the root attachment of a tendon.
coefficient – [in] A user-defined scale that the accumulated length is scaled by.
relativeOffset – [in] An offset vector in the link’s actor frame to the point where the tendon attachment is attached to the link.
link – [in] The link that this attachment is associated with.
- Returns
The newly-created attachment if creation was successful, otherwise a null pointer.
-
virtual PxU32 getAttachments(PxArticulationAttachment **userBuffer, PxU32 bufferSize, PxU32 startIndex = 0) const = 0
Fills a user-provided buffer of attachment pointers with the set of attachments.
See also
- 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 attachments, only as many as can fit are written. Use getNbAttachments to size for all attachments.
startIndex – [in] Index of first attachment pointer to be retrieved.
- Returns
The number of attachments that were filled into the user buffer.
-
virtual PxU32 getNbAttachments() const = 0
Returns the number of attachments in the tendon.
- Returns
The number of attachments.
-
inline virtual const char *getConcreteTypeName() const
Returns the string name of the dynamic type.
- Returns
The string name.
-
inline virtual ~PxArticulationSpatialTendon()
-
virtual void setStiffness(const PxReal stiffness) = 0
Sets the spring stiffness term acting on the tendon length.
See also
- Parameters
stiffness – [in] The spring stiffness. Default: 0
-
virtual PxReal getStiffness() const = 0
Gets the spring stiffness of the tendon.
See also
- 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
- 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
- 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
- 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
- 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
- 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
- Returns
The offset term.
-
virtual PxArticulationReducedCoordinate *getArticulation() const = 0
Gets the articulation that the tendon is a part of.
See also
- 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.
-
inline PxType getConcreteType() const
Returns concrete type of object.
See also
- 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
- 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 PxArticulationSpatialTendon(PxType concreteType, PxBaseFlags baseFlags)
-
inline PxArticulationSpatialTendon(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
-
virtual PxArticulationAttachment *createAttachment(PxArticulationAttachment *parent, const PxReal coefficient, const PxVec3 relativeOffset, PxArticulationLink *link) = 0