Package org.lwjgl.ovr

Class OVRInputState

    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • TIMEINSECONDS, BUTTONS, TOUCHES, INDEXTRIGGER, HANDTRIGGER, THUMBSTICK, CONTROLLERTYPE, INDEXTRIGGERNODEADZONE, HANDTRIGGERNODEADZONE, THUMBSTICKNODEADZONE, INDEXTRIGGERRAW, HANDTRIGGERRAW, THUMBSTICKRAW

        The struct member offsets.
    • Constructor Detail

      • OVRInputState

        public OVRInputState​(java.nio.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 Detail

      • sizeof

        public int sizeof()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • 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 java.nio.FloatBuffer 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 java.nio.FloatBuffer 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.
      • IndexTriggerNoDeadzone

        public java.nio.FloatBuffer 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 java.nio.FloatBuffer 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()
        
        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 java.nio.FloatBuffer 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 java.nio.FloatBuffer 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.
      • 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

        @Nullable
        public static 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​(long address,
                                                  int capacity)
        Create a OVRInputState.Buffer instance at the specified memory.
        Parameters:
        address - the memory address
        capacity - the buffer capacity
      • createSafe

        @Nullable
        public static OVRInputState.Buffer createSafe​(long address,
                                                      int capacity)
        Like create, but returns null if address is NULL.
      • 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.
      • 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:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • 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:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • 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 java.nio.FloatBuffer nIndexTrigger​(long struct)
        Unsafe version of IndexTrigger().
      • nIndexTrigger

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

        public static java.nio.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 nThumbstick​(long struct,
                                              int index)
        Unsafe version of Thumbstick.
      • nControllerType

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

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

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

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

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

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

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

        public static java.nio.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 nThumbstickRaw​(long struct,
                                                 int index)
        Unsafe version of ThumbstickRaw.