-
Notifications
You must be signed in to change notification settings - Fork 1.3k
IVRSystem_Overview
Joe Ludwig edited this page May 27, 2016
·
15 revisions
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.
The vr::IVRSystem interface contains the following functions:
- Display - Functions to figure out where to put a window, how to create viewports and render targets, and how to render into those surfaces.
- Tracking - Functions to compute the pose of tracked devices
- Property functions - Access to non-tracking information about tracked devices
- Event Methods - Access to events generated by tracked devices or the system itself
- Rendering Helper Methods - Utility functions that help with rendering
- Controller Methods - Methods for interacting with controllers