The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at v21.0.0 95 lines 1.3 kB view raw
1// Copyright 2020, Collabora, Ltd. 2// SPDX-License-Identifier: BSL-1.0 3/*! 4 * @file 5 * @brief Internal stuff in remote driver. 6 * @author Jakob Bornecrantz <jakob@collabora.com> 7 * @ingroup drv_remote 8 */ 9 10#pragma once 11 12#include "xrt/xrt_device.h" 13#include "xrt/xrt_tracking.h" 14 15#include "os/os_threading.h" 16 17#include "util/u_hand_tracking.h" 18 19#include "r_interface.h" 20 21#ifdef __cplusplus 22extern "C" { 23#endif 24 25 26/*! 27 * Central object remote object. 28 * 29 * @ingroup drv_remote 30 */ 31struct r_hub 32{ 33 struct xrt_tracking_origin base; 34 35 //! Connection to the controller. 36 struct r_remote_connection rc; 37 38 //! The data that the is the reset position. 39 struct r_remote_data reset; 40 41 //! The latest data received. 42 struct r_remote_data latest; 43 44 45 int accept_fd; 46 47 uint16_t port; 48 49 struct os_thread_helper oth; 50 51 struct 52 { 53 bool hmd, left, right; 54 } gui; 55}; 56 57/*! 58 * HMD 59 * 60 * @ingroup drv_remote 61 */ 62struct r_hmd 63{ 64 struct xrt_device base; 65 66 struct r_hub *r; 67}; 68 69/*! 70 * Device 71 * 72 * @ingroup drv_remote 73 */ 74struct r_device 75{ 76 struct xrt_device base; 77 78 struct r_hub *r; 79 80 struct u_hand_tracking hand_tracking; 81 82 bool is_left; 83}; 84 85 86struct xrt_device * 87r_hmd_create(struct r_hub *r); 88 89struct xrt_device * 90r_device_create(struct r_hub *r, bool is_left); 91 92 93#ifdef __cplusplus 94} 95#endif