Monado OpenXR Runtime
Loading...
Searching...
No Matches
b_hand_tracker.h
Go to the documentation of this file.
1// Copyright 2026, NVIDIA CORPORATION.
2// SPDX-License-Identifier: BSL-1.0
3/*!
4 * @file
5 * @brief Base implementation factory for @ref xrt_hand_tracker.
6 * @ingroup base
7 */
8
9#pragma once
10
12#include "xrt/xrt_system.h"
13
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19/*!
20 * Callback used by @ref b_hand_tracker_create_with_cb to provide an
21 * ordered list of devices to try for @p input_name.
22 *
23 * @param input_name Hand-tracking input being resolved.
24 * @param xsysd System devices object that owns the static device list.
25 * @param data Private callback data.
26 * @param in_xdev_count Maximum number of devices that fit in @p out_xdevs.
27 * @param out_xdevs Caller-provided array to fill with devices in priority order.
28 * @param out_xdev_count Number of devices written to @p out_xdevs.
29 *
30 * @ingroup base
31 */
33 struct xrt_system_devices *xsysd,
34 void *data,
35 uint32_t in_xdev_count,
36 struct xrt_device **out_xdevs,
37 uint32_t *out_xdev_count);
38
39/*!
40 * Create a base hand tracker from system devices.
41 *
42 * @ingroup base
43 */
46 const struct xrt_hand_tracker_create_info *info,
47 struct xrt_hand_tracker **out_xht);
48
49/*!
50 * Create a base hand tracker that uses a callback to provide other devices to
51 * try first.
52 *
53 * If a locked device is supplied in @p info, locked mode takes precedence.
54 * Otherwise this selects @ref HandTrackerMode::Callback, defined and described
55 * in b_hand_tracker.hpp, and uses @p get_devices to resolve its inputs.
56 *
57 * @ingroup base
58 */
61 const struct xrt_hand_tracker_create_info *info,
63 void *data,
64 struct xrt_hand_tracker **out_xht);
65
66#ifdef __cplusplus
67}
68#endif
xrt_result_t b_hand_tracker_create(struct xrt_system_devices *xsysd, const struct xrt_hand_tracker_create_info *info, struct xrt_hand_tracker **out_xht)
Create a base hand tracker from system devices.
xrt_result_t b_hand_tracker_create_with_cb(struct xrt_system_devices *xsysd, const struct xrt_hand_tracker_create_info *info, b_hand_tracker_get_devices_func_t get_devices, void *data, struct xrt_hand_tracker **out_xht)
Create a base hand tracker that uses a callback to provide other devices to try first.
xrt_result_t(* b_hand_tracker_get_devices_func_t)(enum xrt_input_name input_name, struct xrt_system_devices *xsysd, void *data, uint32_t in_xdev_count, struct xrt_device **out_xdevs, uint32_t *out_xdev_count)
Callback used by b_hand_tracker_create_with_cb to provide an ordered list of devices to try for input...
Definition b_hand_tracker.h:32
xrt_input_name
Every internal input source known to monado with a baked in type.
Definition xrt_defines.h:930
enum xrt_result xrt_result_t
Result type used across Monado.
A single HMD or input device.
Definition xrt_device.h:311
Creation parameters for xrt_hand_tracker.
Definition xrt_hand_tracker.h:35
A hand tracker that owns device/source selection policy.
Definition xrt_hand_tracker.h:76
A collection of xrt_device, and an interface for identifying the roles they have been assigned.
Definition xrt_system.h:215
Header defining xrt hand tracker.
Header for system objects.