java.lang.Object
physx.NativeObject
physx.physics.PxArticulationAttachment
Defines a spatial tendon attachment point on a link.
-
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 PxArticulationAttachmentarrayGet(long baseAddress, int index) voiddestroy()floatGets the attachment coefficient.Gets the low and high limit on the length of the sub-tendon from the root to this leaf attachment.getLink()Gets the articulation link.Gets the parent attachment.Gets the attachment's relative offset in the link actor frame.floatGets the spring rest length for the sub-tendon from the root to this leaf attachment.Gets the spatial tendon that the attachment is a part of.user can assign this to whatever, usually to create a 1:1 relationship with a user object.booleanisLeaf()Indicates that this attachment is a leaf, and thus defines a sub-tendon from the root to this attachment.voidrelease()Releases the attachment.voidsetCoefficient(float coefficient) Sets the attachment coefficient.voidsetLimitParameters(PxArticulationTendonLimit parameters) Sets the low and high limit on the length of the sub-tendon from the root to this leaf attachment.voidsetRelativeOffset(PxVec3 offset) Sets the attachment's relative offset in the link actor frame.voidsetRestLength(float restLength) Sets the spring rest length for the sub-tendon from the root to this leaf attachment.voidsetUserData(NativeObject value) user can assign this to whatever, usually to create a 1:1 relationship with a user object.static PxArticulationAttachmentwrapPointer(long address) Methods 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
-
PxArticulationAttachment
protected PxArticulationAttachment() -
PxArticulationAttachment
protected PxArticulationAttachment(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. -
setRestLength
public void setRestLength(float restLength) Sets the spring rest length for the sub-tendon from the root to this leaf attachment.Setting this on non-leaf attachments has no effect.
- Parameters:
restLength- The rest length of the spring. Default: 0- See Also:
-
getRestLength
public float getRestLength()Gets the spring rest length for the sub-tendon from the root to this leaf attachment.- Returns:
- The rest length.
- See Also:
-
setLimitParameters
Sets the low and high limit on the length of the sub-tendon from the root to this leaf attachment.Setting this on non-leaf attachments has no effect.
- Parameters:
parameters- Struct with the low and high limit. Default: (PX_MAX_F32, -PX_MAX_F32) (i.e. an invalid configuration that can only work if stiffness is zero)- See Also:
-
getLimitParameters
Gets the low and high limit on the length of the sub-tendon from the root to this leaf attachment.- Returns:
- Struct with the low and high limit.
- See Also:
-
setRelativeOffset
Sets the attachment's relative offset in the link actor frame.- Parameters:
offset- The relative offset in the link actor frame.- See Also:
-
getRelativeOffset
Gets the attachment's relative offset in the link actor frame.- Returns:
- The relative offset in the link actor frame.
- See Also:
-
setCoefficient
public void setCoefficient(float coefficient) Sets the attachment coefficient.- Parameters:
coefficient- The scale that the distance between this attachment and its parent is multiplied by when summing up the spatial tendon's length.- See Also:
-
getCoefficient
public float getCoefficient()Gets the attachment coefficient.- Returns:
- The scale that the distance between this attachment and its parent is multiplied by when summing up the spatial tendon's length.
- See Also:
-
getLink
Gets the articulation link.- Returns:
- The articulation link that this attachment is attached to.
-
getParent
Gets the parent attachment.- Returns:
- The parent attachment.
-
isLeaf
public boolean isLeaf()Indicates that this attachment is a leaf, and thus defines a sub-tendon from the root to this attachment.- Returns:
- True: This attachment is a leaf and has zero children; False: Not a leaf.
-
getTendon
Gets the spatial tendon that the attachment is a part of.- Returns:
- The tendon.
- See Also:
-
release
public void release()Releases the attachment.Note: Releasing the attachment is not allowed while the articulation is in a scene. In order to release the attachment, remove and then re-add the articulation to the scene.
-