Class XrRect2Di

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

    public class XrRect2Di
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Rect in two dimensions.
    Description

    This variant is for representing discrete values such as texels. For representing physical distances, the floating-point variant must be used instead.

    See Also

    XrExtent2Di, XrOffset2Di, XrSwapchainSubImage

    Layout

    
     struct XrRect2Di {
         XrOffset2Di offset();
         XrExtent2Di extent();
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • OFFSET, EXTENT

        The struct member offsets.
    • Constructor Detail

      • XrRect2Di

        public XrRect2Di​(java.nio.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 Detail

      • sizeof

        public int sizeof()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • offset

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

        public XrRect2Di extent​(java.util.function.Consumer<XrExtent2Di> consumer)
        Passes the extent() field to the specified Consumer.
      • 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

        @Nullable
        public static 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

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

        public static XrRect2Di malloc​(org.lwjgl.system.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​(org.lwjgl.system.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,
                                              org.lwjgl.system.MemoryStack stack)
        Returns a new XrRect2Di.Buffer instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • calloc

        public static XrRect2Di.Buffer calloc​(int capacity,
                                              org.lwjgl.system.MemoryStack stack)
        Returns a new XrRect2Di.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • 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.