The open source OpenXR runtime
at main 60 lines 1.4 kB view raw
1// Copyright 2020-2021, Collabora, Ltd. 2// SPDX-License-Identifier: BSL-1.0 3/*! 4 * @file 5 * @brief Interface to camera based hand tracking driver code. 6 * @author Christoph Haag <christoph.haag@collabora.com> 7 * @author Moshi Turner <moshiturner@protonmail.com> 8 * @ingroup drv_ht 9 */ 10 11#pragma once 12 13#include "xrt/xrt_device.h" 14#include "xrt/xrt_config_drivers.h" 15 16#include "tracking/t_tracking.h" 17#include "tracking/t_hand_tracking.h" 18#include "xrt/xrt_prober.h" 19#include "xrt/xrt_tracking.h" 20 21 22#ifdef __cplusplus 23extern "C" { 24#endif 25 26/*! 27 * @defgroup drv_ht Camera based hand tracking 28 * @ingroup drv 29 * 30 * @brief Camera based hand tracking 31 */ 32 33/*! 34 * Create hand tracker. 35 * 36 * @ingroup drv_ht 37 * 38 * @param xfctx Frame context to attach the tracker to 39 * @param calib Calibration struct for stereo camera 40 * @param create_info Additional creation options 41 * @param out_sinks Sinks to stream camera data to 42 * @param out_device Newly created hand tracker "device" 43 * @return int 0 on success 44 */ 45int 46ht_device_create(struct xrt_frame_context *xfctx, 47 struct t_stereo_camera_calibration *calib, 48 struct t_hand_tracking_create_info create_info, 49 struct xrt_slam_sinks **out_sinks, 50 struct xrt_device **out_device); 51 52 53/*! 54 * @dir drivers/ht 55 * 56 * @brief @ref drv_ht files. 57 */ 58#ifdef __cplusplus 59} 60#endif