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.Layout
struct VREvent_t { uint32_teventType(); TrackedDeviceIndex_ttrackedDeviceIndex(); floateventAgeSeconds();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 Deprecated 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 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 VREventcallocStack()Deprecated.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 VREventcreateSafe(long address)static VREvent.BuffercreateSafe(long address, int capacity)VREventDatadata()more information about the event.floateventAgeSeconds()the age of the event in secondsinteventType()the 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 VREventmallocStack()Deprecated.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()inttrackedDeviceIndex()the tracked device index of the event.
-
-
-
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()
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
public VREventData 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
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
@Deprecated public static VREvent mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static VREvent callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static VREvent mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static VREvent callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static VREvent.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static VREvent.Buffer callocStack(int capacity)
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
public static VREvent malloc(org.lwjgl.system.MemoryStack stack)
Returns a newVREventinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static VREvent calloc(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
-
malloc
public static VREvent.Buffer malloc(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
-
calloc
public static VREvent.Buffer calloc(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().
-
-