Monado OpenXR Runtime
t_openvr_tracker.h File Reference

OpenVR tracking source. More...

#include "xrt/xrt_tracking.h"
Include dependency graph for t_openvr_tracker.h:

Go to the source code of this file.

Enumerations

enum  openvr_device {
  T_OPENVR_DEVICE_UNKNOWN = 0 , T_OPENVR_DEVICE_HMD , T_OPENVR_DEVICE_LEFT_CONTROLLER , T_OPENVR_DEVICE_RIGHT_CONTROLLER ,
  T_OPENVR_DEVICE_TRACKER
}
 The type of device. More...
 

Functions

struct openvr_tracker * t_openvr_tracker_create (double sample_frequency_hz, enum openvr_device *devs, struct xrt_pose_sink **sinks, int sink_count)
 Creates an OpenVR tracker. More...
 
void t_openvr_tracker_start (struct openvr_tracker *ovrt)
 
void t_openvr_tracker_stop (struct openvr_tracker *ovrt)
 
void t_openvr_tracker_destroy (struct openvr_tracker *ovrt)
 

Detailed Description

OpenVR tracking source.

Author
Mateo de Mayo mateo.nosp@m..dem.nosp@m.ayo@c.nosp@m.olla.nosp@m.bora..nosp@m.com

Enumeration Type Documentation

◆ openvr_device

The type of device.

Function Documentation

◆ t_openvr_tracker_create()

struct openvr_tracker * t_openvr_tracker_create ( double  sample_frequency_hz,
enum openvr_device devs,
struct xrt_pose_sink **  sinks,
int  sink_count 
)

Creates an OpenVR tracker.

This creates an OpenVR instance in a separate thread, and reports the tracking data of each device class devs[i] into the pose sink sinks[i] at a rate of sample_frequency.

Parameters
sample_frequency_hzSample frequency of the tracking data in hertz
devsDevices to report tracking data of
sinksWhere to stream the tracking data of each device in devs to
sink_countNumber of sinks/devices to track
Returns
struct openvr_tracker* if successfully created, null otherwise.

References U_LOG_W.