Class VRInput

java.lang.Object
org.lwjgl.openvr.VRInput

public class VRInput extends Object
  • Method Details

    • nVRInput_SetActionManifestPath

      public static int nVRInput_SetActionManifestPath(long pchActionManifestPath)
      Unsafe version of: SetActionManifestPath
    • VRInput_SetActionManifestPath

      public static int VRInput_SetActionManifestPath(ByteBuffer pchActionManifestPath)
      Sets the path to the action manifest JSON file that is used by this application. If this information was set on the Steam partner site, calls to this function are ignored. If the Steam partner site setting and the path provided by this call are different, VR.EVRInputError_VRInputError_MismatchedActionManifest is returned.

      This call must be made before the first call to UpdateActionState or PollNextEvent.

    • VRInput_SetActionManifestPath

      public static int VRInput_SetActionManifestPath(CharSequence pchActionManifestPath)
      Sets the path to the action manifest JSON file that is used by this application. If this information was set on the Steam partner site, calls to this function are ignored. If the Steam partner site setting and the path provided by this call are different, VR.EVRInputError_VRInputError_MismatchedActionManifest is returned.

      This call must be made before the first call to UpdateActionState or PollNextEvent.

    • nVRInput_GetActionSetHandle

      public static int nVRInput_GetActionSetHandle(long pchActionSetName, long pHandle)
      Unsafe version of: GetActionSetHandle
    • VRInput_GetActionSetHandle

      public static int VRInput_GetActionSetHandle(ByteBuffer pchActionSetName, LongBuffer pHandle)
      Returns a handle for an action set. This handle is used for all performance-sensitive calls.
    • VRInput_GetActionSetHandle

      public static int VRInput_GetActionSetHandle(CharSequence pchActionSetName, LongBuffer pHandle)
      Returns a handle for an action set. This handle is used for all performance-sensitive calls.
    • nVRInput_GetActionHandle

      public static int nVRInput_GetActionHandle(long pchActionName, long pHandle)
      Unsafe version of: GetActionHandle
    • VRInput_GetActionHandle

      public static int VRInput_GetActionHandle(ByteBuffer pchActionName, LongBuffer pHandle)
      Returns a handle for an action. This handle is used for all performance-sensitive calls.
    • VRInput_GetActionHandle

      public static int VRInput_GetActionHandle(CharSequence pchActionName, LongBuffer pHandle)
      Returns a handle for an action. This handle is used for all performance-sensitive calls.
    • nVRInput_GetInputSourceHandle

      public static int nVRInput_GetInputSourceHandle(long pchInputSourcePath, long pHandle)
      Unsafe version of: GetInputSourceHandle
    • VRInput_GetInputSourceHandle

      public static int VRInput_GetInputSourceHandle(ByteBuffer pchInputSourcePath, LongBuffer pHandle)
      Returns a handle for any path in the input system. E.g. /user/hand/right.
    • VRInput_GetInputSourceHandle

      public static int VRInput_GetInputSourceHandle(CharSequence pchInputSourcePath, LongBuffer pHandle)
      Returns a handle for any path in the input system. E.g. /user/hand/right.
    • nVRInput_UpdateActionState

      public static int nVRInput_UpdateActionState(long pSets, int unSizeOfVRSelectedActionSet_t, int unSetCount)
      Unsafe version of: UpdateActionState
    • VRInput_UpdateActionState

      public static int VRInput_UpdateActionState(VRActiveActionSet.Buffer pSets, int unSizeOfVRSelectedActionSet_t)
      Reads the current state into all actions. After this call, the results of Get*Action calls will be the same until the next call to UpdateActionState.
    • nVRInput_GetDigitalActionData

      public static int nVRInput_GetDigitalActionData(long action, long pActionData, int unActionDataSize, long ulRestrictToDevice)
      Unsafe version of: GetDigitalActionData
    • VRInput_GetDigitalActionData

      public static int VRInput_GetDigitalActionData(long action, InputDigitalActionData pActionData, int unActionDataSize, long ulRestrictToDevice)
      Reads the state of a digital action given its handle. This will return VR.EVRInputError_VRInputError_WrongType if the type of action is something other than digital.
    • VRInput_GetDigitalActionData

      public static int VRInput_GetDigitalActionData(long action, InputDigitalActionData pActionData, long ulRestrictToDevice)
      Reads the state of a digital action given its handle. This will return VR.EVRInputError_VRInputError_WrongType if the type of action is something other than digital.
    • nVRInput_GetAnalogActionData

      public static int nVRInput_GetAnalogActionData(long action, long pActionData, int unActionDataSize, long ulRestrictToDevice)
      Unsafe version of: GetAnalogActionData
    • VRInput_GetAnalogActionData

      public static int VRInput_GetAnalogActionData(long action, InputAnalogActionData pActionData, int unActionDataSize, long ulRestrictToDevice)
      Reads the state of an analog action given its handle. This will return VR.EVRInputError_VRInputError_WrongType if the type of action is something other than analog.
    • VRInput_GetAnalogActionData

      public static int VRInput_GetAnalogActionData(long action, InputAnalogActionData pActionData, long ulRestrictToDevice)
      Reads the state of an analog action given its handle. This will return VR.EVRInputError_VRInputError_WrongType if the type of action is something other than analog.
    • nVRInput_GetPoseActionDataRelativeToNow

      public static int nVRInput_GetPoseActionDataRelativeToNow(long action, int eOrigin, float fPredictedSecondsFromNow, long pActionData, int unActionDataSize, long ulRestrictToDevice)
    • VRInput_GetPoseActionDataRelativeToNow

      public static int VRInput_GetPoseActionDataRelativeToNow(long action, int eOrigin, float fPredictedSecondsFromNow, InputPoseActionData pActionData, int unActionDataSize, long ulRestrictToDevice)
      Reads the state of a pose action given its handle for the number of seconds relative to now.

      This will generally be called with negative times from the fUpdateTime fields in other actions.

      Parameters:
      eOrigin - one of:
      VR.ETrackingUniverseOrigin_TrackingUniverseSeated
      VR.ETrackingUniverseOrigin_TrackingUniverseStanding
      VR.ETrackingUniverseOrigin_TrackingUniverseRawAndUncalibrated
    • VRInput_GetPoseActionDataRelativeToNow

      public static int VRInput_GetPoseActionDataRelativeToNow(long action, int eOrigin, float fPredictedSecondsFromNow, InputPoseActionData pActionData, long ulRestrictToDevice)
      Reads the state of a pose action given its handle for the number of seconds relative to now.

      This will generally be called with negative times from the fUpdateTime fields in other actions.

      Parameters:
      eOrigin - one of:
      VR.ETrackingUniverseOrigin_TrackingUniverseSeated
      VR.ETrackingUniverseOrigin_TrackingUniverseStanding
      VR.ETrackingUniverseOrigin_TrackingUniverseRawAndUncalibrated
    • nVRInput_GetPoseActionDataForNextFrame

      public static int nVRInput_GetPoseActionDataForNextFrame(long action, int eOrigin, long pActionData, int unActionDataSize, long ulRestrictToDevice)
    • VRInput_GetPoseActionDataForNextFrame

      public static int VRInput_GetPoseActionDataForNextFrame(long action, int eOrigin, InputPoseActionData pActionData, int unActionDataSize, long ulRestrictToDevice)
      Reads the state of a pose action given its handle.

      The returned values will match the values returned by the last call to WaitGetPoses.

      Parameters:
      eOrigin - one of:
      VR.ETrackingUniverseOrigin_TrackingUniverseSeated
      VR.ETrackingUniverseOrigin_TrackingUniverseStanding
      VR.ETrackingUniverseOrigin_TrackingUniverseRawAndUncalibrated
    • VRInput_GetPoseActionDataForNextFrame

      public static int VRInput_GetPoseActionDataForNextFrame(long action, int eOrigin, InputPoseActionData pActionData, long ulRestrictToDevice)
      Reads the state of a pose action given its handle.

      The returned values will match the values returned by the last call to WaitGetPoses.

      Parameters:
      eOrigin - one of:
      VR.ETrackingUniverseOrigin_TrackingUniverseSeated
      VR.ETrackingUniverseOrigin_TrackingUniverseStanding
      VR.ETrackingUniverseOrigin_TrackingUniverseRawAndUncalibrated
    • nVRInput_GetSkeletalActionData

      public static int nVRInput_GetSkeletalActionData(long action, long pActionData, int unActionDataSize)
      Unsafe version of: GetSkeletalActionData
    • VRInput_GetSkeletalActionData

      public static int VRInput_GetSkeletalActionData(long action, InputSkeletalActionData pActionData, int unActionDataSize)
      Reads the state of a skeletal action given its handle.
    • VRInput_GetSkeletalActionData

      public static int VRInput_GetSkeletalActionData(long action, InputSkeletalActionData pActionData)
      Reads the state of a skeletal action given its handle.
    • nVRInput_GetDominantHand

      public static int nVRInput_GetDominantHand(long peDominantHand)
      Unsafe version of: GetDominantHand
    • VRInput_GetDominantHand

      public static int VRInput_GetDominantHand(IntBuffer peDominantHand)
      Returns the current dominant hand for the user for this application.

      This function will only return success for applications which include "supports_dominant_hand_setting": true in their action manifests. The dominant hand will only change after a call to UpdateActionState, and the action data returned after that point will use the new dominant hand.

    • VRInput_SetDominantHand

      public static int VRInput_SetDominantHand(int eDominantHand)
      Sets the dominant hand for the user for this application.
      Parameters:
      eDominantHand - one of:
      VR.ETrackedControllerRole_TrackedControllerRole_Invalid
      VR.ETrackedControllerRole_TrackedControllerRole_LeftHand
      VR.ETrackedControllerRole_TrackedControllerRole_RightHand
      VR.ETrackedControllerRole_TrackedControllerRole_OptOut
      VR.ETrackedControllerRole_TrackedControllerRole_Treadmill
      VR.ETrackedControllerRole_TrackedControllerRole_Stylus
      VR.ETrackedControllerRole_TrackedControllerRole_Max
    • nVRInput_GetBoneCount

      public static int nVRInput_GetBoneCount(long action, long pBoneCount)
      Unsafe version of: GetBoneCount
    • VRInput_GetBoneCount

      public static int VRInput_GetBoneCount(long action, IntBuffer pBoneCount)
      Reads the number of bones in skeleton associated with the given action.
    • nVRInput_GetBoneHierarchy

      public static int nVRInput_GetBoneHierarchy(long action, long pParentIndices, int unIndexArrayCount)
      Unsafe version of: GetBoneHierarchy
    • VRInput_GetBoneHierarchy

      public static int VRInput_GetBoneHierarchy(long action, IntBuffer pParentIndices)
      Fills the given array with the index of each bone's parent in the skeleton associated with the given action.
    • nVRInput_GetBoneName

      public static int nVRInput_GetBoneName(long action, int nBoneIndex, long pchBoneName, int unNameBufferSize)
      Unsafe version of: GetBoneName
    • VRInput_GetBoneName

      public static int VRInput_GetBoneName(long action, int nBoneIndex, ByteBuffer pchBoneName)
      Fills the given buffer with the name of the bone at the given index in the skeleton associated with the given action.
    • nVRInput_GetSkeletalReferenceTransforms

      public static int nVRInput_GetSkeletalReferenceTransforms(long action, int eTransformSpace, int eReferencePose, long pTransformArray, int unTransformArrayCount)
    • VRInput_GetSkeletalReferenceTransforms

      public static int VRInput_GetSkeletalReferenceTransforms(long action, int eTransformSpace, int eReferencePose, VRBoneTransform.Buffer pTransformArray)
      Fills the given buffer with the transforms for a specific static skeletal reference pose.
      Parameters:
      eTransformSpace - one of:
      VR.EVRSkeletalTransformSpace_VRSkeletalTransformSpace_Model
      VR.EVRSkeletalTransformSpace_VRSkeletalTransformSpace_Parent
      eReferencePose - one of:
      VR.EVRSkeletalReferencePose_VRSkeletalReferencePose_BindPose
      VR.EVRSkeletalReferencePose_VRSkeletalReferencePose_OpenHand
      VR.EVRSkeletalReferencePose_VRSkeletalReferencePose_Fist
      VR.EVRSkeletalReferencePose_VRSkeletalReferencePose_GripLimit
    • nVRInput_GetSkeletalTrackingLevel

      public static int nVRInput_GetSkeletalTrackingLevel(long action, long pSkeletalTrackingLevel)
      Unsafe version of: GetSkeletalTrackingLevel
    • VRInput_GetSkeletalTrackingLevel

      public static int VRInput_GetSkeletalTrackingLevel(long action, IntBuffer pSkeletalTrackingLevel)
      Reads the level of accuracy to which the controller is able to track the user to recreate a skeletal pose.
    • nVRInput_GetSkeletalBoneData

      public static int nVRInput_GetSkeletalBoneData(long action, int eTransformSpace, int eMotionRange, long pTransformArray, int unTransformArrayCount)
      Unsafe version of: GetSkeletalBoneData
    • VRInput_GetSkeletalBoneData

      public static int VRInput_GetSkeletalBoneData(long action, int eTransformSpace, int eMotionRange, VRBoneTransform.Buffer pTransformArray)
      Reads the state of the skeletal bone data associated with this action and copies it into the given buffer.
      Parameters:
      eTransformSpace - one of:
      VR.EVRSkeletalTransformSpace_VRSkeletalTransformSpace_Model
      VR.EVRSkeletalTransformSpace_VRSkeletalTransformSpace_Parent
      eMotionRange - one of:
      VR.EVRSkeletalMotionRange_VRSkeletalMotionRange_WithController
      VR.EVRSkeletalMotionRange_VRSkeletalMotionRange_WithoutController
    • nVRInput_GetSkeletalSummaryData

      public static int nVRInput_GetSkeletalSummaryData(long action, int eSummaryType, long pSkeletalSummaryData)
      Unsafe version of: GetSkeletalSummaryData
    • VRInput_GetSkeletalSummaryData

      public static int VRInput_GetSkeletalSummaryData(long action, int eSummaryType, VRSkeletalSummaryData pSkeletalSummaryData)
      Reads summary information about the current pose of the skeleton associated with the given action.
    • nVRInput_GetSkeletalBoneDataCompressed

      public static int nVRInput_GetSkeletalBoneDataCompressed(long action, int eMotionRange, long pvCompressedData, int unCompressedSize, long punRequiredCompressedSize)
    • VRInput_GetSkeletalBoneDataCompressed

      public static int VRInput_GetSkeletalBoneDataCompressed(long action, int eMotionRange, @Nullable ByteBuffer pvCompressedData, @Nullable IntBuffer punRequiredCompressedSize)
      Reads the state of the skeletal bone data in a compressed form that is suitable for sending over the network. The required buffer size will never exceed (sizeof(VR_BoneTransform_t)*boneCount + 2). Usually the size will be much smaller.
      Parameters:
      eMotionRange - one of:
      VR.EVRSkeletalMotionRange_VRSkeletalMotionRange_WithController
      VR.EVRSkeletalMotionRange_VRSkeletalMotionRange_WithoutController
    • nVRInput_DecompressSkeletalBoneData

      public static int nVRInput_DecompressSkeletalBoneData(long pvCompressedBuffer, int unCompressedBufferSize, int eTransformSpace, long pTransformArray, int unTransformArrayCount)
      Unsafe version of: DecompressSkeletalBoneData
    • VRInput_DecompressSkeletalBoneData

      public static int VRInput_DecompressSkeletalBoneData(ByteBuffer pvCompressedBuffer, int eTransformSpace, VRBoneTransform.Buffer pTransformArray)
      Turns a compressed buffer from GetSkeletalBoneDataCompressed and turns it back into a bone transform array.
      Parameters:
      eTransformSpace - one of:
      VR.EVRSkeletalTransformSpace_VRSkeletalTransformSpace_Model
      VR.EVRSkeletalTransformSpace_VRSkeletalTransformSpace_Parent
    • VRInput_TriggerHapticVibrationAction

      public static int VRInput_TriggerHapticVibrationAction(long action, float fStartSecondsFromNow, float fDurationSeconds, float fFrequency, float fAmplitude, long ulRestrictToDevice)
      Triggers a haptic event as described by the specified action.
    • nVRInput_GetActionOrigins

      public static int nVRInput_GetActionOrigins(long actionSetHandle, long digitalActionHandle, long originsOut, int originOutCount)
      Unsafe version of: GetActionOrigins
    • VRInput_GetActionOrigins

      public static int VRInput_GetActionOrigins(long actionSetHandle, long digitalActionHandle, LongBuffer originsOut)
      Retrieve origin handles for an action.
    • nVRInput_GetOriginLocalizedName

      public static int nVRInput_GetOriginLocalizedName(long origin, long pchNameArray, int unNameArraySize, int unStringSectionsToInclude)
      Unsafe version of: GetOriginLocalizedName
    • VRInput_GetOriginLocalizedName

      public static int VRInput_GetOriginLocalizedName(long origin, ByteBuffer pchNameArray, int unStringSectionsToInclude)
      Retrieves the name of the origin in the current language.
      Parameters:
      unStringSectionsToInclude - a bitfield of values in EVRInputStringBits that allows the application to specify which parts of the origin's information it wants a string for. One or more of:
      VR.EVRInputStringBits_VRInputString_Hand
      VR.EVRInputStringBits_VRInputString_ControllerType
      VR.EVRInputStringBits_VRInputString_InputSource
      VR.EVRInputStringBits_VRInputString_All
    • nVRInput_GetOriginTrackedDeviceInfo

      public static int nVRInput_GetOriginTrackedDeviceInfo(long origin, long pOriginInfo, int unOriginInfoSize)
      Unsafe version of: GetOriginTrackedDeviceInfo
    • VRInput_GetOriginTrackedDeviceInfo

      public static int VRInput_GetOriginTrackedDeviceInfo(long origin, InputOriginInfo pOriginInfo, int unOriginInfoSize)
      Retrieves useful information for the origin of this action.
    • VRInput_GetOriginTrackedDeviceInfo

      public static int VRInput_GetOriginTrackedDeviceInfo(long origin, InputOriginInfo pOriginInfo)
      Retrieves useful information for the origin of this action.
    • nVRInput_GetActionBindingInfo

      public static int nVRInput_GetActionBindingInfo(long action, long pOriginInfo, int unBindingInfoSize, int unBindingInfoCount, long punReturnedBindingInfoCount)
      Unsafe version of: GetActionBindingInfo
    • VRInput_GetActionBindingInfo

      public static int VRInput_GetActionBindingInfo(long action, InputBindingInfo.Buffer pOriginInfo, IntBuffer punReturnedBindingInfoCount)
      Retrieves useful information about the bindings for an action.
    • VRInput_ShowActionOrigins

      public static int VRInput_ShowActionOrigins(long actionSetHandle, long ulActionHandle)
      Shows the current binding for the action in-headset.
    • nVRInput_ShowBindingsForActionSet

      public static int nVRInput_ShowBindingsForActionSet(long pSets, int unSizeOfVRSelectedActionSet_t, int unSetCount, long originToHighlight)
      Unsafe version of: ShowBindingsForActionSet
    • VRInput_ShowBindingsForActionSet

      public static int VRInput_ShowBindingsForActionSet(VRActiveActionSet.Buffer pSets, int unSizeOfVRSelectedActionSet_t, long originToHighlight)
      Shows the current binding all the actions in the specified action sets.
    • nVRInput_GetComponentStateForBinding

      public static int nVRInput_GetComponentStateForBinding(long pchRenderModelName, long pchComponentName, long pOriginInfo, int unBindingInfoSize, int unBindingInfoCount, long pComponentState)
      Unsafe version of: GetComponentStateForBinding
    • VRInput_GetComponentStateForBinding

      public static int VRInput_GetComponentStateForBinding(ByteBuffer pchRenderModelName, ByteBuffer pchComponentName, InputBindingInfo.Buffer pOriginInfo, RenderModelComponentState.Buffer pComponentState)
      Use this to query what action on the component returned by GetOriginTrackedDeviceInfo would trigger this binding.
    • VRInput_GetComponentStateForBinding

      public static int VRInput_GetComponentStateForBinding(CharSequence pchRenderModelName, CharSequence pchComponentName, InputBindingInfo.Buffer pOriginInfo, RenderModelComponentState.Buffer pComponentState)
      Use this to query what action on the component returned by GetOriginTrackedDeviceInfo would trigger this binding.
    • nVRInput_OpenBindingUI

      public static int nVRInput_OpenBindingUI(long pchAppKey, long ulActionSetHandle, long ulDeviceHandle, boolean bShowOnDesktop)
      Unsafe version of: OpenBindingUI
    • VRInput_OpenBindingUI

      public static int VRInput_OpenBindingUI(ByteBuffer pchAppKey, long ulActionSetHandle, long ulDeviceHandle, boolean bShowOnDesktop)
      Opens the binding user interface.

      If no app key is provided it will use the key from the calling process. If no set is provided it will open to the root of the app binding page.

    • VRInput_OpenBindingUI

      public static int VRInput_OpenBindingUI(CharSequence pchAppKey, long ulActionSetHandle, long ulDeviceHandle, boolean bShowOnDesktop)
      Opens the binding user interface.

      If no app key is provided it will use the key from the calling process. If no set is provided it will open to the root of the app binding page.

    • nVRInput_GetBindingVariant

      public static int nVRInput_GetBindingVariant(long ulDevicePath, long pchVariantArray, int unVariantArraySize)
      Unsafe version of: GetBindingVariant
    • VRInput_GetBindingVariant

      public static int VRInput_GetBindingVariant(long ulDevicePath, ByteBuffer pchVariantArray)
      Returns the variant set in the current bindings. If the binding doesn't include a variant setting, this function will return an empty string.