Package org.lwjgl.openvr
Class VREventMouse
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.openvr.VREventMouse
-
- All Implemented Interfaces:
org.lwjgl.system.Pointer
public class VREventMouse extends org.lwjgl.system.Struct
Used for simulated mouse events in overlay space.Member documentation
x
– coords are in GL space, bottom left of the texture is 0,0button
– one of:VR.EVRMouseButton_VRMouseButton_Left
VR.EVRMouseButton_VRMouseButton_Right
VR.EVRMouseButton_VRMouseButton_Middle
Layout
struct VREvent_Mouse_t { float x; float y; uint32_t button; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VREventMouse.Buffer
An array ofVREventMouse
structs.
-
Constructor Summary
Constructors Constructor Description VREventMouse(java.nio.ByteBuffer container)
Creates aVREventMouse
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
button()
Returns the value of thebutton
field.static VREventMouse
create(long address)
Returns a newVREventMouse
instance for the specified memory address.static VREventMouse.Buffer
create(long address, int capacity)
Create aVREventMouse.Buffer
instance at the specified memory.static VREventMouse
createSafe(long address)
static VREventMouse.Buffer
createSafe(long address, int capacity)
static int
nbutton(long struct)
Unsafe version ofbutton()
.static float
nx(long struct)
Unsafe version ofx()
.static float
ny(long struct)
Unsafe version ofy()
.int
sizeof()
float
x()
Returns the value of thex
field.float
y()
Returns the value of they
field.
-
-
-
Constructor Detail
-
VREventMouse
public VREventMouse(java.nio.ByteBuffer container)
Creates aVREventMouse
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
-
x
public float x()
Returns the value of thex
field.
-
y
public float y()
Returns the value of they
field.
-
button
public int button()
Returns the value of thebutton
field.
-
create
public static VREventMouse create(long address)
Returns a newVREventMouse
instance for the specified memory address.
-
createSafe
@Nullable public static VREventMouse createSafe(long address)
-
create
public static VREventMouse.Buffer create(long address, int capacity)
Create aVREventMouse.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static VREventMouse.Buffer createSafe(long address, int capacity)
-
nx
public static float nx(long struct)
Unsafe version ofx()
.
-
ny
public static float ny(long struct)
Unsafe version ofy()
.
-
nbutton
public static int nbutton(long struct)
Unsafe version ofbutton()
.
-
-