Package org.lwjgl.ovr
Class OVRInputState
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<OVRInputState>
org.lwjgl.ovr.OVRInputState
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class OVRInputState
extends org.lwjgl.system.Struct<OVRInputState>
implements org.lwjgl.system.NativeResource
Describes the complete controller input state, including Oculus Touch, and XBox gamepad. If multiple inputs are connected and used at the same time,
their inputs are combined.
Layout
struct ovrInputState {
double TimeInSeconds();
unsigned int Buttons();
unsigned int Touches();
float IndexTrigger()[ovrHand_Count];
float HandTrigger()[ovrHand_Count];
ovrVector2f Thumbstick()[ovrHand_Count];
ovrControllerType ControllerType();
float IndexTriggerNoDeadzone()[ovrHand_Count];
float HandTriggerNoDeadzone()[ovrHand_Count];
ovrVector2f ThumbstickNoDeadzone()[ovrHand_Count];
float IndexTriggerRaw()[ovrHand_Count];
float HandTriggerRaw()[ovrHand_Count];
ovrVector2f ThumbstickRaw()[ovrHand_Count];
}-
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 member offsets.static final intThe struct member offsets.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.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.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
ConstructorsConstructorDescriptionOVRInputState(ByteBuffer container) Creates aOVRInputStateinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionintButtons()values for buttons described byovrButtonstatic OVRInputStatecalloc()Returns a newOVRInputStateinstance allocated withmemCalloc.static OVRInputState.Buffercalloc(int capacity) Returns a newOVRInputState.Bufferinstance allocated withmemCalloc.static OVRInputState.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newOVRInputState.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static OVRInputStatecalloc(org.lwjgl.system.MemoryStack stack) Returns a newOVRInputStateinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static OVRInputStateDeprecated.static OVRInputState.BuffercallocStack(int capacity) Deprecated.static OVRInputState.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static OVRInputStatecallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.intThe type of the controller this state is for.static OVRInputStatecreate()Returns a newOVRInputStateinstance allocated withBufferUtils.static OVRInputState.Buffercreate(int capacity) Returns a newOVRInputState.Bufferinstance allocated withBufferUtils.static OVRInputStatecreate(long address) Returns a newOVRInputStateinstance for the specified memory address.static OVRInputState.Buffercreate(long address, int capacity) Create aOVRInputState.Bufferinstance at the specified memory.static @Nullable OVRInputStatecreateSafe(long address) static @Nullable OVRInputState.BuffercreateSafe(long address, int capacity) left and right hand trigger values (Hand_LeftandHand_Right), in the range 0.0 to 1.0f.floatHandTrigger(int index) left and right hand trigger values (Hand_LeftandHand_Right), in the range 0.0 to 1.0f.Left and right hand trigger values (Hand_LeftandHand_Right), in the range 0.0 to 1.0f.floatHandTriggerNoDeadzone(int index) Left and right hand trigger values (Hand_LeftandHand_Right), in the range 0.0 to 1.0f.Left and right hand trigger values (Hand_LeftandHand_Right), in the range 0.0 to 1.0f.floatHandTriggerRaw(int index) Left and right hand trigger values (Hand_LeftandHand_Right), in the range 0.0 to 1.0f.left and right finger trigger values (Hand_LeftandHand_Right), in the range 0.0 to 1.0f.floatIndexTrigger(int index) left and right finger trigger values (Hand_LeftandHand_Right), in the range 0.0 to 1.0f.Left and right finger trigger values (Hand_LeftandHand_Right), in range 0.0 to 1.0f.floatIndexTriggerNoDeadzone(int index) Left and right finger trigger values (Hand_LeftandHand_Right), in range 0.0 to 1.0f.Left and right finger trigger values (Hand_LeftandHand_Right), in range 0.0 to 1.0f.floatIndexTriggerRaw(int index) Left and right finger trigger values (Hand_LeftandHand_Right), in range 0.0 to 1.0f.static OVRInputStatemalloc()Returns a newOVRInputStateinstance allocated withmemAlloc.static OVRInputState.Buffermalloc(int capacity) Returns a newOVRInputState.Bufferinstance allocated withmemAlloc.static OVRInputState.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newOVRInputState.Bufferinstance allocated on the specifiedMemoryStack.static OVRInputStatemalloc(org.lwjgl.system.MemoryStack stack) Returns a newOVRInputStateinstance allocated on the specifiedMemoryStack.static OVRInputStateDeprecated.static OVRInputState.BuffermallocStack(int capacity) Deprecated.static OVRInputState.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static OVRInputStatemallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.static intnButtons(long struct) Unsafe version ofButtons().static intnControllerType(long struct) Unsafe version ofControllerType().static FloatBuffernHandTrigger(long struct) Unsafe version ofHandTrigger().static floatnHandTrigger(long struct, int index) Unsafe version ofHandTrigger.static FloatBuffernHandTriggerNoDeadzone(long struct) Unsafe version ofHandTriggerNoDeadzone().static floatnHandTriggerNoDeadzone(long struct, int index) Unsafe version ofHandTriggerNoDeadzone.static FloatBuffernHandTriggerRaw(long struct) Unsafe version ofHandTriggerRaw().static floatnHandTriggerRaw(long struct, int index) Unsafe version ofHandTriggerRaw.static FloatBuffernIndexTrigger(long struct) Unsafe version ofIndexTrigger().static floatnIndexTrigger(long struct, int index) Unsafe version ofIndexTrigger.static FloatBuffernIndexTriggerNoDeadzone(long struct) Unsafe version ofIndexTriggerNoDeadzone().static floatnIndexTriggerNoDeadzone(long struct, int index) Unsafe version ofIndexTriggerNoDeadzone.static FloatBuffernIndexTriggerRaw(long struct) Unsafe version ofIndexTriggerRaw().static floatnIndexTriggerRaw(long struct, int index) Unsafe version ofIndexTriggerRaw.static OVRVector2f.BuffernThumbstick(long struct) Unsafe version ofThumbstick().static OVRVector2fnThumbstick(long struct, int index) Unsafe version ofThumbstick.static OVRVector2f.BuffernThumbstickNoDeadzone(long struct) Unsafe version ofThumbstickNoDeadzone().static OVRVector2fnThumbstickNoDeadzone(long struct, int index) Unsafe version ofThumbstickNoDeadzone.static OVRVector2f.BuffernThumbstickRaw(long struct) Unsafe version ofThumbstickRaw().static OVRVector2fnThumbstickRaw(long struct, int index) Unsafe version ofThumbstickRaw.static doublenTimeInSeconds(long struct) Unsafe version ofTimeInSeconds().static intnTouches(long struct) Unsafe version ofTouches().intsizeof()horizontal and vertical thumbstick axis values (Hand_LeftandHand_Right), in the range -1.0f to 1.0f.Thumbstick(int index) horizontal and vertical thumbstick axis values (Hand_LeftandHand_Right), in the range -1.0f to 1.0f.Horizontal and vertical thumbstick axis values (Hand_LeftandHand_Right), in the range -1.0f to 1.0f.ThumbstickNoDeadzone(int index) Horizontal and vertical thumbstick axis values (Hand_LeftandHand_Right), in the range -1.0f to 1.0f.Horizontal and vertical thumbstick axis values (Hand_LeftandHand_Right), in range -1.0f to 1.0f.ThumbstickRaw(int index) Horizontal and vertical thumbstick axis values (Hand_LeftandHand_Right), in range -1.0f to 1.0f.doublesystem type when the controller state was last updatedintTouches()touch values for buttons and sensors as described byovrTouch.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. -
TIMEINSECONDS
public static final int TIMEINSECONDSThe struct member offsets. -
BUTTONS
public static final int BUTTONSThe struct member offsets. -
TOUCHES
public static final int TOUCHESThe struct member offsets. -
INDEXTRIGGER
public static final int INDEXTRIGGERThe struct member offsets. -
HANDTRIGGER
public static final int HANDTRIGGERThe struct member offsets. -
THUMBSTICK
public static final int THUMBSTICKThe struct member offsets. -
CONTROLLERTYPE
public static final int CONTROLLERTYPEThe struct member offsets. -
INDEXTRIGGERNODEADZONE
public static final int INDEXTRIGGERNODEADZONEThe struct member offsets. -
HANDTRIGGERNODEADZONE
public static final int HANDTRIGGERNODEADZONEThe struct member offsets. -
THUMBSTICKNODEADZONE
public static final int THUMBSTICKNODEADZONEThe struct member offsets. -
INDEXTRIGGERRAW
public static final int INDEXTRIGGERRAWThe struct member offsets. -
HANDTRIGGERRAW
public static final int HANDTRIGGERRAWThe struct member offsets. -
THUMBSTICKRAW
public static final int THUMBSTICKRAWThe struct member offsets.
-
-
Constructor Details
-
OVRInputState
Creates aOVRInputStateinstance 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<OVRInputState>
-
TimeInSeconds
public double TimeInSeconds()system type when the controller state was last updated -
Buttons
public int Buttons()values for buttons described byovrButton -
Touches
public int Touches()touch values for buttons and sensors as described byovrTouch. -
IndexTrigger
left and right finger trigger values (Hand_LeftandHand_Right), in the range 0.0 to 1.0f. -
IndexTrigger
public float IndexTrigger(int index) left and right finger trigger values (Hand_LeftandHand_Right), in the range 0.0 to 1.0f. -
HandTrigger
left and right hand trigger values (Hand_LeftandHand_Right), in the range 0.0 to 1.0f. -
HandTrigger
public float HandTrigger(int index) left and right hand trigger values (Hand_LeftandHand_Right), in the range 0.0 to 1.0f. -
Thumbstick
horizontal and vertical thumbstick axis values (Hand_LeftandHand_Right), in the range -1.0f to 1.0f. -
Thumbstick
horizontal and vertical thumbstick axis values (Hand_LeftandHand_Right), in the range -1.0f to 1.0f. -
ControllerType
public int ControllerType() -
IndexTriggerNoDeadzone
Left and right finger trigger values (Hand_LeftandHand_Right), in range 0.0 to 1.0f. Does not apply a deadzone. Only touch applies a filter. -
IndexTriggerNoDeadzone
public float IndexTriggerNoDeadzone(int index) Left and right finger trigger values (Hand_LeftandHand_Right), in range 0.0 to 1.0f. Does not apply a deadzone. Only touch applies a filter. -
HandTriggerNoDeadzone
Left and right hand trigger values (Hand_LeftandHand_Right), in the range 0.0 to 1.0f. Does not apply a deadzone. Only touch applies a filter. -
HandTriggerNoDeadzone
public float HandTriggerNoDeadzone(int index) Left and right hand trigger values (Hand_LeftandHand_Right), in the range 0.0 to 1.0f. Does not apply a deadzone. Only touch applies a filter. -
ThumbstickNoDeadzone
Horizontal and vertical thumbstick axis values (Hand_LeftandHand_Right), in the range -1.0f to 1.0f. Does not apply a deadzone or filter. -
ThumbstickNoDeadzone
Horizontal and vertical thumbstick axis values (Hand_LeftandHand_Right), in the range -1.0f to 1.0f. Does not apply a deadzone or filter. -
IndexTriggerRaw
Left and right finger trigger values (Hand_LeftandHand_Right), in range 0.0 to 1.0f. No deadzone or filter. -
IndexTriggerRaw
public float IndexTriggerRaw(int index) Left and right finger trigger values (Hand_LeftandHand_Right), in range 0.0 to 1.0f. No deadzone or filter. -
HandTriggerRaw
Left and right hand trigger values (Hand_LeftandHand_Right), in the range 0.0 to 1.0f. No deadzone or filter. -
HandTriggerRaw
public float HandTriggerRaw(int index) Left and right hand trigger values (Hand_LeftandHand_Right), in the range 0.0 to 1.0f. No deadzone or filter. -
ThumbstickRaw
Horizontal and vertical thumbstick axis values (Hand_LeftandHand_Right), in range -1.0f to 1.0f. No deadzone or filter. -
ThumbstickRaw
Horizontal and vertical thumbstick axis values (Hand_LeftandHand_Right), in range -1.0f to 1.0f. No deadzone or filter. -
malloc
Returns a newOVRInputStateinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newOVRInputStateinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newOVRInputStateinstance allocated withBufferUtils. -
create
Returns a newOVRInputStateinstance for the specified memory address. -
createSafe
-
malloc
Returns a newOVRInputState.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newOVRInputState.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newOVRInputState.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aOVRInputState.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 OVRInputState.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 OVRInputState.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
malloc
Returns a newOVRInputStateinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newOVRInputStateinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newOVRInputState.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newOVRInputState.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nTimeInSeconds
public static double nTimeInSeconds(long struct) Unsafe version ofTimeInSeconds(). -
nButtons
public static int nButtons(long struct) Unsafe version ofButtons(). -
nTouches
public static int nTouches(long struct) Unsafe version ofTouches(). -
nIndexTrigger
Unsafe version ofIndexTrigger(). -
nIndexTrigger
public static float nIndexTrigger(long struct, int index) Unsafe version ofIndexTrigger. -
nHandTrigger
Unsafe version ofHandTrigger(). -
nHandTrigger
public static float nHandTrigger(long struct, int index) Unsafe version ofHandTrigger. -
nThumbstick
Unsafe version ofThumbstick(). -
nThumbstick
Unsafe version ofThumbstick. -
nControllerType
public static int nControllerType(long struct) Unsafe version ofControllerType(). -
nIndexTriggerNoDeadzone
Unsafe version ofIndexTriggerNoDeadzone(). -
nIndexTriggerNoDeadzone
public static float nIndexTriggerNoDeadzone(long struct, int index) Unsafe version ofIndexTriggerNoDeadzone. -
nHandTriggerNoDeadzone
Unsafe version ofHandTriggerNoDeadzone(). -
nHandTriggerNoDeadzone
public static float nHandTriggerNoDeadzone(long struct, int index) Unsafe version ofHandTriggerNoDeadzone. -
nThumbstickNoDeadzone
Unsafe version ofThumbstickNoDeadzone(). -
nThumbstickNoDeadzone
Unsafe version ofThumbstickNoDeadzone. -
nIndexTriggerRaw
Unsafe version ofIndexTriggerRaw(). -
nIndexTriggerRaw
public static float nIndexTriggerRaw(long struct, int index) Unsafe version ofIndexTriggerRaw. -
nHandTriggerRaw
Unsafe version ofHandTriggerRaw(). -
nHandTriggerRaw
public static float nHandTriggerRaw(long struct, int index) Unsafe version ofHandTriggerRaw. -
nThumbstickRaw
Unsafe version ofThumbstickRaw(). -
nThumbstickRaw
Unsafe version ofThumbstickRaw.
-