Class XrRect2Di

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class XrRect2Di extends Struct<XrRect2Di> implements NativeResource

 struct XrRect2Di {
     {@link XrOffset2Di XrOffset2Di} offset;
     {@link XrExtent2Di XrExtent2Di} 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

    • XrRect2Di

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

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

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

      public XrRect2Di offset(XrOffset2Di value)
      Copies the specified XrOffset2Di to the offset field.
    • offset

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

      public XrRect2Di extent(XrExtent2Di value)
      Copies the specified XrExtent2Di to the extent field.
    • extent

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

      public XrRect2Di set(XrOffset2Di offset, XrExtent2Di extent)
      Initializes this struct with the specified values.
    • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static XrRect2Di.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new XrRect2Di.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 XrOffset2Di noffset(long struct)
      Unsafe version of offset().
    • nextent

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

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

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