Monado OpenXR Runtime
multi.h
Go to the documentation of this file.
1 // Copyright 2021, Collabora, Ltd.
2 // SPDX-License-Identifier: BSL-1.0
3 /*!
4  * @file
5  * @brief Combination of multiple @ref xrt_device.
6  * @author Christoph Haag <christoph.haag@collabora.com>
7  * @ingroup drv_multi
8  */
9 
10 #pragma once
11 
12 #include "xrt/xrt_defines.h"
13 #include "xrt/xrt_device.h"
14 #include "xrt/xrt_settings.h"
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
20 
21 /*!
22  * @defgroup drv_multi Multi device wrapper driver
23  * @ingroup drv
24  *
25  * @brief Driver that can wrap multiple devices, for example to override tracking.
26  */
27 
28 /*!
29  * Create a device that takes ownership of the target device and mimics it.
30  *
31  * Does not take ownership of the tracker device, one can be assigned to multiple targets.
32  *
33  * The pose provided by get_tracked_pose will be provided by the tracker device.
34  *
35  * @param override_type The kind of override this wrapper device will provide.
36  * @param tracking_override_target An existing device that will be mimiced by the created device.
37  * @param tracking_override_tracker An existing device that will be used to provide tracking data.
38  * @param tracking_override_input_name The input name of the tracker device. XRT_INPUT_GENERIC_TRACKER_POSE for generic
39  * trackers.
40  * @param offset A static offset describing the real world transform from the "tracked point" of the target device to
41  * the "tracked point" of the tracker device. A tracking sensors attached .1m above the HMD "center" sets y = 0.1.
42  *
43  * @ingroup drv_multi
44  */
45 struct xrt_device *
47  struct xrt_device *tracking_override_target,
48  struct xrt_device *tracking_override_tracker,
49  enum xrt_input_name tracking_override_input_name,
50  struct xrt_pose *offset);
51 
52 #ifdef __cplusplus
53 }
54 #endif
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)
Create a device that takes ownership of the target device and mimics it.
Definition: multi.c:222
xrt_input_name
Every internal input source known to monado with a baked in type.
Definition: xrt_defines.h:1134
xrt_tracking_override_type
Tracking override type.
Definition: xrt_settings.h:49
A single HMD or input device.
Definition: xrt_device.h:230
A pose composed of a position and orientation.
Definition: xrt_defines.h:465
Common defines and enums for XRT.
Header defining an xrt display or controller device.
Common settings structs to be transferred between different parts of Monado, mainly for tracking and ...