Class XrBoxf

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer
Direct Known Subclasses:
XrBoxfKHR

public class XrBoxf extends Struct<XrBoxf> implements NativeResource

 struct XrBoxf {
     {@link XrPosef XrPosef} center;
     {@link XrExtent3Df XrExtent3Df} extents;
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • CENTER

      public static final int CENTER
      The struct member offsets.
    • EXTENTS

      public static final int EXTENTS
      The struct member offsets.
  • Constructor Details

    • XrBoxf

      public XrBoxf(ByteBuffer container)
      Creates a XrBoxf instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

      The created instance holds a strong reference to the container object.

  • Method Details

    • sizeof

      public int sizeof()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<XrBoxf>
    • center

      public XrPosef center()
      Returns:
      a XrPosef view of the center field.
    • extents

      public XrExtent3Df extents()
      Returns:
      a XrExtent3Df view of the extents field.
    • center

      public XrBoxf center(XrPosef value)
      Copies the specified XrPosef to the center field.
    • center

      public XrBoxf center(Consumer<XrPosef> consumer)
      Passes the center field to the specified Consumer.
    • extents

      public XrBoxf extents(XrExtent3Df value)
      Copies the specified XrExtent3Df to the extents field.
    • extents

      public XrBoxf extents(Consumer<XrExtent3Df> consumer)
      Passes the extents field to the specified Consumer.
    • set

      public XrBoxf set(XrPosef center, XrExtent3Df extents)
      Initializes this struct with the specified values.
    • set

      public XrBoxf set(XrBoxf src)
      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

      public static XrBoxf malloc()
      Returns a new XrBoxf instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static XrBoxf calloc()
      Returns a new XrBoxf instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static XrBoxf create()
      Returns a new XrBoxf instance allocated with BufferUtils.
    • create

      public static XrBoxf create(long address)
      Returns a new XrBoxf instance for the specified memory address.
    • createSafe

      public static @Nullable XrBoxf createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static XrBoxf.Buffer malloc(int capacity)
      Returns a new XrBoxf.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static XrBoxf.Buffer calloc(int capacity)
      Returns a new XrBoxf.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static XrBoxf.Buffer create(int capacity)
      Returns a new XrBoxf.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static XrBoxf.Buffer create(long address, int capacity)
      Create a XrBoxf.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      public static @Nullable XrBoxf.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • malloc

      public static XrBoxf malloc(MemoryStack stack)
      Returns a new XrBoxf instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static XrBoxf calloc(MemoryStack stack)
      Returns a new XrBoxf instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static XrBoxf.Buffer malloc(int capacity, MemoryStack stack)
      Returns a new XrBoxf.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static XrBoxf.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new XrBoxf.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • ncenter

      public static XrPosef ncenter(long struct)
      Unsafe version of center().
    • nextents

      public static XrExtent3Df nextents(long struct)
      Unsafe version of extents().
    • ncenter

      public static void ncenter(long struct, XrPosef value)
      Unsafe version of center.
    • nextents

      public static void nextents(long struct, XrExtent3Df value)
      Unsafe version of extents.