Skip to content

IVRSystem_Overview

Joe Ludwig edited this page May 24, 2016 · 15 revisions

Overview

The vr::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 the openvr::VR_Init function.

Many functions in IVRSystem use a tracked device index to identify a specific device attached to the computer. This value is defined as follows:

typedef uint32_t TrackedDeviceIndex_t;
static const uint32_t k_unTrackedDeviceIndexInvalid = 0xFFFFFFFF;
static const uint32_t k_unMaxTrackedDeviceCount = 16;
static const uint32_t k_unTrackedDeviceIndex_Hmd = 0;

There will never be more than 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.

Each tracked device has a class that is one of:

  • TrackedDeviceClass_Invalid - There is no device at this index
  • TrackedDeviceClass_HMD - The device at this index is an HMD
  • TrackedDeviceClass_Controller - The device is a controller
  • TrackedDeviceClass_TrackingReference - The device is a camera, Lighthouse base station, or other device that supplies tracking ground truth.

Interface Functions

The vr::IVRSystem interface contains the following functions:

Clone this wiki locally