Monado OpenXR Runtime
t_vit_loader.h
Go to the documentation of this file.
1// Copyright 2023, Collabora, Ltd.
2// SPDX-License-Identifier: BSL-1.0
3/*!
4 * @file
5 * @brief Visual-Inertial Tracking consumer helper.
6 * @author Jakob Bornecrantz <jakob@collabora.com>
7 * @author Simon Zeni <simon.zeni@collabora.com>
8 * @ingroup aux_tracking
9 */
10
11#pragma once
12
13#include "vit/vit_interface.h"
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19/*!
20 * A bundle of VIT interface functions, used by the tracking interface loader.
21 *
22 * @ingroup aux_tracking
23 */
25{
26 void *handle;
27
28 struct
29 {
30 uint32_t major;
31 uint32_t minor;
32 uint32_t patch;
33 } version;
34
35 PFN_vit_api_get_version api_get_version;
36 PFN_vit_tracker_create tracker_create;
37 PFN_vit_tracker_destroy tracker_destroy;
38 PFN_vit_tracker_has_image_format tracker_has_image_format;
39 PFN_vit_tracker_get_supported_extensions tracker_get_supported_extensions;
40 PFN_vit_tracker_get_enabled_extensions tracker_get_enabled_extensions;
41 PFN_vit_tracker_enable_extension tracker_enable_extension;
42 PFN_vit_tracker_start tracker_start;
43 PFN_vit_tracker_stop tracker_stop;
44 PFN_vit_tracker_reset tracker_reset;
45 PFN_vit_tracker_is_running tracker_is_running;
46 PFN_vit_tracker_push_imu_sample tracker_push_imu_sample;
47 PFN_vit_tracker_push_img_sample tracker_push_img_sample;
48 PFN_vit_tracker_add_imu_calibration tracker_add_imu_calibration;
49 PFN_vit_tracker_add_camera_calibration tracker_add_camera_calibration;
50 PFN_vit_tracker_pop_pose tracker_pop_pose;
51 PFN_vit_tracker_get_timing_titles tracker_get_timing_titles;
52 PFN_vit_pose_destroy pose_destroy;
53 PFN_vit_pose_get_data pose_get_data;
54 PFN_vit_pose_get_timing pose_get_timing;
55 PFN_vit_pose_get_features pose_get_features;
56};
57
58/*!
59 * Load the tracker.
60 *
61 * @ingroup aux_tracking
62 */
63bool
64t_vit_bundle_load(struct t_vit_bundle *vit, const char *path);
65
66/*!
67 * Unload the tracker.
68 *
69 * @ingroup aux_tracking
70 */
71void
73
74
75#ifdef __cplusplus
76}
77#endif
void t_vit_bundle_unload(struct t_vit_bundle *vit)
Unload the tracker.
Definition: t_vit_loader.c:99
bool t_vit_bundle_load(struct t_vit_bundle *vit, const char *path)
Load the tracker.
Definition: t_vit_loader.c:41
A bundle of VIT interface functions, used by the tracking interface loader.
Definition: t_vit_loader.h:25