Monado OpenXR Runtime
rift_s_hmd.h
Go to the documentation of this file.
1/*
2 * Copyright 2013, Fredrik Hultin.
3 * Copyright 2013, Jakob Bornecrantz.
4 * Copyright 2016 Philipp Zabel
5 * Copyright 2019-2022 Jan Schmidt
6 * SPDX-License-Identifier: BSL-1.0
7 */
8
9/*!
10 * @file
11 * @brief Interface to the Oculus Rift S HMD driver code.
12 * @author Jan Schmidt <jan@centricular.com>
13 * @ingroup drv_rift_s
14 */
15
16#pragma once
17
18#include "math/m_imu_3dof.h"
20#include "xrt/xrt_defines.h"
21#include "xrt/xrt_device.h"
22
23#include "rift_s.h"
24
25/* Oculus Rift S HMD Internal Interface */
26#ifndef RIFT_S_HMD_H
27#define RIFT_S_HMD_H
28
30{
31 struct xrt_device base;
32
33 struct rift_s_system *sys;
34 /* HMD config info (belongs to the system, which we have a ref to */
35 struct rift_s_hmd_config *config;
36
37 /* Pose tracker provided by the system */
38 struct rift_s_tracker *tracker;
39
40 /* Tracking to extend 32-bit HMD time to 64-bit nanoseconds */
41 uint32_t last_imu_timestamp32; /* 32-bit µS device timestamp */
43
44 /* Auxiliary state */
45 float temperature;
46 bool display_on;
47
48 /* Temporary distortion values for mesh calc */
49 struct u_panotools_values distortion_vals[2];
50};
51
52struct rift_s_hmd *
53rift_s_hmd_create(struct rift_s_system *sys, const unsigned char *hmd_serial_no, struct rift_s_hmd_config *config);
54void
55rift_s_hmd_handle_report(struct rift_s_hmd *hmd, timepoint_ns local_ts, rift_s_hmd_report_t *report);
56void
57rift_s_hmd_set_proximity(struct rift_s_hmd *hmd, bool prox_sensor);
58
59#endif
int64_t timepoint_ns
Integer timestamp type.
Definition: u_time.h:70
A IMU fusion specially made for 3dof devices.
Oculus Rift S Driver Internal Interface.
Definition: rift_s.h:56
Definition: rift_s_protocol.h:163
Definition: rift_s_hmd.h:30
Definition: rift_s.h:75
Definition: rift_s_tracker.h:42
uint64_t last_imu_timestamp_ns
When did we get the last IMU sample, device clock.
Definition: rift_s_tracker.h:60
Values to create a distortion mesh from panotools values.
Definition: u_distortion_mesh.h:36
A single HMD or input device.
Definition: xrt_device.h:241
Code to generate disortion meshes.
Common defines and enums for XRT.
Header defining an xrt display or controller device.