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.
-
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 PxArticulationSpatialTendonarrayGet(long baseAddress, int index) createAttachment(PxArticulationAttachment parent, float coefficient, PxVec3 relativeOffset, PxArticulationLink link) Creates an articulation attachment and adds it to the list of children in the parent attachment.voiddestroy()intReturns the number of attachments in the tendon.static PxArticulationSpatialTendonwrapPointer(long address) Methods inherited from class physx.physics.PxArticulationTendon
getArticulation, getDamping, getLimitStiffness, getOffset, getStiffness, setDamping, setLimitStiffness, setOffset, setOffset, setStiffnessMethods 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
-
PxArticulationSpatialTendon
protected PxArticulationSpatialTendon() -
PxArticulationSpatialTendon
protected PxArticulationSpatialTendon(long address)
-
-
Method Details
-
wrapPointer
-
arrayGet
-
destroy
public void destroy()- Overrides:
destroyin classPxArticulationTendon
-
createAttachment
public PxArticulationAttachment createAttachment(PxArticulationAttachment parent, float coefficient, PxVec3 relativeOffset, PxArticulationLink link) 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.
- Parameters:
parent- The parent attachment. Can be NULL for the root attachment of a tendon.coefficient- A user-defined scale that the accumulated length is scaled by.relativeOffset- An offset vector in the link's actor frame to the point where the tendon attachment is attached to the link.link- The link that this attachment is associated with.- Returns:
- The newly-created attachment if creation was successful, otherwise a null pointer.
-
getNbAttachments
public int getNbAttachments()Returns the number of attachments in the tendon.- Returns:
- The number of attachments.
-