Monado OpenXR Runtime
Loading...
Searching...
No Matches
rift_sensor_interface.h
Go to the documentation of this file.
1
// Copyright 2025-2026, Beyley Cardellio
2
// SPDX-License-Identifier: BSL-1.0
3
/*!
4
* @file
5
* @brief Interface to Oculus Rift sensor probing/initialization
6
* @author Beyley Cardellio <ep1cm1n10n123@gmail.com>
7
* @ingroup drv_rift_sensor
8
*/
9
10
#pragma once
11
12
#include "
rift/rift_interface.h
"
13
14
#include "
tracking/t_camera_models.h
"
15
16
17
#define RIFT_SENSOR_CLOCK_FREQ (40000000)
18
// @todo Remove when clang-format is updated in CI
19
// clang-format off
20
#define RIFT_SENSOR_CLOCK_TO_NS(x) ((timepoint_ns)(x) * 1000 / 40)
21
// clang-format on
22
#define RIFT_SENSOR_WIDTH 1280
23
#define RIFT_SENSOR_HEIGHT 960
24
#define RIFT_SENSOR_FRAME_SIZE (RIFT_SENSOR_WIDTH * RIFT_SENSOR_HEIGHT)
25
26
struct
rift_sensor
;
27
struct
rift_sensor_context
;
28
29
int
30
rift_sensor_context_create(
struct
rift_sensor_context
**out_context,
struct
xrt_frame_context
*xfctx);
31
32
int
33
rift_sensor_enable_exposure_sync(
struct
rift_sensor_context
*context,
struct
rift_sensor
*sensor, uint8_t radio_id[5]);
34
35
int
36
rift_sensor_context_start(
struct
rift_sensor_context
*context);
37
38
ssize_t
39
rift_sensor_context_get_sensors(
struct
rift_sensor_context
*context,
struct
rift_sensor
***out_sensors);
40
41
struct
xrt_fs
*
42
rift_sensor_get_frame_server(
struct
rift_sensor
*sensor);
43
44
enum
rift_variant
45
rift_sensor_get_variant(
struct
rift_sensor
*sensor);
46
47
void
48
rift_sensor_get_calibration(
struct
rift_sensor
*sensor,
struct
t_camera_calibration
*out_calibration);
49
50
void
51
rift_sensor_setup_frame_timestamp_callback(
struct
rift_sensor
*sensor,
struct
rift_hmd
*hmd);
rift_interface.h
Interface to Oculus Rift driver code.
rift_hmd
A rift HMD device.
Definition
rift_internal.h:825
rift_sensor_context
Definition
rift_sensor_internal.h:20
rift_sensor
Definition
rift_sensor_internal.h:33
t_camera_calibration
Essential calibration data for a single camera, or single lens/sensor of a stereo camera.
Definition
t_tracking.h:236
xrt_frame_context
Object used to track all sinks and frame producers in a graph.
Definition
xrt_frame.h:108
xrt_fs
Frameserver that generates frames.
Definition
xrt_frameserver.h:70
t_camera_models.h
Simple, untemplated, C, float-only, camera (un)projection functions for various camera models.
drivers
rift_sensor
rift_sensor_interface.h
Generated by
1.9.8