Class XrRect2Df

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class XrRect2Df extends Struct<XrRect2Df> implements NativeResource

 struct XrRect2Df {
     {@link XrOffset2Df XrOffset2Df} offset;
     {@link XrExtent2Df XrExtent2Df} extent;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int OFFSET
      The struct member offsets.
    • EXTENT

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

    • XrRect2Df

      public XrRect2Df(ByteBuffer container)
      Creates a XrRect2Df 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<XrRect2Df>
    • offset

      public XrOffset2Df offset()
      Returns:
      a XrOffset2Df view of the offset field.
    • extent

      public XrExtent2Df extent()
      Returns:
      a XrExtent2Df view of the extent field.
    • offset

      public XrRect2Df offset(XrOffset2Df value)
      Copies the specified XrOffset2Df to the offset field.
    • offset

      public XrRect2Df offset(Consumer<XrOffset2Df> consumer)
      Passes the offset field to the specified Consumer.
    • extent

      public XrRect2Df extent(XrExtent2Df value)
      Copies the specified XrExtent2Df to the extent field.
    • extent

      public XrRect2Df extent(Consumer<XrExtent2Df> consumer)
      Passes the extent field to the specified Consumer.
    • set

      public XrRect2Df set(XrOffset2Df offset, XrExtent2Df extent)
      Initializes this struct with the specified values.
    • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static XrRect2Df.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new XrRect2Df.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
    • noffset

      public static XrOffset2Df noffset(long struct)
      Unsafe version of offset().
    • nextent

      public static XrExtent2Df nextent(long struct)
      Unsafe version of extent().
    • noffset

      public static void noffset(long struct, XrOffset2Df value)
      Unsafe version of offset.
    • nextent

      public static void nextent(long struct, XrExtent2Df value)
      Unsafe version of extent.