Package org.lwjgl.openvr
Class VRNativeDevice
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<VRNativeDevice>
org.lwjgl.openvr.VRNativeDevice
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VRNativeDevice
extends org.lwjgl.system.Struct<VRNativeDevice>
implements org.lwjgl.system.NativeResource
Layout
struct VRNativeDevice_t {
void * handle;
EDeviceType eType;
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionVRNativeDevice(ByteBuffer container) Creates aVRNativeDeviceinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic VRNativeDevicecalloc()Returns a newVRNativeDeviceinstance allocated withmemCalloc.static VRNativeDevice.Buffercalloc(int capacity) Returns a newVRNativeDevice.Bufferinstance allocated withmemCalloc.static VRNativeDevice.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVRNativeDevice.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VRNativeDevicecalloc(org.lwjgl.system.MemoryStack stack) Returns a newVRNativeDeviceinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VRNativeDevicecreate()Returns a newVRNativeDeviceinstance allocated withBufferUtils.static VRNativeDevice.Buffercreate(int capacity) Returns a newVRNativeDevice.Bufferinstance allocated withBufferUtils.static VRNativeDevicecreate(long address) Returns a newVRNativeDeviceinstance for the specified memory address.static VRNativeDevice.Buffercreate(long address, int capacity) Create aVRNativeDevice.Bufferinstance at the specified memory.static @Nullable VRNativeDevicecreateSafe(long address) static @Nullable VRNativeDevice.BuffercreateSafe(long address, int capacity) inteType()eType(int value) Sets the specified value to theeTypefield.longhandle()handle(long value) Sets the specified value to thehandlefield.static VRNativeDevicemalloc()Returns a newVRNativeDeviceinstance allocated withmemAlloc.static VRNativeDevice.Buffermalloc(int capacity) Returns a newVRNativeDevice.Bufferinstance allocated withmemAlloc.static VRNativeDevice.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVRNativeDevice.Bufferinstance allocated on the specifiedMemoryStack.static VRNativeDevicemalloc(org.lwjgl.system.MemoryStack stack) Returns a newVRNativeDeviceinstance allocated on the specifiedMemoryStack.static intneType(long struct) Unsafe version ofeType().static voidneType(long struct, int value) Unsafe version ofeType.static longnhandle(long struct) Unsafe version ofhandle().static voidnhandle(long struct, long value) Unsafe version ofhandle.set(long handle, int eType) Initializes this struct with the specified values.set(VRNativeDevice src) Copies the specified struct data to this struct.intsizeof()static voidvalidate(long struct) Validates pointer members that should not beNULL.Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate, validateMethods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
HANDLE
public static final int HANDLEThe struct member offsets. -
ETYPE
public static final int ETYPEThe struct member offsets.
-
-
Constructor Details
-
VRNativeDevice
Creates aVRNativeDeviceinstance at the current position of the specifiedByteBuffercontainer. 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:
sizeofin classorg.lwjgl.system.Struct<VRNativeDevice>
-
handle
public long handle()- Returns:
- the value of the
handlefield.
-
eType
public int eType()- Returns:
- the value of the
eTypefield.
-
handle
Sets the specified value to thehandlefield. -
eType
Sets the specified value to theeTypefield. -
set
Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newVRNativeDeviceinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newVRNativeDeviceinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newVRNativeDeviceinstance allocated withBufferUtils. -
create
Returns a newVRNativeDeviceinstance for the specified memory address. -
createSafe
-
malloc
Returns a newVRNativeDevice.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newVRNativeDevice.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newVRNativeDevice.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aVRNativeDevice.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newVRNativeDeviceinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newVRNativeDeviceinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newVRNativeDevice.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newVRNativeDevice.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nhandle
public static long nhandle(long struct) Unsafe version ofhandle(). -
neType
public static int neType(long struct) Unsafe version ofeType(). -
nhandle
public static void nhandle(long struct, long value) Unsafe version ofhandle. -
neType
public static void neType(long struct, int value) Unsafe version ofeType. -
validate
public static void validate(long struct) Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-