Class BoxSupport


public class BoxSupport extends Support
Pre-made support mapping for a box
  • Field Details

    • SIZEOF

      public static final int SIZEOF
    • ALIGNOF

      public static final int ALIGNOF
      See Also:
  • Constructor Details

    • BoxSupport

      protected BoxSupport()
    • BoxSupport

      protected BoxSupport(long address)
    • BoxSupport

      public BoxSupport(PxVec3 halfExtents)
      Constructs a BoxSupport for a box halfExtents with optional margin
    • BoxSupport

      public BoxSupport(PxVec3 halfExtents, float margin)
      Constructs a BoxSupport for a box halfExtents with optional margin
  • Method Details

    • wrapPointer

      public static BoxSupport wrapPointer(long address)
    • arrayGet

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

      public static BoxSupport createAt(long address, PxVec3 halfExtents)
      Parameters:
      address - Pre-allocated memory, where the object is created.
      halfExtents - WebIDL type: PxVec3 [Const, Ref]
      Returns:
      Stack allocated object of BoxSupport
    • createAt

      public static <T> BoxSupport createAt(T allocator, NativeObject.Allocator<T> allocate, PxVec3 halfExtents)
      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.
      halfExtents - WebIDL type: PxVec3 [Const, Ref]
      Returns:
      Stack allocated object of BoxSupport
    • createAt

      public static BoxSupport createAt(long address, PxVec3 halfExtents, float margin)
      Parameters:
      address - Pre-allocated memory, where the object is created.
      halfExtents - WebIDL type: PxVec3 [Const, Ref]
      margin - WebIDL type: float
      Returns:
      Stack allocated object of BoxSupport
    • createAt

      public static <T> BoxSupport createAt(T allocator, NativeObject.Allocator<T> allocate, PxVec3 halfExtents, float margin)
      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.
      halfExtents - WebIDL type: PxVec3 [Const, Ref]
      margin - WebIDL type: float
      Returns:
      Stack allocated object of BoxSupport
    • destroy

      public void destroy()
      Overrides:
      destroy in class Support
    • getHalfExtents

      public PxVec3 getHalfExtents()
    • setHalfExtents

      public void setHalfExtents(PxVec3 value)
    • getMargin

      public float getMargin()
      Description copied from class: Support
      Return the user defined shape margin. Margin should be greater than or equal to 0
      Overrides:
      getMargin in class Support
      Returns:
      Margin.
    • setMargin

      public void setMargin(float value)