Class VRSystem
- java.lang.Object
-
- org.lwjgl.openvr.VRSystem
-
public class VRSystem extends java.lang.ObjectMain interface for display, distortion, tracking, controller, and event access.The
IVRSysteminterface provides access to display configuration information, tracking data, distortion functions, controller state, events, and device properties. It is the main interface of OpenVR and can be initialized and retrieved with theInitInternalfunction.Many functions in
IVRSystemuse a tracked device index to identify a specific device attached to the computer. There will never be more thanVR.k_unMaxTrackedDeviceCountdevices active in the system at any given time. Their indices will be 0 (for the HMD) and 1-15 for the other devices.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidnVRSystem_ApplyTransform(long pOutputPose, long pTrackedDevicePose, long pTransform)Unsafe version of:ApplyTransformstatic booleannVRSystem_ComputeDistortion(int eEye, float fU, float fV, long pDistortionCoordinates)Unsafe version of:ComputeDistortionstatic intnVRSystem_GetAppContainerFilePaths(long pchBuffer, int unBufferSize)Unsafe version of:GetAppContainerFilePathsstatic intnVRSystem_GetArrayTrackedDeviceProperty(int unDeviceIndex, int prop, int propType, long pBuffer, int unBufferSize, long pError)Unsafe version of:GetArrayTrackedDevicePropertystatic booleannVRSystem_GetBoolTrackedDeviceProperty(int unDeviceIndex, int prop, long pError)Unsafe version of:GetBoolTrackedDevicePropertystatic longnVRSystem_GetButtonIdNameFromEnum(int eButtonId)Unsafe version of:GetButtonIdNameFromEnumstatic longnVRSystem_GetControllerAxisTypeNameFromEnum(int eAxisType)Unsafe version of:GetControllerAxisTypeNameFromEnumstatic booleannVRSystem_GetControllerState(int unControllerDeviceIndex, long pControllerState, int unControllerStateSize)Unsafe version of:GetControllerStatestatic booleannVRSystem_GetControllerStateWithPose(int eOrigin, int unControllerDeviceIndex, long pControllerState, int unControllerStateSize, long pTrackedDevicePose)Unsafe version of:GetControllerStateWithPosestatic voidnVRSystem_GetDeviceToAbsoluteTrackingPose(int eOrigin, float fPredictedSecondsToPhotonsFromNow, long pTrackedDevicePoseArray, int unTrackedDevicePoseArrayCount)Unsafe version of:GetDeviceToAbsoluteTrackingPosestatic voidnVRSystem_GetDXGIOutputInfo(long pnAdapterIndex)Unsafe version of:GetDXGIOutputInfostatic longnVRSystem_GetEventTypeNameFromEnum(int eType)Unsafe version of:GetEventTypeNameFromEnumstatic voidnVRSystem_GetEyeToHeadTransform(int eEye, long __result)Unsafe version of:GetEyeToHeadTransformstatic voidnVRSystem_GetEyeToHeadTransform(int eEye, long __functionAddress, long __result)Unsafe version of:GetEyeToHeadTransformstatic floatnVRSystem_GetFloatTrackedDeviceProperty(int unDeviceIndex, int prop, long pError)Unsafe version of:GetFloatTrackedDevicePropertystatic voidnVRSystem_GetHiddenAreaMesh(int eEye, int type, long __result)Unsafe version of:GetHiddenAreaMeshstatic voidnVRSystem_GetHiddenAreaMesh(int eEye, int type, long __functionAddress, long __result)Unsafe version of:GetHiddenAreaMeshstatic intnVRSystem_GetInt32TrackedDeviceProperty(int unDeviceIndex, int prop, long pError)Unsafe version of:GetInt32TrackedDevicePropertystatic voidnVRSystem_GetMatrix34TrackedDeviceProperty(int unDeviceIndex, int prop, long pError, long __result)Unsafe version of:GetMatrix34TrackedDevicePropertystatic voidnVRSystem_GetMatrix34TrackedDeviceProperty(int unDeviceIndex, int prop, long pError, long __functionAddress, long __result)Unsafe version of:GetMatrix34TrackedDevicePropertystatic voidnVRSystem_GetOutputDevice(long pnDevice, int textureType, long pInstance)Unsafe version of:GetOutputDevicestatic voidnVRSystem_GetProjectionMatrix(int eEye, float fNearZ, float fFarZ, long __result)Unsafe version of:GetProjectionMatrixstatic voidnVRSystem_GetProjectionMatrix(int eEye, float fNearZ, float fFarZ, long __functionAddress, long __result)Unsafe version of:GetProjectionMatrixstatic voidnVRSystem_GetProjectionRaw(int eEye, long pfLeft, long pfRight, long pfTop, long pfBottom)Unsafe version of:GetProjectionRawstatic longnVRSystem_GetPropErrorNameFromEnum(int error)Unsafe version of:GetPropErrorNameFromEnumstatic voidnVRSystem_GetRawZeroPoseToStandingAbsoluteTrackingPose(long __result)Unsafe version of:GetRawZeroPoseToStandingAbsoluteTrackingPosestatic voidnVRSystem_GetRawZeroPoseToStandingAbsoluteTrackingPose(long __functionAddress, long __result)Unsafe version of:GetRawZeroPoseToStandingAbsoluteTrackingPosestatic voidnVRSystem_GetRecommendedRenderTargetSize(long pnWidth, long pnHeight)Unsafe version of:GetRecommendedRenderTargetSizestatic voidnVRSystem_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(long __result)Unsafe version of:GetSeatedZeroPoseToStandingAbsoluteTrackingPosestatic voidnVRSystem_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(long __functionAddress, long __result)Unsafe version of:GetSeatedZeroPoseToStandingAbsoluteTrackingPosestatic intnVRSystem_GetSortedTrackedDeviceIndicesOfClass(int eTrackedDeviceClass, long punTrackedDeviceIndexArray, int unTrackedDeviceIndexArrayCount, int unRelativeToTrackedDeviceIndex)Unsafe version of:GetSortedTrackedDeviceIndicesOfClassstatic intnVRSystem_GetStringTrackedDeviceProperty(int unDeviceIndex, int prop, long pchValue, int unBufferSize, long pError)Unsafe version of:GetStringTrackedDevicePropertystatic booleannVRSystem_GetTimeSinceLastVsync(long pfSecondsSinceLastVsync, long pulFrameCounter)Unsafe version of:GetTimeSinceLastVsyncstatic longnVRSystem_GetUint64TrackedDeviceProperty(int unDeviceIndex, int prop, long pError)Unsafe version of:GetUint64TrackedDevicePropertystatic booleannVRSystem_PollNextEvent(long pEvent, int uncbVREvent)Unsafe version of:PollNextEventstatic booleannVRSystem_PollNextEventWithPose(int eOrigin, long pEvent, int uncbVREvent, long pTrackedDevicePose)Unsafe version of:PollNextEventWithPosestatic voidVRSystem_AcknowledgeQuit_Exiting()Call this to acknowledge to the system thatVR.EVREventType_VREvent_Quithas been received and that the process is exiting.static voidVRSystem_AcknowledgeQuit_UserPrompt()Call this to tell the system that the user is being prompted to save data.static voidVRSystem_ApplyTransform(TrackedDevicePose pOutputPose, TrackedDevicePose pTrackedDevicePose, HmdMatrix34 pTransform)Convenience utility to apply the specified transform to the specified pose.static booleanVRSystem_ComputeDistortion(int eEye, float fU, float fV, DistortionCoordinates pDistortionCoordinates)Gets the result of the distortion function for the specified eye and input UVs.static java.lang.StringVRSystem_GetAppContainerFilePaths(int unBufferSize)Retrieves a null-terminated, semicolon-delimited list of UTF8 file paths that an application must have read access to when running inside of an app container.static intVRSystem_GetAppContainerFilePaths(java.nio.ByteBuffer pchBuffer)Retrieves a null-terminated, semicolon-delimited list of UTF8 file paths that an application must have read access to when running inside of an app container.static intVRSystem_GetArrayTrackedDeviceProperty(int unDeviceIndex, int prop, int propType, java.nio.ByteBuffer pBuffer, java.nio.IntBuffer pError)Returns an array of one type of property.static booleanVRSystem_GetBoolTrackedDeviceProperty(int unDeviceIndex, int prop, java.nio.IntBuffer pError)Returns a bool property.static java.lang.StringVRSystem_GetButtonIdNameFromEnum(int eButtonId)Returns the name of anEVRButtonIdenum value.static java.lang.StringVRSystem_GetControllerAxisTypeNameFromEnum(int eAxisType)Returns the name of anEVRControllerAxisTypeenum value.static intVRSystem_GetControllerRoleForTrackedDeviceIndex(int unDeviceIndex)Returns the controller type associated with a device index.static booleanVRSystem_GetControllerState(int unControllerDeviceIndex, VRControllerState pControllerState)Fills the supplied struct with the current state of the controller.static booleanVRSystem_GetControllerState(int unControllerDeviceIndex, VRControllerState pControllerState, int unControllerStateSize)Fills the supplied struct with the current state of the controller.static booleanVRSystem_GetControllerStateWithPose(int eOrigin, int unControllerDeviceIndex, VRControllerState pControllerState, int unControllerStateSize, TrackedDevicePose pTrackedDevicePose)Fills the supplied struct with the current state of the controller and the provided pose with the pose of the controller when the controller state was updated most recently.static booleanVRSystem_GetControllerStateWithPose(int eOrigin, int unControllerDeviceIndex, VRControllerState pControllerState, TrackedDevicePose pTrackedDevicePose)Fills the supplied struct with the current state of the controller and the provided pose with the pose of the controller when the controller state was updated most recently.static intVRSystem_GetD3D9AdapterIndex()D3D9 Onlystatic voidVRSystem_GetDeviceToAbsoluteTrackingPose(int eOrigin, float fPredictedSecondsToPhotonsFromNow, TrackedDevicePose.Buffer pTrackedDevicePoseArray)The pose that the tracker thinks that the HMD will be in at the specified number of seconds into the future.static voidVRSystem_GetDXGIOutputInfo(java.nio.IntBuffer pnAdapterIndex)D3D10/11 Onlystatic java.lang.StringVRSystem_GetEventTypeNameFromEnum(int eType)Returns the name of anEVREventenum value.static HmdMatrix34VRSystem_GetEyeToHeadTransform(int eEye, HmdMatrix34 __result)Returns the transform from eye space to the head space.static floatVRSystem_GetFloatTrackedDeviceProperty(int unDeviceIndex, int prop, java.nio.IntBuffer pError)Returns a float property.static HiddenAreaMeshVRSystem_GetHiddenAreaMesh(int eEye, int type, HiddenAreaMesh __result)Returns the hidden area mesh for the current HMD.static intVRSystem_GetInt32TrackedDeviceProperty(int unDeviceIndex, int prop, java.nio.IntBuffer pError)Returns an int property.static HmdMatrix34VRSystem_GetMatrix34TrackedDeviceProperty(int unDeviceIndex, int prop, java.nio.IntBuffer pError, HmdMatrix34 __result)Returns a matrix property.static voidVRSystem_GetOutputDevice(java.nio.LongBuffer pnDevice, int textureType, long pInstance)Returns platform- and texture-type specific adapter identification so that applications and the compositor are creating textures and swap chains on the same GPU.static HmdMatrix44VRSystem_GetProjectionMatrix(int eEye, float fNearZ, float fFarZ, HmdMatrix44 __result)Returns the projection matrix for the specified eye.static voidVRSystem_GetProjectionRaw(int eEye, java.nio.FloatBuffer pfLeft, java.nio.FloatBuffer pfRight, java.nio.FloatBuffer pfTop, java.nio.FloatBuffer pfBottom)Returns the components necessary to build your own projection matrix in case your application is doing something fancy like infinite Z.static java.lang.StringVRSystem_GetPropErrorNameFromEnum(int error)Returns a string that corresponds with the specified property error.static HmdMatrix34VRSystem_GetRawZeroPoseToStandingAbsoluteTrackingPose(HmdMatrix34 __result)Returns the transform from the tracking origin to the standing absolute tracking system.static voidVRSystem_GetRecommendedRenderTargetSize(java.nio.IntBuffer pnWidth, java.nio.IntBuffer pnHeight)Returns the suggested size for the intermediate render target that the distortion pulls from.static HmdMatrix34VRSystem_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(HmdMatrix34 __result)Returns the transform from the seated zero pose to the standing absolute tracking system.static intVRSystem_GetSortedTrackedDeviceIndicesOfClass(int eTrackedDeviceClass, java.nio.IntBuffer punTrackedDeviceIndexArray, int unRelativeToTrackedDeviceIndex)Get a sorted array of device indices of a given class of tracked devices (e.g.static java.lang.StringVRSystem_GetStringTrackedDeviceProperty(int unDeviceIndex, int prop, int unBufferSize, java.nio.IntBuffer pError)Returns a string property.static intVRSystem_GetStringTrackedDeviceProperty(int unDeviceIndex, int prop, java.nio.ByteBuffer pchValue, java.nio.IntBuffer pError)Returns a string property.static java.lang.StringVRSystem_GetStringTrackedDeviceProperty(int unDeviceIndex, int prop, java.nio.IntBuffer pError)Returns a string property.static booleanVRSystem_GetTimeSinceLastVsync(java.nio.FloatBuffer pfSecondsSinceLastVsync, java.nio.LongBuffer pulFrameCounter)Returns the number of elapsed seconds since the last recorded vsync event.static intVRSystem_GetTrackedDeviceActivityLevel(int unDeviceId)Returns the level of activity on the device.static intVRSystem_GetTrackedDeviceClass(int unDeviceIndex)Returns the device class of a tracked device.static intVRSystem_GetTrackedDeviceIndexForControllerRole(int unDeviceType)Returns the device index associated with a specific role, for example the left hand or the right hand.static longVRSystem_GetUint64TrackedDeviceProperty(int unDeviceIndex, int prop, java.nio.IntBuffer pError)Returns a uint64 property.static booleanVRSystem_IsDisplayOnDesktop()Use to determine if the headset display is part of the desktop (i.e.static booleanVRSystem_IsInputAvailable()Returns true if this application is receiving input from the system.static booleanVRSystem_IsSteamVRDrawingControllers()Returns true if SteamVR is drawing controllers on top of the application.static booleanVRSystem_IsTrackedDeviceConnected(int unDeviceIndex)Returns true if there is a device connected in this slot.static intVRSystem_PerformFirmwareUpdate(int unDeviceIndex)Performs the actual firmware update if applicable.static booleanVRSystem_PollNextEvent(VREvent pEvent)Returns true and fills the event with the next event on the queue if there is one.static booleanVRSystem_PollNextEvent(VREvent pEvent, int uncbVREvent)Returns true and fills the event with the next event on the queue if there is one.static booleanVRSystem_PollNextEventWithPose(int eOrigin, VREvent pEvent, int uncbVREvent, TrackedDevicePose pTrackedDevicePose)Returns true and fills the event with the next event on the queue if there is one.static booleanVRSystem_PollNextEventWithPose(int eOrigin, VREvent pEvent, TrackedDevicePose pTrackedDevicePose)Returns true and fills the event with the next event on the queue if there is one.static voidVRSystem_ResetSeatedZeroPose()Sets the zero pose for the seated tracker coordinate system to the current position and yaw of the HMD.static booleanVRSystem_SetDisplayVisibility(boolean bIsVisibleOnDesktop)Sets the display visibility (true = extended, false = direct mode).static booleanVRSystem_ShouldApplicationPause()Returns true if the user has put SteamVR into a mode that is distracting them from the application.static booleanVRSystem_ShouldApplicationReduceRenderingWork()Returns true if SteamVR is doing significant rendering work and the game should do what it can to reduce its own workload.static voidVRSystem_TriggerHapticPulse(int unControllerDeviceIndex, int unAxisId, short usDurationMicroSec)Trigger a single haptic pulse on a controller.
-
-
-
Method Detail
-
nVRSystem_GetRecommendedRenderTargetSize
public static void nVRSystem_GetRecommendedRenderTargetSize(long pnWidth, long pnHeight)Unsafe version of:GetRecommendedRenderTargetSize
-
VRSystem_GetRecommendedRenderTargetSize
public static void VRSystem_GetRecommendedRenderTargetSize(java.nio.IntBuffer pnWidth, java.nio.IntBuffer pnHeight)Returns the suggested size for the intermediate render target that the distortion pulls from.- Parameters:
pnWidth- recommended width for the offscreen render targetpnHeight- recommended height for the offscreen render target
-
nVRSystem_GetProjectionMatrix
public static void nVRSystem_GetProjectionMatrix(int eEye, float fNearZ, float fFarZ, long __functionAddress, long __result) public static void nVRSystem_GetProjectionMatrix(int eEye, float fNearZ, float fFarZ, long __result)Unsafe version of:GetProjectionMatrix
-
VRSystem_GetProjectionMatrix
public static HmdMatrix44 VRSystem_GetProjectionMatrix(int eEye, float fNearZ, float fFarZ, HmdMatrix44 __result)
Returns the projection matrix for the specified eye.- Parameters:
eEye- determines which eye the function should return the projection for. One of:VR.EVREye_Eye_LeftVR.EVREye_Eye_RightfNearZ- distance to the near clip plane in metersfFarZ- distance to the far clip plane in meters
-
nVRSystem_GetProjectionRaw
public static void nVRSystem_GetProjectionRaw(int eEye, long pfLeft, long pfRight, long pfTop, long pfBottom)Unsafe version of:GetProjectionRaw
-
VRSystem_GetProjectionRaw
public static void VRSystem_GetProjectionRaw(int eEye, java.nio.FloatBuffer pfLeft, java.nio.FloatBuffer pfRight, java.nio.FloatBuffer pfTop, java.nio.FloatBuffer pfBottom)Returns the components necessary to build your own projection matrix in case your application is doing something fancy like infinite Z.- Parameters:
eEye- determines which eye the function should return the projection for. One of:VR.EVREye_Eye_LeftVR.EVREye_Eye_RightpfLeft- coordinate for the left clipping planepfRight- coordinate for the right clipping planepfTop- coordinate for the top clipping planepfBottom- coordinate for the bottom clipping plane
-
nVRSystem_ComputeDistortion
public static boolean nVRSystem_ComputeDistortion(int eEye, float fU, float fV, long pDistortionCoordinates)Unsafe version of:ComputeDistortion
-
VRSystem_ComputeDistortion
public static boolean VRSystem_ComputeDistortion(int eEye, float fU, float fV, DistortionCoordinates pDistortionCoordinates)Gets the result of the distortion function for the specified eye and input UVs. UVs go from 0,0 in the upper left of that eye's viewport and 1,1 in the lower right of that eye's viewport.- Parameters:
eEye- determines which eye the function should return the distortion value for. One of:VR.EVREye_Eye_LeftVR.EVREye_Eye_RightfU- horizontal texture coordinate for the output pixel within the viewportfV- vertical texture coordinate for the output pixel within the viewportpDistortionCoordinates- a struct in which to return the distortion coordinates- Returns:
- true for success. Otherwise, returns false, and distortion coordinates are not suitable.
-
nVRSystem_GetEyeToHeadTransform
public static void nVRSystem_GetEyeToHeadTransform(int eEye, long __functionAddress, long __result) public static void nVRSystem_GetEyeToHeadTransform(int eEye, long __result)Unsafe version of:GetEyeToHeadTransform
-
VRSystem_GetEyeToHeadTransform
public static HmdMatrix34 VRSystem_GetEyeToHeadTransform(int eEye, HmdMatrix34 __result)
Returns the transform from eye space to the head space. Eye space is the per-eye flavor of head space that provides stereo disparity. Instead ofModel * View * Projectionthe sequence isModel * View * Eye^-1 * Projection. NormallyViewandEye^-1will be multiplied together and treated asViewin your application.- Parameters:
eEye- determines which eye the function should return the eye matrix for. One of:VR.EVREye_Eye_LeftVR.EVREye_Eye_Right
-
nVRSystem_GetTimeSinceLastVsync
public static boolean nVRSystem_GetTimeSinceLastVsync(long pfSecondsSinceLastVsync, long pulFrameCounter)Unsafe version of:GetTimeSinceLastVsync
-
VRSystem_GetTimeSinceLastVsync
public static boolean VRSystem_GetTimeSinceLastVsync(java.nio.FloatBuffer pfSecondsSinceLastVsync, java.nio.LongBuffer pulFrameCounter)Returns the number of elapsed seconds since the last recorded vsync event. This will come from a vsync timer event in the timer if possible or from the application-reported time if that is not available.- Parameters:
pfSecondsSinceLastVsync- fractional number of seconds since the last vsync event. This will never exceed the length of a single frame.pulFrameCounter- the number of frames since vrserver.exe started- Returns:
- if no vsync times are available the function will return zero for vsync time and frame counter and return false from the method
-
VRSystem_GetD3D9AdapterIndex
public static int VRSystem_GetD3D9AdapterIndex()
D3D9 Only
Returns the adapter index that the user should pass into
CreateDeviceto set up D3D9 in such a way that it can go full screen exclusive on the HMD.- Returns:
- -1 if there was an error
-
nVRSystem_GetDXGIOutputInfo
public static void nVRSystem_GetDXGIOutputInfo(long pnAdapterIndex)
Unsafe version of:GetDXGIOutputInfo
-
VRSystem_GetDXGIOutputInfo
public static void VRSystem_GetDXGIOutputInfo(java.nio.IntBuffer pnAdapterIndex)
D3D10/11 Only
Returns the adapter index that the user should pass into
EnumAdaptersto create the device and swap chain in DX10 and DX11. If an error occurs the index will be set to -1.- Parameters:
pnAdapterIndex- the index of the adapter to use for this display
-
nVRSystem_GetOutputDevice
public static void nVRSystem_GetOutputDevice(long pnDevice, int textureType, long pInstance)Unsafe version of:GetOutputDevice
-
VRSystem_GetOutputDevice
public static void VRSystem_GetOutputDevice(java.nio.LongBuffer pnDevice, int textureType, long pInstance)Returns platform- and texture-type specific adapter identification so that applications and the compositor are creating textures and swap chains on the same GPU. If an error occurs the device will be set to 0.D3D10/11/12 Only (D3D9 Not Supported)
Returns the adapter LUID that identifies the GPU attached to the HMD. The user should enumerate all adapters using
IDXGIFactory::EnumAdaptersandIDXGIAdapter::GetDescto find the adapter with the matching LUID, or useIDXGIFactory4::EnumAdapterByLuid. The discoveredIDXGIAdaptershould be used to create the device and swap chain.Vulkan Only
Returns the
VkPhysicalDevicethat should be used by the application.pInstancemust be the instance the application will use to query for theVkPhysicalDevice. The application must create theVkInstancewith extensions returned byGetVulkanInstanceExtensionsRequiredenabled.macOS Only
For
VR.ETextureType_TextureType_IOSurfacereturns theid<MTLDevice>that should be used by the application.On 10.13+ for
VR.ETextureType_TextureType_OpenGLreturns theregistryIdof the renderer which should be used by the application. See Apple Technical Q&A QA1168 for information on enumerating GL Renderers, and the newkCGLRPRegistryIDLowandkCGLRPRegistryIDHighCGLRendererPropertyvalues in the 10.13 SDK.Pre 10.13 for
VR.ETextureType_TextureType_OpenGLreturns 0, as there is no dependable way to correlate the HMDsMTLDevicewith a GL Renderer.- Parameters:
textureType- one of:pInstance- an optional parameter that is required only whentextureTypeisVR.ETextureType_TextureType_Vulkan
-
VRSystem_IsDisplayOnDesktop
public static boolean VRSystem_IsDisplayOnDesktop()
Use to determine if the headset display is part of the desktop (i.e. extended) or hidden (i.e. direct mode).
-
VRSystem_SetDisplayVisibility
public static boolean VRSystem_SetDisplayVisibility(boolean bIsVisibleOnDesktop)
Sets the display visibility (true = extended, false = direct mode).- Parameters:
bIsVisibleOnDesktop- the display visibility- Returns:
- true indicates that the change was successful
-
nVRSystem_GetDeviceToAbsoluteTrackingPose
public static void nVRSystem_GetDeviceToAbsoluteTrackingPose(int eOrigin, float fPredictedSecondsToPhotonsFromNow, long pTrackedDevicePoseArray, int unTrackedDevicePoseArrayCount)Unsafe version of:GetDeviceToAbsoluteTrackingPose
-
VRSystem_GetDeviceToAbsoluteTrackingPose
public static void VRSystem_GetDeviceToAbsoluteTrackingPose(int eOrigin, float fPredictedSecondsToPhotonsFromNow, TrackedDevicePose.Buffer pTrackedDevicePoseArray)The pose that the tracker thinks that the HMD will be in at the specified number of seconds into the future. Pass 0 to get the state at the instant the method is called. Most of the time the application should calculate the time until the photons will be emitted from the display and pass that time into the method.This is roughly analogous to the inverse of the view matrix in most applications, though many games will need to do some additional rotation or translation on top of the rotation and translation provided by the head pose.
For devices where
bPoseIsValidis true the application can use the pose to position the device in question. The provided array can be any size up toVR.k_unMaxTrackedDeviceCount.Seated experiences should call this method with
VR.ETrackingUniverseOrigin_TrackingUniverseSeatedand receive poses relative to the seated zero pose. Standing experiences should call this method withVR.ETrackingUniverseOrigin_TrackingUniverseStandingand receive poses relative to the Chaperone Play Area.VR.ETrackingUniverseOrigin_TrackingUniverseRawAndUncalibratedshould probably not be used unless the application is the Chaperone calibration tool itself, but will provide poses relative to the hardware-specific coordinate system in the driver.- Parameters:
eOrigin- tracking universe that returned poses should be relative to. One of:VR.ETrackingUniverseOrigin_TrackingUniverseSeatedVR.ETrackingUniverseOrigin_TrackingUniverseStandingVR.ETrackingUniverseOrigin_TrackingUniverseRawAndUncalibratedfPredictedSecondsToPhotonsFromNow- number of seconds from now to predict poses for. Positive numbers are in the future. Pass 0 to get the state at the instant the function is called.
-
VRSystem_ResetSeatedZeroPose
public static void VRSystem_ResetSeatedZeroPose()
Sets the zero pose for the seated tracker coordinate system to the current position and yaw of the HMD. AfterResetSeatedZeroPoseallGetDeviceToAbsoluteTrackingPosecalls that passVR.ETrackingUniverseOrigin_TrackingUniverseSeatedas the origin will be relative to this new zero pose. The new zero coordinate system will not change the fact that the Y axis is up in the real world, so the next pose returned fromGetDeviceToAbsoluteTrackingPoseafter a call toResetSeatedZeroPosemay not be exactly an identity matrix.NOTE: This function overrides the user's previously saved seated zero pose and should only be called as the result of a user action. Users are also able to set their seated zero pose via the OpenVR Dashboard.
-
nVRSystem_GetSeatedZeroPoseToStandingAbsoluteTrackingPose
public static void nVRSystem_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(long __functionAddress, long __result) public static void nVRSystem_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(long __result)Unsafe version of:GetSeatedZeroPoseToStandingAbsoluteTrackingPose
-
VRSystem_GetSeatedZeroPoseToStandingAbsoluteTrackingPose
public static HmdMatrix34 VRSystem_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(HmdMatrix34 __result)
Returns the transform from the seated zero pose to the standing absolute tracking system. This allows applications to represent the seated origin to used or transform object positions from one coordinate system to the other.The seated origin may or may not be inside the Play Area or Collision Bounds returned by
IVRChaperone. Its position depends on what the user has set from the Dashboard settings and previous calls toResetSeatedZeroPose.
-
nVRSystem_GetRawZeroPoseToStandingAbsoluteTrackingPose
public static void nVRSystem_GetRawZeroPoseToStandingAbsoluteTrackingPose(long __functionAddress, long __result) public static void nVRSystem_GetRawZeroPoseToStandingAbsoluteTrackingPose(long __result)Unsafe version of:GetRawZeroPoseToStandingAbsoluteTrackingPose
-
VRSystem_GetRawZeroPoseToStandingAbsoluteTrackingPose
public static HmdMatrix34 VRSystem_GetRawZeroPoseToStandingAbsoluteTrackingPose(HmdMatrix34 __result)
Returns the transform from the tracking origin to the standing absolute tracking system. This allows applications to convert from raw tracking space to the calibrated standing coordinate system.
-
nVRSystem_GetSortedTrackedDeviceIndicesOfClass
public static int nVRSystem_GetSortedTrackedDeviceIndicesOfClass(int eTrackedDeviceClass, long punTrackedDeviceIndexArray, int unTrackedDeviceIndexArrayCount, int unRelativeToTrackedDeviceIndex)Unsafe version of:GetSortedTrackedDeviceIndicesOfClass
-
VRSystem_GetSortedTrackedDeviceIndicesOfClass
public static int VRSystem_GetSortedTrackedDeviceIndicesOfClass(int eTrackedDeviceClass, @Nullable java.nio.IntBuffer punTrackedDeviceIndexArray, int unRelativeToTrackedDeviceIndex)Get a sorted array of device indices of a given class of tracked devices (e.g. controllers). Devices are sorted right to left relative to the specified tracked device (default: hmd -- pass in -1 for absolute tracking space).- Parameters:
eTrackedDeviceClass- one of:- Returns:
- the number of devices in the list, or the size of the array needed if not large enough
-
VRSystem_GetTrackedDeviceActivityLevel
public static int VRSystem_GetTrackedDeviceActivityLevel(int unDeviceId)
Returns the level of activity on the device.
-
nVRSystem_ApplyTransform
public static void nVRSystem_ApplyTransform(long pOutputPose, long pTrackedDevicePose, long pTransform)Unsafe version of:ApplyTransform
-
VRSystem_ApplyTransform
public static void VRSystem_ApplyTransform(TrackedDevicePose pOutputPose, TrackedDevicePose pTrackedDevicePose, HmdMatrix34 pTransform)
Convenience utility to apply the specified transform to the specified pose. This properly transforms all pose components, including velocity and angular velocity.
-
VRSystem_GetTrackedDeviceIndexForControllerRole
public static int VRSystem_GetTrackedDeviceIndexForControllerRole(int unDeviceType)
Returns the device index associated with a specific role, for example the left hand or the right hand.This function is deprecated in favor of the new
IVRInputsystem.- Parameters:
unDeviceType- one of:
-
VRSystem_GetControllerRoleForTrackedDeviceIndex
public static int VRSystem_GetControllerRoleForTrackedDeviceIndex(int unDeviceIndex)
Returns the controller type associated with a device index.This function is deprecated in favor of the new
IVRInputsystem.
-
VRSystem_GetTrackedDeviceClass
public static int VRSystem_GetTrackedDeviceClass(int unDeviceIndex)
Returns the device class of a tracked device. If there has not been a device connected in this slot since the application started this function will returnVR.ETrackedDeviceClass_TrackedDeviceClass_Invalid. For previous detected devices the function will return the previously observed device class.To determine which devices exist on the system, just loop from 0 to
VR.k_unMaxTrackedDeviceCountand check the device class. Every device with something other thanVR.ETrackedDeviceClass_TrackedDeviceClass_Invalidis associated with an actual tracked device.- Parameters:
unDeviceIndex- index of the device to get the device class for.
-
VRSystem_IsTrackedDeviceConnected
public static boolean VRSystem_IsTrackedDeviceConnected(int unDeviceIndex)
Returns true if there is a device connected in this slot.- Parameters:
unDeviceIndex- index of the device to test connected state for
-
nVRSystem_GetBoolTrackedDeviceProperty
public static boolean nVRSystem_GetBoolTrackedDeviceProperty(int unDeviceIndex, int prop, long pError)Unsafe version of:GetBoolTrackedDeviceProperty
-
VRSystem_GetBoolTrackedDeviceProperty
public static boolean VRSystem_GetBoolTrackedDeviceProperty(int unDeviceIndex, int prop, @Nullable java.nio.IntBuffer pError)Returns a bool property. If the device index is not valid or the property is not a bool type this function will return false.- Parameters:
unDeviceIndex- index of the device to get the property forprop- which property to getpError- the error returned when attempting to fetch this property. This can beNULLif the caller doesn't care about the source of a property error.
-
nVRSystem_GetFloatTrackedDeviceProperty
public static float nVRSystem_GetFloatTrackedDeviceProperty(int unDeviceIndex, int prop, long pError)Unsafe version of:GetFloatTrackedDeviceProperty
-
VRSystem_GetFloatTrackedDeviceProperty
public static float VRSystem_GetFloatTrackedDeviceProperty(int unDeviceIndex, int prop, @Nullable java.nio.IntBuffer pError)Returns a float property. If the device index is not valid or the property is not a float type this function will return 0.- Parameters:
unDeviceIndex- index of the device to get the property forprop- which property to getpError- the error returned when attempting to fetch this property. This can beNULLif the caller doesn't care about the source of a property error.
-
nVRSystem_GetInt32TrackedDeviceProperty
public static int nVRSystem_GetInt32TrackedDeviceProperty(int unDeviceIndex, int prop, long pError)Unsafe version of:GetInt32TrackedDeviceProperty
-
VRSystem_GetInt32TrackedDeviceProperty
public static int VRSystem_GetInt32TrackedDeviceProperty(int unDeviceIndex, int prop, @Nullable java.nio.IntBuffer pError)Returns an int property. If the device index is not valid or the property is not a int type this function will return 0.- Parameters:
unDeviceIndex- index of the device to get the property forprop- which property to getpError- the error returned when attempting to fetch this property. This can beNULLif the caller doesn't care about the source of a property error.
-
nVRSystem_GetUint64TrackedDeviceProperty
public static long nVRSystem_GetUint64TrackedDeviceProperty(int unDeviceIndex, int prop, long pError)Unsafe version of:GetUint64TrackedDeviceProperty
-
VRSystem_GetUint64TrackedDeviceProperty
public static long VRSystem_GetUint64TrackedDeviceProperty(int unDeviceIndex, int prop, @Nullable java.nio.IntBuffer pError)Returns a uint64 property. If the device index is not valid or the property is not a uint64 type this function will return 0.- Parameters:
unDeviceIndex- index of the device to get the property forprop- which property to getpError- the error returned when attempting to fetch this property. This can beNULLif the caller doesn't care about the source of a property error.
-
nVRSystem_GetMatrix34TrackedDeviceProperty
public static void nVRSystem_GetMatrix34TrackedDeviceProperty(int unDeviceIndex, int prop, long pError, long __functionAddress, long __result) public static void nVRSystem_GetMatrix34TrackedDeviceProperty(int unDeviceIndex, int prop, long pError, long __result)Unsafe version of:GetMatrix34TrackedDeviceProperty
-
VRSystem_GetMatrix34TrackedDeviceProperty
public static HmdMatrix34 VRSystem_GetMatrix34TrackedDeviceProperty(int unDeviceIndex, int prop, @Nullable java.nio.IntBuffer pError, HmdMatrix34 __result)
Returns a matrix property. If the device index is not valid or the property is not a matrix type, this function will return identity.- Parameters:
unDeviceIndex- index of the device to get the property forprop- which property to getpError- the error returned when attempting to fetch this property. This can beNULLif the caller doesn't care about the source of a property error.
-
nVRSystem_GetArrayTrackedDeviceProperty
public static int nVRSystem_GetArrayTrackedDeviceProperty(int unDeviceIndex, int prop, int propType, long pBuffer, int unBufferSize, long pError)Unsafe version of:GetArrayTrackedDeviceProperty
-
VRSystem_GetArrayTrackedDeviceProperty
public static int VRSystem_GetArrayTrackedDeviceProperty(int unDeviceIndex, int prop, int propType, @Nullable java.nio.ByteBuffer pBuffer, @Nullable java.nio.IntBuffer pError)Returns an array of one type of property.If the device index is not valid or the property is not a single value or an array of the specified type, this function will return 0. Otherwise it returns the number of bytes necessary to hold the array of properties. If
unBufferSizeis greater than the returned size andpBufferis non-NULL,pBufferis filled with the contents of array of properties.- Parameters:
unDeviceIndex- index of the device to get the property forprop- which property to getpError- the error returned when attempting to fetch this property. This can beNULLif the caller doesn't care about the source of a property error.
-
nVRSystem_GetStringTrackedDeviceProperty
public static int nVRSystem_GetStringTrackedDeviceProperty(int unDeviceIndex, int prop, long pchValue, int unBufferSize, long pError)Unsafe version of:GetStringTrackedDeviceProperty- Parameters:
unBufferSize- the size of the buffer pointed to bypchValue
-
VRSystem_GetStringTrackedDeviceProperty
public static int VRSystem_GetStringTrackedDeviceProperty(int unDeviceIndex, int prop, @Nullable java.nio.ByteBuffer pchValue, @Nullable java.nio.IntBuffer pError)Returns a string property. If the device index is not valid or the property is not a string type this function will return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing null. Strings will always fit in buffers ofVR.k_unMaxPropertyStringSizecharacters.- Parameters:
unDeviceIndex- index of the device to get the property forprop- which property to getpchValue- the buffer to store string properties in.unBufferSizeshould be the size of this buffer.pError- the error returned when attempting to fetch this property. This can beNULLif the caller doesn't care about the source of a property error.
-
VRSystem_GetStringTrackedDeviceProperty
public static java.lang.String VRSystem_GetStringTrackedDeviceProperty(int unDeviceIndex, int prop, int unBufferSize, @Nullable java.nio.IntBuffer pError)Returns a string property. If the device index is not valid or the property is not a string type this function will return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing null. Strings will always fit in buffers ofVR.k_unMaxPropertyStringSizecharacters.- Parameters:
unDeviceIndex- index of the device to get the property forprop- which property to getunBufferSize- the size of the buffer pointed to bypchValuepError- the error returned when attempting to fetch this property. This can beNULLif the caller doesn't care about the source of a property error.
-
VRSystem_GetStringTrackedDeviceProperty
public static java.lang.String VRSystem_GetStringTrackedDeviceProperty(int unDeviceIndex, int prop, @Nullable java.nio.IntBuffer pError)Returns a string property. If the device index is not valid or the property is not a string type this function will return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing null. Strings will always fit in buffers ofVR.k_unMaxPropertyStringSizecharacters.- Parameters:
unDeviceIndex- index of the device to get the property forprop- which property to getpError- the error returned when attempting to fetch this property. This can beNULLif the caller doesn't care about the source of a property error.
-
nVRSystem_GetPropErrorNameFromEnum
public static long nVRSystem_GetPropErrorNameFromEnum(int error)
Unsafe version of:GetPropErrorNameFromEnum
-
VRSystem_GetPropErrorNameFromEnum
@Nullable public static java.lang.String VRSystem_GetPropErrorNameFromEnum(int error)
Returns a string that corresponds with the specified property error. The string will be the name of the error enum value for all valid error codes.- Parameters:
error- the error code to return a string for. One of:
-
nVRSystem_PollNextEvent
public static boolean nVRSystem_PollNextEvent(long pEvent, int uncbVREvent)Unsafe version of:PollNextEvent
-
VRSystem_PollNextEvent
public static boolean VRSystem_PollNextEvent(VREvent pEvent, int uncbVREvent)
Returns true and fills the event with the next event on the queue if there is one. If there are no events this method returns false.- Parameters:
pEvent- an event structure to fill with the next eventuncbVREvent- the size in bytes of theVREventstruct
-
VRSystem_PollNextEvent
public static boolean VRSystem_PollNextEvent(VREvent pEvent)
Returns true and fills the event with the next event on the queue if there is one. If there are no events this method returns false.- Parameters:
pEvent- an event structure to fill with the next event
-
nVRSystem_PollNextEventWithPose
public static boolean nVRSystem_PollNextEventWithPose(int eOrigin, long pEvent, int uncbVREvent, long pTrackedDevicePose)Unsafe version of:PollNextEventWithPose
-
VRSystem_PollNextEventWithPose
public static boolean VRSystem_PollNextEventWithPose(int eOrigin, VREvent pEvent, int uncbVREvent, TrackedDevicePose pTrackedDevicePose)Returns true and fills the event with the next event on the queue if there is one. If there are no events this method returns false. Fills in the pose of the associated tracked device in the provided pose struct. This pose will always be older than the call to this function and should not be used to render the device.- Parameters:
eOrigin- the tracking system to return the event's pose in. One of:VR.ETrackingUniverseOrigin_TrackingUniverseSeatedVR.ETrackingUniverseOrigin_TrackingUniverseStandingVR.ETrackingUniverseOrigin_TrackingUniverseRawAndUncalibratedpEvent- an event structure to fill with the next eventuncbVREvent- the size in bytes of theVREventstructpTrackedDevicePose- a pose struct to fill with the returned event's pose. Must not beNULL.
-
VRSystem_PollNextEventWithPose
public static boolean VRSystem_PollNextEventWithPose(int eOrigin, VREvent pEvent, TrackedDevicePose pTrackedDevicePose)Returns true and fills the event with the next event on the queue if there is one. If there are no events this method returns false. Fills in the pose of the associated tracked device in the provided pose struct. This pose will always be older than the call to this function and should not be used to render the device.- Parameters:
eOrigin- the tracking system to return the event's pose in. One of:VR.ETrackingUniverseOrigin_TrackingUniverseSeatedVR.ETrackingUniverseOrigin_TrackingUniverseStandingVR.ETrackingUniverseOrigin_TrackingUniverseRawAndUncalibratedpEvent- an event structure to fill with the next eventpTrackedDevicePose- a pose struct to fill with the returned event's pose. Must not beNULL.
-
nVRSystem_GetEventTypeNameFromEnum
public static long nVRSystem_GetEventTypeNameFromEnum(int eType)
Unsafe version of:GetEventTypeNameFromEnum
-
VRSystem_GetEventTypeNameFromEnum
@Nullable public static java.lang.String VRSystem_GetEventTypeNameFromEnum(int eType)
Returns the name of anEVREventenum value.- Parameters:
eType- the event type to return a string for. One of:
-
nVRSystem_GetHiddenAreaMesh
public static void nVRSystem_GetHiddenAreaMesh(int eEye, int type, long __functionAddress, long __result) public static void nVRSystem_GetHiddenAreaMesh(int eEye, int type, long __result)Unsafe version of:GetHiddenAreaMesh
-
VRSystem_GetHiddenAreaMesh
public static HiddenAreaMesh VRSystem_GetHiddenAreaMesh(int eEye, int type, HiddenAreaMesh __result)
Returns the hidden area mesh for the current HMD. The pixels covered by this mesh will never be seen by the user after the lens distortion is applied based on visibility to the panels. If this HMD does not have a hidden area mesh, the vertex data and count will beNULLand 0 respectively.This mesh is meant to be rendered into the stencil buffer (or into the depth buffer setting nearz) before rendering each eye's view. This will improve performance by letting the GPU early-reject pixels the user will never see before running the pixel shader.
Note
Render this mesh with backface culling disabled since the winding order of the vertices can be different per-HMD or per-eye.
- Parameters:
eEye- the eye to get the hidden area mesh for. One of:VR.EVREye_Eye_LeftVR.EVREye_Eye_Righttype- one of:VR.EHiddenAreaMeshType_k_eHiddenAreaMesh_StandardVR.EHiddenAreaMeshType_k_eHiddenAreaMesh_InverseVR.EHiddenAreaMeshType_k_eHiddenAreaMesh_LineLoopVR.EHiddenAreaMeshType_k_eHiddenAreaMesh_Max
-
nVRSystem_GetControllerState
public static boolean nVRSystem_GetControllerState(int unControllerDeviceIndex, long pControllerState, int unControllerStateSize)Unsafe version of:GetControllerState
-
VRSystem_GetControllerState
public static boolean VRSystem_GetControllerState(int unControllerDeviceIndex, VRControllerState pControllerState, int unControllerStateSize)Fills the supplied struct with the current state of the controller.This function is deprecated in favor of the new
IVRInputsystem.- Parameters:
unControllerDeviceIndex- the tracked device index of the controller to get the state ofpControllerState- a struct to fill with the controller stateunControllerStateSize- the size in bytes of theVRControllerStatestruct- Returns:
- false if the controller index is invalid
-
VRSystem_GetControllerState
public static boolean VRSystem_GetControllerState(int unControllerDeviceIndex, VRControllerState pControllerState)Fills the supplied struct with the current state of the controller.This function is deprecated in favor of the new
IVRInputsystem.- Parameters:
unControllerDeviceIndex- the tracked device index of the controller to get the state ofpControllerState- a struct to fill with the controller state- Returns:
- false if the controller index is invalid
-
nVRSystem_GetControllerStateWithPose
public static boolean nVRSystem_GetControllerStateWithPose(int eOrigin, int unControllerDeviceIndex, long pControllerState, int unControllerStateSize, long pTrackedDevicePose)Unsafe version of:GetControllerStateWithPose
-
VRSystem_GetControllerStateWithPose
public static boolean VRSystem_GetControllerStateWithPose(int eOrigin, int unControllerDeviceIndex, VRControllerState pControllerState, int unControllerStateSize, TrackedDevicePose pTrackedDevicePose)Fills the supplied struct with the current state of the controller and the provided pose with the pose of the controller when the controller state was updated most recently. Use this form if you need a precise controller pose as input to your application when the user presses or releases a button.This function is deprecated in favor of the new
IVRInputsystem.- Parameters:
eOrigin- the tracking coordinate system to return the pose in. One of:VR.ETrackingUniverseOrigin_TrackingUniverseSeatedVR.ETrackingUniverseOrigin_TrackingUniverseStandingVR.ETrackingUniverseOrigin_TrackingUniverseRawAndUncalibratedunControllerDeviceIndex- the tracked device index of the controller to get the state ofpControllerState- a struct to fill with the controller stateunControllerStateSize- the size in bytes of theVRControllerStatestructpTrackedDevicePose- a pose struct to fill with the pose of the controller when the last button event occurred
-
VRSystem_GetControllerStateWithPose
public static boolean VRSystem_GetControllerStateWithPose(int eOrigin, int unControllerDeviceIndex, VRControllerState pControllerState, TrackedDevicePose pTrackedDevicePose)Fills the supplied struct with the current state of the controller and the provided pose with the pose of the controller when the controller state was updated most recently. Use this form if you need a precise controller pose as input to your application when the user presses or releases a button.This function is deprecated in favor of the new
IVRInputsystem.- Parameters:
eOrigin- the tracking coordinate system to return the pose in. One of:VR.ETrackingUniverseOrigin_TrackingUniverseSeatedVR.ETrackingUniverseOrigin_TrackingUniverseStandingVR.ETrackingUniverseOrigin_TrackingUniverseRawAndUncalibratedunControllerDeviceIndex- the tracked device index of the controller to get the state ofpControllerState- a struct to fill with the controller statepTrackedDevicePose- a pose struct to fill with the pose of the controller when the last button event occurred
-
VRSystem_TriggerHapticPulse
public static void VRSystem_TriggerHapticPulse(int unControllerDeviceIndex, int unAxisId, short usDurationMicroSec)Trigger a single haptic pulse on a controller. After this call the application may not trigger another haptic pulse on this controller and axis combination for 5ms.This function is deprecated in favor of the new
IVRInputsystem.- Parameters:
unControllerDeviceIndex- the tracked device index of the controller to trigger a haptic pulse onunAxisId- the ID of the axis to trigger a haptic pulse onusDurationMicroSec- the duration of the desired haptic pulse in microseconds
-
nVRSystem_GetButtonIdNameFromEnum
public static long nVRSystem_GetButtonIdNameFromEnum(int eButtonId)
Unsafe version of:GetButtonIdNameFromEnum
-
VRSystem_GetButtonIdNameFromEnum
@Nullable public static java.lang.String VRSystem_GetButtonIdNameFromEnum(int eButtonId)
Returns the name of anEVRButtonIdenum value.This function is deprecated in favor of the new
IVRInputsystem.- Parameters:
eButtonId- the button ID to return the name of. One of:
-
nVRSystem_GetControllerAxisTypeNameFromEnum
public static long nVRSystem_GetControllerAxisTypeNameFromEnum(int eAxisType)
Unsafe version of:GetControllerAxisTypeNameFromEnum
-
VRSystem_GetControllerAxisTypeNameFromEnum
@Nullable public static java.lang.String VRSystem_GetControllerAxisTypeNameFromEnum(int eAxisType)
Returns the name of anEVRControllerAxisTypeenum value.- Parameters:
eAxisType- the controller axis type to get a name for. One of:VR.EVRControllerAxisType_k_eControllerAxis_NoneVR.EVRControllerAxisType_k_eControllerAxis_TrackPadVR.EVRControllerAxisType_k_eControllerAxis_JoystickVR.EVRControllerAxisType_k_eControllerAxis_Trigger
-
VRSystem_IsInputAvailable
public static boolean VRSystem_IsInputAvailable()
Returns true if this application is receiving input from the system. This would return false if system-related functionality is consuming the input stream.
-
VRSystem_IsSteamVRDrawingControllers
public static boolean VRSystem_IsSteamVRDrawingControllers()
Returns true if SteamVR is drawing controllers on top of the application. Applications should consider not drawing anything attached to the user's hands in this case.
-
VRSystem_ShouldApplicationPause
public static boolean VRSystem_ShouldApplicationPause()
Returns true if the user has put SteamVR into a mode that is distracting them from the application. For applications where this is appropriate, the application should pause ongoing activity.
-
VRSystem_ShouldApplicationReduceRenderingWork
public static boolean VRSystem_ShouldApplicationReduceRenderingWork()
Returns true if SteamVR is doing significant rendering work and the game should do what it can to reduce its own workload. One common way to do this is to reduce the size of the render target provided for each eye.
-
VRSystem_PerformFirmwareUpdate
public static int VRSystem_PerformFirmwareUpdate(int unDeviceIndex)
Performs the actual firmware update if applicable.The following events will be sent, if
VR.EVRFirmwareError_VRFirmwareError_Nonewas returned:VR.EVREventType_VREvent_FirmwareUpdateStarted,VR.EVREventType_VREvent_FirmwareUpdateFinishedUse the properties
VR.ETrackedDeviceProperty_Prop_Firmware_UpdateAvailable_Bool,VR.ETrackedDeviceProperty_Prop_Firmware_ManualUpdate_Bool, andVR.ETrackedDeviceProperty_Prop_Firmware_ManualUpdateURL_Stringto figure our whether a firmware update is available, and to figure out whether its a manual update.VR.ETrackedDeviceProperty_Prop_Firmware_ManualUpdateURL_Stringshould point to an URL describing the manual update process.
-
VRSystem_AcknowledgeQuit_Exiting
public static void VRSystem_AcknowledgeQuit_Exiting()
Call this to acknowledge to the system thatVR.EVREventType_VREvent_Quithas been received and that the process is exiting. This extends the timeout until the process is killed.
-
VRSystem_AcknowledgeQuit_UserPrompt
public static void VRSystem_AcknowledgeQuit_UserPrompt()
Call this to tell the system that the user is being prompted to save data. This halts the timeout and dismisses the dashboard (if it was up). Applications should be sure to actually prompt the user to save and then exit afterward, otherwise the user will be left in a confusing state.
-
nVRSystem_GetAppContainerFilePaths
public static int nVRSystem_GetAppContainerFilePaths(long pchBuffer, int unBufferSize)Unsafe version of:GetAppContainerFilePaths
-
VRSystem_GetAppContainerFilePaths
public static int VRSystem_GetAppContainerFilePaths(@Nullable java.nio.ByteBuffer pchBuffer) public static java.lang.String VRSystem_GetAppContainerFilePaths(int unBufferSize)Retrieves a null-terminated, semicolon-delimited list of UTF8 file paths that an application must have read access to when running inside of an app container.- Returns:
- the number of bytes needed to hold the list
-
-