Monado OpenXR Runtime
Multi device wrapper driver

Driver that can wrap multiple devices, for example to override tracking. More...

Collaboration diagram for Multi device wrapper driver:

Files

file  multi.c
 Combination of multiple xrt_device.
 
file  multi.h
 Combination of multiple xrt_device.
 

Functions

struct xrt_devicemulti_create_tracking_override (enum xrt_tracking_override_type override_type, struct xrt_device *tracking_override_target, struct xrt_device *tracking_override_tracker, enum xrt_input_name tracking_override_input_name, struct xrt_pose *offset)
 Create a device that takes ownership of the target device and mimics it. More...
 

Detailed Description

Driver that can wrap multiple devices, for example to override tracking.

Function Documentation

◆ multi_create_tracking_override()

struct xrt_device * multi_create_tracking_override ( enum xrt_tracking_override_type  override_type,
struct xrt_device tracking_override_target,
struct xrt_device tracking_override_tracker,
enum xrt_input_name  tracking_override_input_name,
struct xrt_pose offset 
)

#include <drivers/multi_wrapper/multi.h>

Create a device that takes ownership of the target device and mimics it.

Does not take ownership of the tracker device, one can be assigned to multiple targets.

The pose provided by get_tracked_pose will be provided by the tracker device.

Parameters
override_typeThe kind of override this wrapper device will provide.
tracking_override_targetAn existing device that will be mimicked by the created device.
tracking_override_trackerAn existing device that will be used to provide tracking data.
tracking_override_input_nameThe input name of the tracker device. XRT_INPUT_GENERIC_TRACKER_POSE for generic trackers.
offsetA static offset describing the real world transform from the "tracked point" of the target device to the "tracked point" of the tracker device. A tracking sensors attached .1m above the HMD "center" sets y = 0.1.

References xrt_device::get_tracked_pose, xrt_pose::math_pose_invert(), xrt_device::tracking_origin, and U_TYPED_CALLOC.