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];
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • TIMEINSECONDS

      public static final int TIMEINSECONDS
      The struct member offsets.
    • BUTTONS

      public static final int BUTTONS
      The struct member offsets.
    • TOUCHES

      public static final int TOUCHES
      The struct member offsets.
    • INDEXTRIGGER

      public static final int INDEXTRIGGER
      The struct member offsets.
    • HANDTRIGGER

      public static final int HANDTRIGGER
      The struct member offsets.
    • THUMBSTICK

      public static final int THUMBSTICK
      The struct member offsets.
    • CONTROLLERTYPE

      public static final int CONTROLLERTYPE
      The struct member offsets.
    • INDEXTRIGGERNODEADZONE

      public static final int INDEXTRIGGERNODEADZONE
      The struct member offsets.
    • HANDTRIGGERNODEADZONE

      public static final int HANDTRIGGERNODEADZONE
      The struct member offsets.
    • THUMBSTICKNODEADZONE

      public static final int THUMBSTICKNODEADZONE
      The struct member offsets.
    • INDEXTRIGGERRAW

      public static final int INDEXTRIGGERRAW
      The struct member offsets.
    • HANDTRIGGERRAW

      public static final int HANDTRIGGERRAW
      The struct member offsets.
    • THUMBSTICKRAW

      public static final int THUMBSTICKRAW
      The struct member offsets.
  • Constructor Details

    • OVRInputState

      public OVRInputState(ByteBuffer container)
      Creates a OVRInputState instance at the current position of the specified ByteBuffer 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 Details

    • sizeof

      public int sizeof()
      Specified by:
      sizeof in class org.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 by ovrButton
    • Touches

      public int Touches()
      touch values for buttons and sensors as described by ovrTouch.
    • IndexTrigger

      public FloatBuffer IndexTrigger()
      left and right finger trigger values (Hand_Left and Hand_Right), in the range 0.0 to 1.0f.
    • IndexTrigger

      public float IndexTrigger(int index)
      left and right finger trigger values (Hand_Left and Hand_Right), in the range 0.0 to 1.0f.
    • HandTrigger

      public FloatBuffer HandTrigger()
      left and right hand trigger values (Hand_Left and Hand_Right), in the range 0.0 to 1.0f.
    • HandTrigger

      public float HandTrigger(int index)
      left and right hand trigger values (Hand_Left and Hand_Right), in the range 0.0 to 1.0f.
    • Thumbstick

      public OVRVector2f.Buffer Thumbstick()
      horizontal and vertical thumbstick axis values (Hand_Left and Hand_Right), in the range -1.0f to 1.0f.
    • Thumbstick

      public OVRVector2f Thumbstick(int index)
      horizontal and vertical thumbstick axis values (Hand_Left and Hand_Right), in the range -1.0f to 1.0f.
    • ControllerType

      public int ControllerType()
    • IndexTriggerNoDeadzone

      public FloatBuffer IndexTriggerNoDeadzone()
      Left and right finger trigger values (Hand_Left and Hand_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_Left and Hand_Right), in range 0.0 to 1.0f. Does not apply a deadzone. Only touch applies a filter.
    • HandTriggerNoDeadzone

      public FloatBuffer HandTriggerNoDeadzone()
      Left and right hand trigger values (Hand_Left and Hand_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_Left and Hand_Right), in the range 0.0 to 1.0f. Does not apply a deadzone. Only touch applies a filter.
    • ThumbstickNoDeadzone

      public OVRVector2f.Buffer ThumbstickNoDeadzone()
      Horizontal and vertical thumbstick axis values (Hand_Left and Hand_Right), in the range -1.0f to 1.0f. Does not apply a deadzone or filter.
    • ThumbstickNoDeadzone

      public OVRVector2f ThumbstickNoDeadzone(int index)
      Horizontal and vertical thumbstick axis values (Hand_Left and Hand_Right), in the range -1.0f to 1.0f. Does not apply a deadzone or filter.
    • IndexTriggerRaw

      public FloatBuffer IndexTriggerRaw()
      Left and right finger trigger values (Hand_Left and Hand_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_Left and Hand_Right), in range 0.0 to 1.0f. No deadzone or filter.
    • HandTriggerRaw

      public FloatBuffer HandTriggerRaw()
      Left and right hand trigger values (Hand_Left and Hand_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_Left and Hand_Right), in the range 0.0 to 1.0f. No deadzone or filter.
    • ThumbstickRaw

      public OVRVector2f.Buffer ThumbstickRaw()
      Horizontal and vertical thumbstick axis values (Hand_Left and Hand_Right), in range -1.0f to 1.0f. No deadzone or filter.
    • ThumbstickRaw

      public OVRVector2f ThumbstickRaw(int index)
      Horizontal and vertical thumbstick axis values (Hand_Left and Hand_Right), in range -1.0f to 1.0f. No deadzone or filter.
    • malloc

      public static OVRInputState malloc()
      Returns a new OVRInputState instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static OVRInputState calloc()
      Returns a new OVRInputState instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static OVRInputState create()
      Returns a new OVRInputState instance allocated with BufferUtils.
    • create

      public static OVRInputState create(long address)
      Returns a new OVRInputState instance for the specified memory address.
    • createSafe

      public static @Nullable OVRInputState createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static OVRInputState.Buffer malloc(int capacity)
      Returns a new OVRInputState.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static OVRInputState.Buffer calloc(int capacity)
      Returns a new OVRInputState.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static OVRInputState.Buffer create(int capacity)
      Returns a new OVRInputState.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static OVRInputState.Buffer create(long address, int capacity)
      Create a OVRInputState.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      public static @Nullable OVRInputState.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • mallocStack

      @Deprecated public static OVRInputState mallocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static OVRInputState callocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static OVRInputState mallocStack(org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static OVRInputState callocStack(org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static OVRInputState.Buffer mallocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static OVRInputState.Buffer callocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(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. Use malloc(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. Use calloc(int, MemoryStack) instead.
    • malloc

      public static OVRInputState malloc(org.lwjgl.system.MemoryStack stack)
      Returns a new OVRInputState instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static OVRInputState calloc(org.lwjgl.system.MemoryStack stack)
      Returns a new OVRInputState instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static OVRInputState.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new OVRInputState.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static OVRInputState.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new OVRInputState.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • nTimeInSeconds

      public static double nTimeInSeconds(long struct)
      Unsafe version of TimeInSeconds().
    • nButtons

      public static int nButtons(long struct)
      Unsafe version of Buttons().
    • nTouches

      public static int nTouches(long struct)
      Unsafe version of Touches().
    • nIndexTrigger

      public static FloatBuffer nIndexTrigger(long struct)
      Unsafe version of IndexTrigger().
    • nIndexTrigger

      public static float nIndexTrigger(long struct, int index)
      Unsafe version of IndexTrigger.
    • nHandTrigger

      public static FloatBuffer nHandTrigger(long struct)
      Unsafe version of HandTrigger().
    • nHandTrigger

      public static float nHandTrigger(long struct, int index)
      Unsafe version of HandTrigger.
    • nThumbstick

      public static OVRVector2f.Buffer nThumbstick(long struct)
      Unsafe version of Thumbstick().
    • nThumbstick

      public static OVRVector2f nThumbstick(long struct, int index)
      Unsafe version of Thumbstick.
    • nControllerType

      public static int nControllerType(long struct)
      Unsafe version of ControllerType().
    • nIndexTriggerNoDeadzone

      public static FloatBuffer nIndexTriggerNoDeadzone(long struct)
      Unsafe version of IndexTriggerNoDeadzone().
    • nIndexTriggerNoDeadzone

      public static float nIndexTriggerNoDeadzone(long struct, int index)
      Unsafe version of IndexTriggerNoDeadzone.
    • nHandTriggerNoDeadzone

      public static FloatBuffer nHandTriggerNoDeadzone(long struct)
      Unsafe version of HandTriggerNoDeadzone().
    • nHandTriggerNoDeadzone

      public static float nHandTriggerNoDeadzone(long struct, int index)
      Unsafe version of HandTriggerNoDeadzone.
    • nThumbstickNoDeadzone

      public static OVRVector2f.Buffer nThumbstickNoDeadzone(long struct)
      Unsafe version of ThumbstickNoDeadzone().
    • nThumbstickNoDeadzone

      public static OVRVector2f nThumbstickNoDeadzone(long struct, int index)
      Unsafe version of ThumbstickNoDeadzone.
    • nIndexTriggerRaw

      public static FloatBuffer nIndexTriggerRaw(long struct)
      Unsafe version of IndexTriggerRaw().
    • nIndexTriggerRaw

      public static float nIndexTriggerRaw(long struct, int index)
      Unsafe version of IndexTriggerRaw.
    • nHandTriggerRaw

      public static FloatBuffer nHandTriggerRaw(long struct)
      Unsafe version of HandTriggerRaw().
    • nHandTriggerRaw

      public static float nHandTriggerRaw(long struct, int index)
      Unsafe version of HandTriggerRaw.
    • nThumbstickRaw

      public static OVRVector2f.Buffer nThumbstickRaw(long struct)
      Unsafe version of ThumbstickRaw().
    • nThumbstickRaw

      public static OVRVector2f nThumbstickRaw(long struct, int index)
      Unsafe version of ThumbstickRaw.