Class HmdRect2

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<HmdRect2>
org.lwjgl.openvr.HmdRect2
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class HmdRect2 extends org.lwjgl.system.Struct<HmdRect2> implements org.lwjgl.system.NativeResource

Layout


 struct HmdRect2_t {
     HmdVector2_t vTopLeft;
     HmdVector2_t vBottomRight;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int VTOPLEFT
      The struct member offsets.
    • VBOTTOMRIGHT

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

    • HmdRect2

      public HmdRect2(ByteBuffer container)
      Creates a HmdRect2 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()
      Specified by:
      sizeof in class org.lwjgl.system.Struct<HmdRect2>
    • vTopLeft

      public HmdVector2 vTopLeft()
      Returns:
      a HmdVector2 view of the vTopLeft field.
    • vBottomRight

      public HmdVector2 vBottomRight()
      Returns:
      a HmdVector2 view of the vBottomRight field.
    • vTopLeft

      public HmdRect2 vTopLeft(HmdVector2 value)
      Copies the specified HmdVector2 to the vTopLeft field.
    • vTopLeft

      public HmdRect2 vTopLeft(Consumer<HmdVector2> consumer)
      Passes the vTopLeft field to the specified Consumer.
    • vBottomRight

      public HmdRect2 vBottomRight(HmdVector2 value)
      Copies the specified HmdVector2 to the vBottomRight field.
    • vBottomRight

      public HmdRect2 vBottomRight(Consumer<HmdVector2> consumer)
      Passes the vBottomRight field to the specified Consumer.
    • set

      public HmdRect2 set(HmdVector2 vTopLeft, HmdVector2 vBottomRight)
      Initializes this struct with the specified values.
    • set

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

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

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

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

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

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

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

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

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

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

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

      @Deprecated public static HmdRect2 mallocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static HmdRect2 callocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static HmdRect2 mallocStack(org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static HmdRect2 callocStack(org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static HmdRect2.Buffer mallocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static HmdRect2.Buffer callocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • mallocStack

      @Deprecated public static HmdRect2.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static HmdRect2.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • malloc

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

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

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

      public static HmdRect2.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new HmdRect2.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
    • nvTopLeft

      public static HmdVector2 nvTopLeft(long struct)
      Unsafe version of vTopLeft().
    • nvBottomRight

      public static HmdVector2 nvBottomRight(long struct)
      Unsafe version of vBottomRight().
    • nvTopLeft

      public static void nvTopLeft(long struct, HmdVector2 value)
      Unsafe version of vTopLeft.
    • nvBottomRight

      public static void nvBottomRight(long struct, HmdVector2 value)
      Unsafe version of vBottomRight.