Class PxJointLinearLimitPair


public class PxJointLinearLimitPair extends PxJointLimitParameters
Describes a two-sided limit.
  • Field Details

    • SIZEOF

      public static final int SIZEOF
    • ALIGNOF

      public static final int ALIGNOF
      See Also:
  • Constructor Details

    • PxJointLinearLimitPair

      protected PxJointLinearLimitPair()
    • PxJointLinearLimitPair

      protected PxJointLinearLimitPair(long address)
    • PxJointLinearLimitPair

      public PxJointLinearLimitPair(float lowerLimit, float upperLimit, PxSpring spring)
      construct a linear soft limit pair
      Parameters:
      lowerLimit - The lower distance of the limit
      upperLimit - The upper distance of the limit
      spring - The stiffness and damping parameters of the limit spring
      See Also:
  • Method Details

    • wrapPointer

      public static PxJointLinearLimitPair wrapPointer(long address)
    • arrayGet

      public static PxJointLinearLimitPair arrayGet(long baseAddress, int index)
    • createAt

      public static PxJointLinearLimitPair createAt(long address, float lowerLimit, float upperLimit, PxSpring spring)
      Parameters:
      address - Pre-allocated memory, where the object is created.
      lowerLimit - WebIDL type: float
      upperLimit - WebIDL type: float
      spring - WebIDL type: PxSpring [Const, Ref]
      Returns:
      Stack allocated object of PxJointLinearLimitPair
    • createAt

      public static <T> PxJointLinearLimitPair createAt(T allocator, NativeObject.Allocator<T> allocate, float lowerLimit, float upperLimit, PxSpring spring)
      Type Parameters:
      T - Allocator class, e.g. LWJGL's MemoryStack.
      Parameters:
      allocator - Object to use for allocation, e.g. an instance of LWJGL's MemoryStack.
      allocate - Method to call on allocator to obtain the target address, e.g. MemoryStack::nmalloc.
      lowerLimit - WebIDL type: float
      upperLimit - WebIDL type: float
      spring - WebIDL type: PxSpring [Const, Ref]
      Returns:
      Stack allocated object of PxJointLinearLimitPair
    • destroy

      public void destroy()
    • getUpper

      public float getUpper()
      Returns:
      WebIDL type: float
    • setUpper

      public void setUpper(float value)
      Parameters:
      value - WebIDL type: float
    • getLower

      public float getLower()
      the range of the limit. The upper limit must be no lower than the lower limit, and if they are equal the limited degree of freedom will be treated as locked.

      Range: See the joint on which the limit is used for details
      Default: lower = -PX_MAX_F32/3, upper = PX_MAX_F32/3

    • setLower

      public void setLower(float value)
      the range of the limit. The upper limit must be no lower than the lower limit, and if they are equal the limited degree of freedom will be treated as locked.

      Range: See the joint on which the limit is used for details
      Default: lower = -PX_MAX_F32/3, upper = PX_MAX_F32/3