Monado OpenXR Runtime
encoding.h
Go to the documentation of this file.
1// Copyright 2019-2022, Collabora, Ltd.
2// SPDX-License-Identifier: BSL-1.0
3/*!
4 * @file
5 * @brief Defines for OpenGloves internal inputs
6 * @author Daniel Willmott <web@dan-w.com>
7 * @ingroup drv_opengloves
8 */
9
10#pragma once
11#include <stdbool.h>
12
13#define OPENGLOVES_ENCODING_MAX_ANALOG_VALUE 1023.0f
14#define OPENGLOVES_ENCODING_MAX_PACKET_SIZE 150
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20
22{
23 float value;
24 bool pressed;
25};
26
28{
29 float x;
30 float y;
31 bool pressed;
32};
33
35{
36 bool activated;
37};
38
40{
43 struct opengloves_input_button trigger;
44 struct opengloves_input_button menu;
45};
46
48{
49 struct opengloves_input_joystick main;
50};
51
53{
54 struct opengloves_input_gesture grab;
55 struct opengloves_input_gesture pinch;
56};
57
58
60{
61 float flexion[5][5];
62 float splay[5];
63
64 struct opengloves_input_joysticks joysticks;
65 struct opengloves_input_buttons buttons;
66 struct opengloves_input_gestures gestures;
67};
68
70{
71 float thumb;
72 float index;
73 float middle;
74 float ring;
75 float little;
76};
77
79{
80 struct opengloves_output_force_feedback force_feedback;
81};
82
83#ifdef __cplusplus
84}
85#endif
Definition: encoding.h:22
Definition: encoding.h:40
Definition: encoding.h:35
Definition: encoding.h:53
Definition: encoding.h:28
Definition: encoding.h:48
Definition: encoding.h:60
Definition: encoding.h:70
Definition: encoding.h:79