Package physx.physics

Class PxArticulationAttachment

java.lang.Object
physx.NativeObject
physx.physics.PxArticulationAttachment

public class PxArticulationAttachment extends NativeObject
Defines a spatial tendon attachment point on a link.
  • 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

      public static PxArticulationAttachment wrapPointer(long address)
    • arrayGet

      public static PxArticulationAttachment arrayGet(long baseAddress, int index)
    • destroy

      public void destroy()
    • getUserData

      public NativeObject getUserData()
      user can assign this to whatever, usually to create a 1:1 relationship with a user object.
    • setUserData

      public void setUserData(NativeObject value)
      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

      public void setLimitParameters(PxArticulationTendonLimit parameters)
      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

      public PxArticulationTendonLimit 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

      public void setRelativeOffset(PxVec3 offset)
      Sets the attachment's relative offset in the link actor frame.
      Parameters:
      offset - The relative offset in the link actor frame.
      See Also:
    • getRelativeOffset

      public PxVec3 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

      public PxArticulationLink getLink()
      Gets the articulation link.
      Returns:
      The articulation link that this attachment is attached to.
    • getParent

      public PxArticulationAttachment 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

      public PxArticulationSpatialTendon 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.