Monado OpenXR Runtime
xrt_settings.h
Go to the documentation of this file.
1// Copyright 2020, Collabora, Ltd.
2// SPDX-License-Identifier: BSL-1.0
3/*!
4 * @file
5 * @brief Common settings structs to be transferred between different parts of
6 * Monado, mainly for tracking and camera usage.
7 * @author Jakob Bornecrantz <jakob@collabora.com>
8 * @ingroup xrt_iface
9 */
10
11#pragma once
12
13#include "xrt/xrt_compiler.h"
14
15// XRT_DEVICE_NAME_LEN
16#include "xrt/xrt_device.h"
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
22
23/*!
24 * @addtogroup xrt_iface
25 * @{
26 */
27
28/*!
29 * Camera type.
30 */
32{
33 XRT_SETTINGS_CAMERA_TYPE_REGULAR_MONO = 0,
34 XRT_SETTINGS_CAMERA_TYPE_REGULAR_SBS = 1, // side-by-side
35 XRT_SETTINGS_CAMERA_TYPE_SLAM = 2,
36 XRT_SETTINGS_CAMERA_TYPE_PS4 = 3,
37 XRT_SETTINGS_CAMERA_TYPE_LEAP_MOTION = 4,
38};
39
40#define XRT_SETTINGS_CAMERA_NAME_LENGTH 256
41#define XRT_SETTINGS_PATH_LENGTH 1024
42
43#define XRT_MAX_TRACKING_OVERRIDES 16
44
45/*!
46 * Tracking override type.
47 */
49{
50 XRT_TRACKING_OVERRIDE_DIRECT = 0,
51 XRT_TRACKING_OVERRIDE_ATTACHED,
52};
53
55{
56 char target_device_serial[XRT_DEVICE_NAME_LEN];
57 char tracker_device_serial[XRT_DEVICE_NAME_LEN];
58 enum xrt_input_name input_name;
59 struct xrt_pose offset;
60 enum xrt_tracking_override_type override_type;
61};
62
63/*!
64 * Holding enough information to recreate a tracking pipeline.
65 */
67{
68 char camera_name[XRT_SETTINGS_CAMERA_NAME_LENGTH];
69 int camera_mode;
70 enum xrt_settings_camera_type camera_type;
71 char calibration_path[XRT_SETTINGS_PATH_LENGTH];
72};
73
74/*!
75 * @}
76 */
77
78
79#ifdef __cplusplus
80}
81#endif
xrt_input_name
Every internal input source known to monado with a baked in type.
Definition: xrt_defines.h:1301
xrt_settings_camera_type
Camera type.
Definition: xrt_settings.h:32
xrt_tracking_override_type
Tracking override type.
Definition: xrt_settings.h:49
A pose composed of a position and orientation.
Definition: xrt_defines.h:465
Holding enough information to recreate a tracking pipeline.
Definition: xrt_settings.h:67
Definition: xrt_settings.h:55
Header holding common defines.
Header defining an xrt display or controller device.