Package org.lwjgl.openvr
Class VREvent
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<VREvent>
org.lwjgl.openvr.VREvent
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VREvent
extends org.lwjgl.system.Struct<VREvent>
implements org.lwjgl.system.NativeResource
An event posted by the server to all running applications.
Layout
struct VREvent_t {
uint32_t eventType();
TrackedDeviceIndex_t trackedDeviceIndex();
float eventAgeSeconds();
VREvent_Data_t data();
}-
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 member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionVREvent(ByteBuffer container) Creates aVREventinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic VREventcalloc()Returns a newVREventinstance allocated withmemCalloc.static VREvent.Buffercalloc(int capacity) Returns a newVREvent.Bufferinstance allocated withmemCalloc.static VREvent.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVREvent.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VREventcalloc(org.lwjgl.system.MemoryStack stack) Returns a newVREventinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VREventDeprecated.static VREvent.BuffercallocStack(int capacity) Deprecated.static VREvent.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static VREventcallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.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 @Nullable VREventcreateSafe(long address) static @Nullable VREvent.BuffercreateSafe(long address, int capacity) data()more information about the event.floatthe age of the event in secondsintthe type of the event.static VREventmalloc()Returns a newVREventinstance allocated withmemAlloc.static VREvent.Buffermalloc(int capacity) Returns a newVREvent.Bufferinstance allocated withmemAlloc.static VREvent.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVREvent.Bufferinstance allocated on the specifiedMemoryStack.static VREventmalloc(org.lwjgl.system.MemoryStack stack) Returns a newVREventinstance allocated on the specifiedMemoryStack.static VREventDeprecated.static VREvent.BuffermallocStack(int capacity) Deprecated.static VREvent.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static VREventmallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.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()intthe tracked device index of the event.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. -
EVENTTYPE
public static final int EVENTTYPEThe struct member offsets. -
TRACKEDDEVICEINDEX
public static final int TRACKEDDEVICEINDEXThe struct member offsets. -
EVENTAGESECONDS
public static final int EVENTAGESECONDSThe struct member offsets. -
DATA
public static final int DATAThe struct member offsets.
-
-
Constructor Details
-
VREvent
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 Details
-
sizeof
public int sizeof()- Specified by:
sizeofin classorg.lwjgl.system.Struct<VREvent>
-
eventType
public int eventType()the type of the event. One of: -
trackedDeviceIndex
public int trackedDeviceIndex()the tracked device index of the event. For events that aren't connected to a tracked device this isVR.k_unTrackedDeviceIndexInvalid. -
eventAgeSeconds
public float eventAgeSeconds()the age of the event in seconds -
data
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. -
malloc
Returns a newVREventinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newVREventinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newVREventinstance allocated withBufferUtils. -
create
Returns a newVREventinstance for the specified memory address. -
createSafe
-
malloc
Returns a newVREvent.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newVREvent.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newVREvent.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aVREvent.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
mallocStack
@Deprecated public static VREvent.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead. -
callocStack
@Deprecated public static VREvent.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
malloc
Returns a newVREventinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newVREventinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newVREvent.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newVREvent.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
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
Unsafe version ofdata().
-