Class VRSystem
- java.lang.Object
-
- org.lwjgl.openvr.VRSystem
-
public class VRSystem extends java.lang.Object
Main interface for display, distortion, tracking, controller, and event access.The
IVRSystem
interface 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 theInitInternal
function.Many functions in
IVRSystem
use a tracked device index to identify a specific device attached to the computer. There will never be more thanVR.k_unMaxTrackedDeviceCount
devices 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 void
nVRSystem_ApplyTransform(long pOutputPose, long pTrackedDevicePose, long pTransform)
Unsafe version of:ApplyTransform
static boolean
nVRSystem_ComputeDistortion(int eEye, float fU, float fV, long pDistortionCoordinates)
Unsafe version of:ComputeDistortion
static int
nVRSystem_GetAppContainerFilePaths(long pchBuffer, int unBufferSize)
Unsafe version of:GetAppContainerFilePaths
static int
nVRSystem_GetArrayTrackedDeviceProperty(int unDeviceIndex, int prop, int propType, long pBuffer, int unBufferSize, long pError)
Unsafe version of:GetArrayTrackedDeviceProperty
static boolean
nVRSystem_GetBoolTrackedDeviceProperty(int unDeviceIndex, int prop, long pError)
Unsafe version of:GetBoolTrackedDeviceProperty
static long
nVRSystem_GetButtonIdNameFromEnum(int eButtonId)
Unsafe version of:GetButtonIdNameFromEnum
static long
nVRSystem_GetControllerAxisTypeNameFromEnum(int eAxisType)
Unsafe version of:GetControllerAxisTypeNameFromEnum
static boolean
nVRSystem_GetControllerState(int unControllerDeviceIndex, long pControllerState, int unControllerStateSize)
Unsafe version of:GetControllerState
static boolean
nVRSystem_GetControllerStateWithPose(int eOrigin, int unControllerDeviceIndex, long pControllerState, int unControllerStateSize, long pTrackedDevicePose)
Unsafe version of:GetControllerStateWithPose
static void
nVRSystem_GetDeviceToAbsoluteTrackingPose(int eOrigin, float fPredictedSecondsToPhotonsFromNow, long pTrackedDevicePoseArray, int unTrackedDevicePoseArrayCount)
Unsafe version of:GetDeviceToAbsoluteTrackingPose
static void
nVRSystem_GetDXGIOutputInfo(long pnAdapterIndex)
Unsafe version of:GetDXGIOutputInfo
static long
nVRSystem_GetEventTypeNameFromEnum(int eType)
Unsafe version of:GetEventTypeNameFromEnum
static void
nVRSystem_GetEyeToHeadTransform(int eEye, long __result)
Unsafe version of:GetEyeToHeadTransform
static void
nVRSystem_GetEyeToHeadTransform(int eEye, long __functionAddress, long __result)
Unsafe version of:GetEyeToHeadTransform
static float
nVRSystem_GetFloatTrackedDeviceProperty(int unDeviceIndex, int prop, long pError)
Unsafe version of:GetFloatTrackedDeviceProperty
static void
nVRSystem_GetHiddenAreaMesh(int eEye, int type, long __result)
Unsafe version of:GetHiddenAreaMesh
static void
nVRSystem_GetHiddenAreaMesh(int eEye, int type, long __functionAddress, long __result)
Unsafe version of:GetHiddenAreaMesh
static int
nVRSystem_GetInt32TrackedDeviceProperty(int unDeviceIndex, int prop, long pError)
Unsafe version of:GetInt32TrackedDeviceProperty
static void
nVRSystem_GetMatrix34TrackedDeviceProperty(int unDeviceIndex, int prop, long pError, long __result)
Unsafe version of:GetMatrix34TrackedDeviceProperty
static void
nVRSystem_GetMatrix34TrackedDeviceProperty(int unDeviceIndex, int prop, long pError, long __functionAddress, long __result)
Unsafe version of:GetMatrix34TrackedDeviceProperty
static void
nVRSystem_GetOutputDevice(long pnDevice, int textureType, long pInstance)
Unsafe version of:GetOutputDevice
static void
nVRSystem_GetProjectionMatrix(int eEye, float fNearZ, float fFarZ, long __result)
Unsafe version of:GetProjectionMatrix
static void
nVRSystem_GetProjectionMatrix(int eEye, float fNearZ, float fFarZ, long __functionAddress, long __result)
Unsafe version of:GetProjectionMatrix
static void
nVRSystem_GetProjectionRaw(int eEye, long pfLeft, long pfRight, long pfTop, long pfBottom)
Unsafe version of:GetProjectionRaw
static long
nVRSystem_GetPropErrorNameFromEnum(int error)
Unsafe version of:GetPropErrorNameFromEnum
static void
nVRSystem_GetRawZeroPoseToStandingAbsoluteTrackingPose(long __result)
Unsafe version of:GetRawZeroPoseToStandingAbsoluteTrackingPose
static void
nVRSystem_GetRawZeroPoseToStandingAbsoluteTrackingPose(long __functionAddress, long __result)
Unsafe version of:GetRawZeroPoseToStandingAbsoluteTrackingPose
static void
nVRSystem_GetRecommendedRenderTargetSize(long pnWidth, long pnHeight)
Unsafe version of:GetRecommendedRenderTargetSize
static long
nVRSystem_GetRuntimeVersion()
Unsafe version of:GetRuntimeVersion
static void
nVRSystem_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(long __result)
Unsafe version of:GetSeatedZeroPoseToStandingAbsoluteTrackingPose
static void
nVRSystem_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(long __functionAddress, long __result)
Unsafe version of:GetSeatedZeroPoseToStandingAbsoluteTrackingPose
static int
nVRSystem_GetSortedTrackedDeviceIndicesOfClass(int eTrackedDeviceClass, long punTrackedDeviceIndexArray, int unTrackedDeviceIndexArrayCount, int unRelativeToTrackedDeviceIndex)
Unsafe version of:GetSortedTrackedDeviceIndicesOfClass
static int
nVRSystem_GetStringTrackedDeviceProperty(int unDeviceIndex, int prop, long pchValue, int unBufferSize, long pError)
Unsafe version of:GetStringTrackedDeviceProperty
static boolean
nVRSystem_GetTimeSinceLastVsync(long pfSecondsSinceLastVsync, long pulFrameCounter)
Unsafe version of:GetTimeSinceLastVsync
static long
nVRSystem_GetUint64TrackedDeviceProperty(int unDeviceIndex, int prop, long pError)
Unsafe version of:GetUint64TrackedDeviceProperty
static boolean
nVRSystem_PollNextEvent(long pEvent, int uncbVREvent)
Unsafe version of:PollNextEvent
static boolean
nVRSystem_PollNextEventWithPose(int eOrigin, long pEvent, int uncbVREvent, long pTrackedDevicePose)
Unsafe version of:PollNextEventWithPose
static void
VRSystem_AcknowledgeQuit_Exiting()
Call this to acknowledge to the system thatVR.EVREventType_VREvent_Quit
has been received and that the process is exiting.static void
VRSystem_ApplyTransform(TrackedDevicePose pOutputPose, TrackedDevicePose pTrackedDevicePose, HmdMatrix34 pTransform)
Convenience utility to apply the specified transform to the specified pose.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.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.static int
VRSystem_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 int
VRSystem_GetArrayTrackedDeviceProperty(int unDeviceIndex, int prop, int propType, java.nio.ByteBuffer pBuffer, java.nio.IntBuffer pError)
Returns an array of one type of property.static boolean
VRSystem_GetBoolTrackedDeviceProperty(int unDeviceIndex, int prop, java.nio.IntBuffer pError)
Returns a bool property.static java.lang.String
VRSystem_GetButtonIdNameFromEnum(int eButtonId)
Returns the name of anEVRButtonId
enum value.static java.lang.String
VRSystem_GetControllerAxisTypeNameFromEnum(int eAxisType)
Returns the name of anEVRControllerAxisType
enum value.static int
VRSystem_GetControllerRoleForTrackedDeviceIndex(int unDeviceIndex)
Returns the controller type associated with a device index.static boolean
VRSystem_GetControllerState(int unControllerDeviceIndex, VRControllerState pControllerState)
Fills the supplied struct with the current state of the controller.static boolean
VRSystem_GetControllerState(int unControllerDeviceIndex, VRControllerState pControllerState, int unControllerStateSize)
Fills the supplied struct with the current state of the controller.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.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.static int
VRSystem_GetD3D9AdapterIndex()
D3D9 Onlystatic 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.static void
VRSystem_GetDXGIOutputInfo(java.nio.IntBuffer pnAdapterIndex)
D3D10/11 Onlystatic java.lang.String
VRSystem_GetEventTypeNameFromEnum(int eType)
Returns the name of anEVREvent
enum value.static HmdMatrix34
VRSystem_GetEyeToHeadTransform(int eEye, HmdMatrix34 __result)
Returns the transform from eye space to the head space.static float
VRSystem_GetFloatTrackedDeviceProperty(int unDeviceIndex, int prop, java.nio.IntBuffer pError)
Returns a float property.static HiddenAreaMesh
VRSystem_GetHiddenAreaMesh(int eEye, int type, HiddenAreaMesh __result)
Returns the hidden area mesh for the current HMD.static int
VRSystem_GetInt32TrackedDeviceProperty(int unDeviceIndex, int prop, java.nio.IntBuffer pError)
Returns an int property.static HmdMatrix34
VRSystem_GetMatrix34TrackedDeviceProperty(int unDeviceIndex, int prop, java.nio.IntBuffer pError, HmdMatrix34 __result)
Returns a matrix property.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.static HmdMatrix44
VRSystem_GetProjectionMatrix(int eEye, float fNearZ, float fFarZ, HmdMatrix44 __result)
Returns the projection matrix for the specified eye.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.static java.lang.String
VRSystem_GetPropErrorNameFromEnum(int error)
Returns a string that corresponds with the specified property error.static HmdMatrix34
VRSystem_GetRawZeroPoseToStandingAbsoluteTrackingPose(HmdMatrix34 __result)
Returns the transform from the tracking origin to the standing absolute tracking system.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.static java.lang.String
VRSystem_GetRuntimeVersion()
Returns the current version of the SteamVR runtime.static HmdMatrix34
VRSystem_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(HmdMatrix34 __result)
Returns the transform from the seated zero pose to the standing absolute tracking system.static int
VRSystem_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.String
VRSystem_GetStringTrackedDeviceProperty(int unDeviceIndex, int prop, int unBufferSize, java.nio.IntBuffer pError)
Returns a string property.static int
VRSystem_GetStringTrackedDeviceProperty(int unDeviceIndex, int prop, java.nio.ByteBuffer pchValue, java.nio.IntBuffer pError)
Returns a string property.static java.lang.String
VRSystem_GetStringTrackedDeviceProperty(int unDeviceIndex, int prop, java.nio.IntBuffer pError)
Returns a string property.static boolean
VRSystem_GetTimeSinceLastVsync(java.nio.FloatBuffer pfSecondsSinceLastVsync, java.nio.LongBuffer pulFrameCounter)
Returns the number of elapsed seconds since the last recorded vsync event.static int
VRSystem_GetTrackedDeviceActivityLevel(int unDeviceId)
Returns the level of activity on the device.static int
VRSystem_GetTrackedDeviceClass(int unDeviceIndex)
Returns the device class of a tracked device.static int
VRSystem_GetTrackedDeviceIndexForControllerRole(int unDeviceType)
Returns the device index associated with a specific role, for example the left hand or the right hand.static long
VRSystem_GetUint64TrackedDeviceProperty(int unDeviceIndex, int prop, java.nio.IntBuffer pError)
Returns a uint64 property.static boolean
VRSystem_IsDisplayOnDesktop()
Use to determine if the headset display is part of the desktop (i.e.static boolean
VRSystem_IsInputAvailable()
Returns true if this application is receiving input from the system.static boolean
VRSystem_IsSteamVRDrawingControllers()
Returns true if SteamVR is drawing controllers on top of the application.static boolean
VRSystem_IsTrackedDeviceConnected(int unDeviceIndex)
Returns true if there is a device connected in this slot.static int
VRSystem_PerformFirmwareUpdate(int unDeviceIndex)
Performs the actual firmware update if applicable.static boolean
VRSystem_PollNextEvent(VREvent pEvent)
Returns true and fills the event with the next event on the queue if there is one.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.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.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.static void
VRSystem_ResetSeatedZeroPose()
Sets the zero pose for the seated tracker coordinate system to the current position and yaw of the HMD.static boolean
VRSystem_SetDisplayVisibility(boolean bIsVisibleOnDesktop)
Sets the display visibility (true = extended, false = direct mode).static boolean
VRSystem_ShouldApplicationPause()
Returns true if the user has put SteamVR into a mode that is distracting them from the application.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.static void
VRSystem_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_Left
VR.EVREye_Eye_Right
fNearZ
- 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_Left
VR.EVREye_Eye_Right
pfLeft
- 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_Left
VR.EVREye_Eye_Right
fU
- 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 * Projection
the sequence isModel * View * Eye^-1 * Projection
. NormallyView
andEye^-1
will be multiplied together and treated asView
in your application.- Parameters:
eEye
- determines which eye the function should return the eye matrix for. One of:VR.EVREye_Eye_Left
VR.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
CreateDevice
to 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
EnumAdapters
to 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::EnumAdapters
andIDXGIAdapter::GetDesc
to find the adapter with the matching LUID, or useIDXGIFactory4::EnumAdapterByLuid
. The discoveredIDXGIAdapter
should be used to create the device and swap chain.Vulkan Only
Returns the
VkPhysicalDevice
that should be used by the application.pInstance
must be the instance the application will use to query for theVkPhysicalDevice
. The application must create theVkInstance
with extensions returned byGetVulkanInstanceExtensionsRequired
enabled.macOS Only
For
VR.ETextureType_TextureType_IOSurface
returns theid<MTLDevice>
that should be used by the application.On 10.13+ for
VR.ETextureType_TextureType_OpenGL
returns theregistryId
of the renderer which should be used by the application. See Apple Technical Q&A QA1168 for information on enumerating GL Renderers, and the newkCGLRPRegistryIDLow
andkCGLRPRegistryIDHigh
CGLRendererProperty
values in the 10.13 SDK.Pre 10.13 for
VR.ETextureType_TextureType_OpenGL
returns 0, as there is no dependable way to correlate the HMDsMTLDevice
with a GL Renderer.- Parameters:
textureType
- one of:pInstance
- an optional parameter that is required only whentextureType
isVR.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
bPoseIsValid
is 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_TrackingUniverseSeated
and receive poses relative to the seated zero pose. Standing experiences should call this method withVR.ETrackingUniverseOrigin_TrackingUniverseStanding
and receive poses relative to the Chaperone Play Area.VR.ETrackingUniverseOrigin_TrackingUniverseRawAndUncalibrated
should 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_TrackingUniverseSeated
VR.ETrackingUniverseOrigin_TrackingUniverseStanding
VR.ETrackingUniverseOrigin_TrackingUniverseRawAndUncalibrated
fPredictedSecondsToPhotonsFromNow
- 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. AfterResetSeatedZeroPose
allGetDeviceToAbsoluteTrackingPose
calls that passVR.ETrackingUniverseOrigin_TrackingUniverseSeated
as 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 fromGetDeviceToAbsoluteTrackingPose
after a call toResetSeatedZeroPose
may 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
IVRInput
system.- 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
IVRInput
system.
-
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_unMaxTrackedDeviceCount
and check the device class. Every device with something other thanVR.ETrackedDeviceClass_TrackedDeviceClass_Invalid
is 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 beNULL
if 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 beNULL
if 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 beNULL
if 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 beNULL
if 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 beNULL
if 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
unBufferSize
is greater than the returned size andpBuffer
is non-NULL
,pBuffer
is 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 beNULL
if 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_unMaxPropertyStringSize
characters.- Parameters:
unDeviceIndex
- index of the device to get the property forprop
- which property to getpchValue
- the buffer to store string properties in.unBufferSize
should be the size of this buffer.pError
- the error returned when attempting to fetch this property. This can beNULL
if 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_unMaxPropertyStringSize
characters.- Parameters:
unDeviceIndex
- index of the device to get the property forprop
- which property to getunBufferSize
- the size of the buffer pointed to bypchValue
pError
- the error returned when attempting to fetch this property. This can beNULL
if 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_unMaxPropertyStringSize
characters.- 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 beNULL
if 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 theVREvent
struct
-
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_TrackingUniverseSeated
VR.ETrackingUniverseOrigin_TrackingUniverseStanding
VR.ETrackingUniverseOrigin_TrackingUniverseRawAndUncalibrated
pEvent
- an event structure to fill with the next eventuncbVREvent
- the size in bytes of theVREvent
structpTrackedDevicePose
- 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_TrackingUniverseSeated
VR.ETrackingUniverseOrigin_TrackingUniverseStanding
VR.ETrackingUniverseOrigin_TrackingUniverseRawAndUncalibrated
pEvent
- 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 anEVREvent
enum 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 beNULL
and 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_Left
VR.EVREye_Eye_Right
type
- one of:VR.EHiddenAreaMeshType_k_eHiddenAreaMesh_Standard
VR.EHiddenAreaMeshType_k_eHiddenAreaMesh_Inverse
VR.EHiddenAreaMeshType_k_eHiddenAreaMesh_LineLoop
VR.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
IVRInput
system.- 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 theVRControllerState
struct- 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
IVRInput
system.- 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
IVRInput
system.- Parameters:
eOrigin
- the tracking coordinate system to return the pose in. One of:VR.ETrackingUniverseOrigin_TrackingUniverseSeated
VR.ETrackingUniverseOrigin_TrackingUniverseStanding
VR.ETrackingUniverseOrigin_TrackingUniverseRawAndUncalibrated
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 theVRControllerState
structpTrackedDevicePose
- 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
IVRInput
system.- Parameters:
eOrigin
- the tracking coordinate system to return the pose in. One of:VR.ETrackingUniverseOrigin_TrackingUniverseSeated
VR.ETrackingUniverseOrigin_TrackingUniverseStanding
VR.ETrackingUniverseOrigin_TrackingUniverseRawAndUncalibrated
unControllerDeviceIndex
- 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
IVRInput
system.- 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 anEVRButtonId
enum value.This function is deprecated in favor of the new
IVRInput
system.- 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 anEVRControllerAxisType
enum value.- Parameters:
eAxisType
- the controller axis type to get a name for. One of:VR.EVRControllerAxisType_k_eControllerAxis_None
VR.EVRControllerAxisType_k_eControllerAxis_TrackPad
VR.EVRControllerAxisType_k_eControllerAxis_Joystick
VR.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_None
was returned:VR.EVREventType_VREvent_FirmwareUpdateStarted
,VR.EVREventType_VREvent_FirmwareUpdateFinished
Use the properties
VR.ETrackedDeviceProperty_Prop_Firmware_UpdateAvailable_Bool
,VR.ETrackedDeviceProperty_Prop_Firmware_ManualUpdate_Bool
, andVR.ETrackedDeviceProperty_Prop_Firmware_ManualUpdateURL_String
to figure our whether a firmware update is available, and to figure out whether its a manual update.VR.ETrackedDeviceProperty_Prop_Firmware_ManualUpdateURL_String
should 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_Quit
has been received and that the process is exiting. This extends the timeout until the process is killed.
-
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
-
nVRSystem_GetRuntimeVersion
public static long nVRSystem_GetRuntimeVersion()
Unsafe version of:GetRuntimeVersion
-
VRSystem_GetRuntimeVersion
@Nullable public static java.lang.String VRSystem_GetRuntimeVersion()
Returns the current version of the SteamVR runtime. The returned string will remain valid untilShutdownInternal
is called.NOTE: Is it not appropriate to use this version to test for the presence of any SteamVR feature. Only use this version number for logging or showing to a user, and not to try to detect anything at runtime. When appropriate, feature-specific presence information is provided by other APIs.
-
-