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.NativeResourceAn 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_tdata; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVREvent.BufferAn array ofVREventstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intDATA
EVENTAGESECONDS
EVENTTYPEThe struct member offsets.static intSIZEOFThe struct size in bytes.static intTRACKEDDEVICEINDEXThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description VREvent(java.nio.ByteBuffer container)Creates aVREventinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VREventcalloc()Returns a newVREventinstance allocated withmemCalloc.static VREvent.Buffercalloc(int capacity)Returns a newVREvent.Bufferinstance allocated withmemCalloc.static VREventcallocStack()Returns a newVREventinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VREvent.BuffercallocStack(int capacity)Returns a newVREvent.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VREvent.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVREvent.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VREventcallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVREventinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VREventcreate()Returns a newVREventinstance allocated withBufferUtils.static VREvent.Buffercreate(int capacity)Returns a newVREvent.Bufferinstance allocated withBufferUtils.static VREventcreate(long address)Returns a newVREventinstance for the specified memory address.static VREvent.Buffercreate(long address, int capacity)Create aVREvent.Bufferinstance at the specified memory.static VREventcreateSafe(long address)static VREvent.BuffercreateSafe(long address, int capacity)VREventDatadata()Returns aVREventDataview of thedatafield.floateventAgeSeconds()Returns the value of theeventAgeSecondsfield.inteventType()Returns the value of theeventTypefield.static VREventmalloc()Returns a newVREventinstance allocated withmemAlloc.static VREvent.Buffermalloc(int capacity)Returns a newVREvent.Bufferinstance allocated withmemAlloc.static VREventmallocStack()Returns a newVREventinstance allocated on the thread-localMemoryStack.static VREvent.BuffermallocStack(int capacity)Returns a newVREvent.Bufferinstance allocated on the thread-localMemoryStack.static VREvent.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVREvent.Bufferinstance allocated on the specifiedMemoryStack.static VREventmallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVREventinstance allocated on the specifiedMemoryStack.static VREventDatandata(long struct)Unsafe version ofdata().static floatneventAgeSeconds(long struct)Unsafe version ofeventAgeSeconds().static intneventType(long struct)Unsafe version ofeventType().static intntrackedDeviceIndex(long struct)Unsafe version oftrackedDeviceIndex().intsizeof()inttrackedDeviceIndex()Returns the value of thetrackedDeviceIndexfield.
-
-
-
Constructor Detail
-
VREvent
public VREvent(java.nio.ByteBuffer container)
Creates aVREventinstance 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
-
eventType
public int eventType()
Returns the value of theeventTypefield.
-
trackedDeviceIndex
public int trackedDeviceIndex()
Returns the value of thetrackedDeviceIndexfield.
-
eventAgeSeconds
public float eventAgeSeconds()
Returns the value of theeventAgeSecondsfield.
-
data
public VREventData data()
Returns aVREventDataview of thedatafield.
-
malloc
public static VREvent malloc()
Returns a newVREventinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VREvent calloc()
Returns a newVREventinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VREvent create()
Returns a newVREventinstance allocated withBufferUtils.
-
create
public static VREvent create(long address)
Returns a newVREventinstance for the specified memory address.
-
createSafe
@Nullable public static VREvent createSafe(long address)
-
malloc
public static VREvent.Buffer malloc(int capacity)
Returns a newVREvent.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VREvent.Buffer calloc(int capacity)
Returns a newVREvent.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VREvent.Buffer create(int capacity)
Returns a newVREvent.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VREvent.Buffer create(long address, int capacity)
Create aVREvent.Bufferinstance 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 newVREventinstance allocated on the thread-localMemoryStack.
-
callocStack
public static VREvent callocStack()
Returns a newVREventinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static VREvent mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVREventinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VREvent callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVREventinstance allocated on the specifiedMemoryStackand 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.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static VREvent.Buffer callocStack(int capacity)
Returns a newVREvent.Bufferinstance allocated on the thread-localMemoryStackand 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.Bufferinstance 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.Bufferinstance allocated on the specifiedMemoryStackand 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().
-
-