Package org.lwjgl.openvr
Class VREvent
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.openvr.VREvent
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class VREvent extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
An event posted by the server to all running applications.Member documentation
eventType
– the type of the event. One of:trackedDeviceIndex
– the tracked device index of the event. For events that aren't connected to a tracked device this isVR.k_unTrackedDeviceIndexInvalid
.eventAgeSeconds
– the age of the event in secondsdata
– more information about the event. This is a union of several structs. See the event type enum for information about which union member to look at for each event.
Layout
struct VREvent_t { uint32_t eventType; TrackedDeviceIndex_t trackedDeviceIndex; float eventAgeSeconds;
VREvent_Data_t
data; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VREvent.Buffer
An array ofVREvent
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
DATA
EVENTAGESECONDS
EVENTTYPEThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
TRACKEDDEVICEINDEX
The struct member offsets.
-
Constructor Summary
Constructors Constructor Description VREvent(java.nio.ByteBuffer container)
Creates aVREvent
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 VREvent
calloc()
Returns a newVREvent
instance allocated withmemCalloc
.static VREvent.Buffer
calloc(int capacity)
Returns a newVREvent.Buffer
instance allocated withmemCalloc
.static VREvent
callocStack()
Returns a newVREvent
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VREvent.Buffer
callocStack(int capacity)
Returns a newVREvent.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VREvent.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVREvent.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VREvent
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVREvent
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VREvent
create()
Returns a newVREvent
instance allocated withBufferUtils
.static VREvent.Buffer
create(int capacity)
Returns a newVREvent.Buffer
instance allocated withBufferUtils
.static VREvent
create(long address)
Returns a newVREvent
instance for the specified memory address.static VREvent.Buffer
create(long address, int capacity)
Create aVREvent.Buffer
instance at the specified memory.static VREvent
createSafe(long address)
static VREvent.Buffer
createSafe(long address, int capacity)
VREventData
data()
Returns aVREventData
view of thedata
field.float
eventAgeSeconds()
Returns the value of theeventAgeSeconds
field.int
eventType()
Returns the value of theeventType
field.static VREvent
malloc()
Returns a newVREvent
instance allocated withmemAlloc
.static VREvent.Buffer
malloc(int capacity)
Returns a newVREvent.Buffer
instance allocated withmemAlloc
.static VREvent
mallocStack()
Returns a newVREvent
instance allocated on the thread-localMemoryStack
.static VREvent.Buffer
mallocStack(int capacity)
Returns a newVREvent.Buffer
instance allocated on the thread-localMemoryStack
.static VREvent.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVREvent.Buffer
instance allocated on the specifiedMemoryStack
.static VREvent
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVREvent
instance allocated on the specifiedMemoryStack
.static VREventData
ndata(long struct)
Unsafe version ofdata()
.static float
neventAgeSeconds(long struct)
Unsafe version ofeventAgeSeconds()
.static int
neventType(long struct)
Unsafe version ofeventType()
.static int
ntrackedDeviceIndex(long struct)
Unsafe version oftrackedDeviceIndex()
.int
sizeof()
int
trackedDeviceIndex()
Returns the value of thetrackedDeviceIndex
field.
-
-
-
Constructor Detail
-
VREvent
public VREvent(java.nio.ByteBuffer container)
Creates aVREvent
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
-
eventType
public int eventType()
Returns the value of theeventType
field.
-
trackedDeviceIndex
public int trackedDeviceIndex()
Returns the value of thetrackedDeviceIndex
field.
-
eventAgeSeconds
public float eventAgeSeconds()
Returns the value of theeventAgeSeconds
field.
-
data
public VREventData data()
Returns aVREventData
view of thedata
field.
-
malloc
public static VREvent malloc()
Returns a newVREvent
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VREvent calloc()
Returns a newVREvent
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VREvent create()
Returns a newVREvent
instance allocated withBufferUtils
.
-
create
public static VREvent create(long address)
Returns a newVREvent
instance for the specified memory address.
-
createSafe
@Nullable public static VREvent createSafe(long address)
-
malloc
public static VREvent.Buffer malloc(int capacity)
Returns a newVREvent.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VREvent.Buffer calloc(int capacity)
Returns a newVREvent.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VREvent.Buffer create(int capacity)
Returns a newVREvent.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VREvent.Buffer create(long address, int capacity)
Create aVREvent.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static VREvent.Buffer createSafe(long address, int capacity)
-
mallocStack
public static VREvent mallocStack()
Returns a newVREvent
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VREvent callocStack()
Returns a newVREvent
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VREvent mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVREvent
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VREvent callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVREvent
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static VREvent.Buffer mallocStack(int capacity)
Returns a newVREvent.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VREvent.Buffer callocStack(int capacity)
Returns a newVREvent.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VREvent.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVREvent.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static VREvent.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVREvent.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
neventType
public static int neventType(long struct)
Unsafe version ofeventType()
.
-
ntrackedDeviceIndex
public static int ntrackedDeviceIndex(long struct)
Unsafe version oftrackedDeviceIndex()
.
-
neventAgeSeconds
public static float neventAgeSeconds(long struct)
Unsafe version ofeventAgeSeconds()
.
-
ndata
public static VREventData ndata(long struct)
Unsafe version ofdata()
.
-
-