Package org.lwjgl.openvr
Class VRNativeDevice
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.openvr.VRNativeDevice
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VRNativeDevice extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceLayout
struct VRNativeDevice_t { void * handle; EDeviceType eType; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVRNativeDevice.BufferAn array ofVRNativeDevicestructs.
-
Constructor Summary
Constructors Constructor Description VRNativeDevice(java.nio.ByteBuffer container)Creates aVRNativeDeviceinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static 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 VRNativeDevicecreateSafe(long address)static VRNativeDevice.BuffercreateSafe(long address, int capacity)inteType()VRNativeDeviceeType(int value)Sets the specified value to theeTypefield.longhandle()VRNativeDevicehandle(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.VRNativeDeviceset(long handle, int eType)Initializes this struct with the specified values.VRNativeDeviceset(VRNativeDevice src)Copies the specified struct data to this struct.intsizeof()static voidvalidate(long struct)Validates pointer members that should not beNULL.
-
-
-
Constructor Detail
-
VRNativeDevice
public VRNativeDevice(java.nio.ByteBuffer container)
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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
handle
public long handle()
- Returns:
- the value of the
handlefield.
-
eType
public int eType()
- Returns:
- the value of the
eTypefield.
-
handle
public VRNativeDevice handle(long value)
Sets the specified value to thehandlefield.
-
eType
public VRNativeDevice eType(int value)
Sets the specified value to theeTypefield.
-
set
public VRNativeDevice set(long handle, int eType)
Initializes this struct with the specified values.
-
set
public VRNativeDevice set(VRNativeDevice src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static VRNativeDevice malloc()
Returns a newVRNativeDeviceinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VRNativeDevice calloc()
Returns a newVRNativeDeviceinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VRNativeDevice create()
Returns a newVRNativeDeviceinstance allocated withBufferUtils.
-
create
public static VRNativeDevice create(long address)
Returns a newVRNativeDeviceinstance for the specified memory address.
-
createSafe
@Nullable public static VRNativeDevice createSafe(long address)
-
malloc
public static VRNativeDevice.Buffer malloc(int capacity)
Returns a newVRNativeDevice.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VRNativeDevice.Buffer calloc(int capacity)
Returns a newVRNativeDevice.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VRNativeDevice.Buffer create(int capacity)
Returns a newVRNativeDevice.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VRNativeDevice.Buffer create(long address, int capacity)
Create aVRNativeDevice.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static VRNativeDevice.Buffer createSafe(long address, int capacity)
-
malloc
public static VRNativeDevice malloc(org.lwjgl.system.MemoryStack stack)
Returns a newVRNativeDeviceinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static VRNativeDevice calloc(org.lwjgl.system.MemoryStack stack)
Returns a newVRNativeDeviceinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static VRNativeDevice.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVRNativeDevice.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static VRNativeDevice.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVRNativeDevice.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
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
-
-