Package org.lwjgl.openvr
Class HmdRect2
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.openvr.HmdRect2
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class HmdRect2 extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Layout
struct HmdRect2_t {
HmdVector2_t
vTopLeft;HmdVector2_t
vBottomRight; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HmdRect2.Buffer
An array ofHmdRect2
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
SIZEOF
The struct size in bytes.static int
VBOTTOMRIGHT
VTOPLEFTThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description HmdRect2(java.nio.ByteBuffer container)
Creates aHmdRect2
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static HmdRect2
calloc()
Returns a newHmdRect2
instance allocated withmemCalloc
.static HmdRect2.Buffer
calloc(int capacity)
Returns a newHmdRect2.Buffer
instance allocated withmemCalloc
.static HmdRect2
callocStack()
Returns a newHmdRect2
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static HmdRect2.Buffer
callocStack(int capacity)
Returns a newHmdRect2.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static HmdRect2.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newHmdRect2.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static HmdRect2
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newHmdRect2
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static HmdRect2
create()
Returns a newHmdRect2
instance allocated withBufferUtils
.static HmdRect2.Buffer
create(int capacity)
Returns a newHmdRect2.Buffer
instance allocated withBufferUtils
.static HmdRect2
create(long address)
Returns a newHmdRect2
instance for the specified memory address.static HmdRect2.Buffer
create(long address, int capacity)
Create aHmdRect2.Buffer
instance at the specified memory.static HmdRect2
createSafe(long address)
static HmdRect2.Buffer
createSafe(long address, int capacity)
static HmdRect2
malloc()
Returns a newHmdRect2
instance allocated withmemAlloc
.static HmdRect2.Buffer
malloc(int capacity)
Returns a newHmdRect2.Buffer
instance allocated withmemAlloc
.static HmdRect2
mallocStack()
Returns a newHmdRect2
instance allocated on the thread-localMemoryStack
.static HmdRect2.Buffer
mallocStack(int capacity)
Returns a newHmdRect2.Buffer
instance allocated on the thread-localMemoryStack
.static HmdRect2.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newHmdRect2.Buffer
instance allocated on the specifiedMemoryStack
.static HmdRect2
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newHmdRect2
instance allocated on the specifiedMemoryStack
.static HmdVector2
nvBottomRight(long struct)
Unsafe version ofvBottomRight()
.static void
nvBottomRight(long struct, HmdVector2 value)
Unsafe version ofvBottomRight
.static HmdVector2
nvTopLeft(long struct)
Unsafe version ofvTopLeft()
.static void
nvTopLeft(long struct, HmdVector2 value)
Unsafe version ofvTopLeft
.HmdRect2
set(HmdRect2 src)
Copies the specified struct data to this struct.HmdRect2
set(HmdVector2 vTopLeft, HmdVector2 vBottomRight)
Initializes this struct with the specified values.int
sizeof()
HmdVector2
vBottomRight()
Returns aHmdVector2
view of thevBottomRight
field.HmdRect2
vBottomRight(java.util.function.Consumer<HmdVector2> consumer)
Passes thevBottomRight
field to the specifiedConsumer
.HmdRect2
vBottomRight(HmdVector2 value)
Copies the specifiedHmdVector2
to thevBottomRight
field.HmdVector2
vTopLeft()
Returns aHmdVector2
view of thevTopLeft
field.HmdRect2
vTopLeft(java.util.function.Consumer<HmdVector2> consumer)
Passes thevTopLeft
field to the specifiedConsumer
.HmdRect2
vTopLeft(HmdVector2 value)
Copies the specifiedHmdVector2
to thevTopLeft
field.
-
-
-
Constructor Detail
-
HmdRect2
public HmdRect2(java.nio.ByteBuffer container)
Creates aHmdRect2
instance at the current position of the specifiedByteBuffer
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 classorg.lwjgl.system.Struct
-
vTopLeft
public HmdVector2 vTopLeft()
Returns aHmdVector2
view of thevTopLeft
field.
-
vBottomRight
public HmdVector2 vBottomRight()
Returns aHmdVector2
view of thevBottomRight
field.
-
vTopLeft
public HmdRect2 vTopLeft(HmdVector2 value)
Copies the specifiedHmdVector2
to thevTopLeft
field.
-
vTopLeft
public HmdRect2 vTopLeft(java.util.function.Consumer<HmdVector2> consumer)
Passes thevTopLeft
field to the specifiedConsumer
.
-
vBottomRight
public HmdRect2 vBottomRight(HmdVector2 value)
Copies the specifiedHmdVector2
to thevBottomRight
field.
-
vBottomRight
public HmdRect2 vBottomRight(java.util.function.Consumer<HmdVector2> consumer)
Passes thevBottomRight
field to the specifiedConsumer
.
-
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 newHmdRect2
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static HmdRect2 calloc()
Returns a newHmdRect2
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static HmdRect2 create()
Returns a newHmdRect2
instance allocated withBufferUtils
.
-
create
public static HmdRect2 create(long address)
Returns a newHmdRect2
instance for the specified memory address.
-
createSafe
@Nullable public static HmdRect2 createSafe(long address)
-
malloc
public static HmdRect2.Buffer malloc(int capacity)
Returns a newHmdRect2.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static HmdRect2.Buffer calloc(int capacity)
Returns a newHmdRect2.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static HmdRect2.Buffer create(int capacity)
Returns a newHmdRect2.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static HmdRect2.Buffer create(long address, int capacity)
Create aHmdRect2.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static HmdRect2.Buffer createSafe(long address, int capacity)
-
mallocStack
public static HmdRect2 mallocStack()
Returns a newHmdRect2
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static HmdRect2 callocStack()
Returns a newHmdRect2
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static HmdRect2 mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newHmdRect2
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static HmdRect2 callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newHmdRect2
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static HmdRect2.Buffer mallocStack(int capacity)
Returns a newHmdRect2.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static HmdRect2.Buffer callocStack(int capacity)
Returns a newHmdRect2.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static HmdRect2.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newHmdRect2.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static HmdRect2.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newHmdRect2.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nvTopLeft
public static HmdVector2 nvTopLeft(long struct)
Unsafe version ofvTopLeft()
.
-
nvBottomRight
public static HmdVector2 nvBottomRight(long struct)
Unsafe version ofvBottomRight()
.
-
nvTopLeft
public static void nvTopLeft(long struct, HmdVector2 value)
Unsafe version ofvTopLeft
.
-
nvBottomRight
public static void nvBottomRight(long struct, HmdVector2 value)
Unsafe version ofvBottomRight
.
-
-