Class CapsuleSupport


public class CapsuleSupport extends Support
Pre-made support mapping for a capsule
  • Field Details

    • SIZEOF

      public static final int SIZEOF
    • ALIGNOF

      public static final int ALIGNOF
      See Also:
  • Constructor Details

    • CapsuleSupport

      protected CapsuleSupport()
    • CapsuleSupport

      protected CapsuleSupport(long address)
    • CapsuleSupport

      public CapsuleSupport(float radius, float halfHeight)
      Constructs a CapsuleSupport for capsule radius and halfHeight
  • Method Details

    • wrapPointer

      public static CapsuleSupport wrapPointer(long address)
    • arrayGet

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

      public static CapsuleSupport createAt(long address, float radius, float halfHeight)
      Parameters:
      address - Pre-allocated memory, where the object is created.
      radius - WebIDL type: float
      halfHeight - WebIDL type: float
      Returns:
      Stack allocated object of CapsuleSupport
    • createAt

      public static <T> CapsuleSupport createAt(T allocator, NativeObject.Allocator<T> allocate, float radius, float halfHeight)
      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.
      radius - WebIDL type: float
      halfHeight - WebIDL type: float
      Returns:
      Stack allocated object of CapsuleSupport
    • destroy

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

      public float getRadius()
      Returns:
      WebIDL type: float
    • setRadius

      public void setRadius(float value)
      Parameters:
      value - WebIDL type: float
    • getHalfHeight

      public float getHalfHeight()
    • setHalfHeight

      public void setHalfHeight(float value)