Blender  V3.3
DNA_xr_types.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
7 #pragma once
8 
9 #include "DNA_view3d_types.h"
10 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 
15 /* -------------------------------------------------------------------- */
16 
17 typedef struct XrSessionSettings {
19  struct View3DShading shading;
20 
21  float base_scale;
22  char _pad[3];
23  char base_pose_type; /* #eXRSessionBasePoseType */
28 
30  char draw_flags;
33  char _pad2[2];
34 
37 
38  int flag;
39 
44 
45 typedef enum eXrSessionFlag {
49 
50 typedef enum eXRSessionBasePoseType {
55 
62 
64 typedef enum eXrActionType {
71 
73 typedef enum eXrOpFlag {
78 
79 typedef enum eXrActionFlag {
81  XR_ACTION_BIMANUAL = (1 << 0),
83 
84 typedef enum eXrHapticFlag {
91  XR_HAPTIC_PRESS = (1 << 1),
92  XR_HAPTIC_RELEASE = (1 << 2),
93  XR_HAPTIC_REPEAT = (1 << 3),
95 
100 typedef enum eXrAxisFlag {
101  XR_AXIS0_POS = (1 << 0),
102  XR_AXIS0_NEG = (1 << 1),
103  XR_AXIS1_POS = (1 << 2),
104  XR_AXIS1_NEG = (1 << 3),
106 
107 typedef enum eXrPoseFlag {
108  /* Pose represents controller grip/aim. */
109  XR_POSE_GRIP = (1 << 0),
110  XR_POSE_AIM = (1 << 1),
112 
120 #define XR_MAX_USER_PATH_LENGTH 64
121 #define XR_MAX_COMPONENT_PATH_LENGTH 192
122 
123 /* -------------------------------------------------------------------- */
124 
125 typedef struct XrComponentPath {
127  char path[192]; /* XR_MAX_COMPONENT_PATH_LENGTH */
129 
130 typedef struct XrActionMapBinding {
132 
134  char name[64]; /* MAX_NAME */
135 
137  char profile[256];
139  ListBase component_paths; /* XrComponentPath */
140 
143  short axis_flag; /* eXrAxisFlag */
144  char _pad[2];
145 
147  float pose_location[3];
148  float pose_rotation[3];
150 
151 /* -------------------------------------------------------------------- */
152 
153 typedef struct XrUserPath {
154  struct XrUserPath *next, *prev;
155  char path[64]; /* XR_MAX_USER_PATH_LENGTH */
157 
158 typedef struct XrActionMapItem {
160 
162  char name[64]; /* MAX_NAME */
164  char type;
165  char _pad[7];
166 
168  ListBase user_paths; /* XrUserPath */
169 
171  char op[64]; /* OP_MAX_TYPENAME */
176 
177  short op_flag; /* eXrOpFlag */
178  short action_flag; /* eXrActionFlag */
179  short haptic_flag; /* eXrHapticFlag */
180 
182  short pose_flag; /* eXrPoseFlag */
183 
185  char haptic_name[64]; /* MAX_NAME */
189 
190  short selbinding;
191  char _pad3[2];
192  ListBase bindings; /* XrActionMapBinding */
194 
195 /* -------------------------------------------------------------------- */
196 
197 typedef struct XrActionMap {
198  struct XrActionMap *next, *prev;
199 
201  char name[64]; /* MAX_NAME */
202 
203  ListBase items; /* XrActionMapItem */
204  short selitem;
205  char _pad[6];
207 
208 /* -------------------------------------------------------------------- */
209 
210 #ifdef __cplusplus
211 }
212 #endif
eXrOpFlag
Definition: DNA_xr_types.h:73
@ XR_OP_MODAL
Definition: DNA_xr_types.h:76
@ XR_OP_RELEASE
Definition: DNA_xr_types.h:75
@ XR_OP_PRESS
Definition: DNA_xr_types.h:74
eXrPoseFlag
Definition: DNA_xr_types.h:107
@ XR_POSE_GRIP
Definition: DNA_xr_types.h:109
@ XR_POSE_AIM
Definition: DNA_xr_types.h:110
struct XrSessionSettings XrSessionSettings
struct XrActionMap XrActionMap
eXrAxisFlag
Definition: DNA_xr_types.h:100
@ XR_AXIS0_POS
Definition: DNA_xr_types.h:101
@ XR_AXIS1_NEG
Definition: DNA_xr_types.h:104
@ XR_AXIS1_POS
Definition: DNA_xr_types.h:103
@ XR_AXIS0_NEG
Definition: DNA_xr_types.h:102
eXrSessionFlag
Definition: DNA_xr_types.h:45
@ XR_SESSION_USE_ABSOLUTE_TRACKING
Definition: DNA_xr_types.h:47
@ XR_SESSION_USE_POSITION_TRACKING
Definition: DNA_xr_types.h:46
eXrSessionControllerDrawStyle
Definition: DNA_xr_types.h:56
@ XR_CONTROLLER_DRAW_LIGHT_RAY
Definition: DNA_xr_types.h:60
@ XR_CONTROLLER_DRAW_LIGHT
Definition: DNA_xr_types.h:58
@ XR_CONTROLLER_DRAW_DARK_RAY
Definition: DNA_xr_types.h:59
@ XR_CONTROLLER_DRAW_DARK
Definition: DNA_xr_types.h:57
struct XrActionMapItem XrActionMapItem
eXrActionType
Definition: DNA_xr_types.h:64
@ XR_FLOAT_INPUT
Definition: DNA_xr_types.h:66
@ XR_BOOLEAN_INPUT
Definition: DNA_xr_types.h:65
@ XR_VECTOR2F_INPUT
Definition: DNA_xr_types.h:67
@ XR_POSE_INPUT
Definition: DNA_xr_types.h:68
@ XR_VIBRATION_OUTPUT
Definition: DNA_xr_types.h:69
eXRSessionBasePoseType
Definition: DNA_xr_types.h:50
@ XR_BASE_POSE_CUSTOM
Definition: DNA_xr_types.h:53
@ XR_BASE_POSE_SCENE_CAMERA
Definition: DNA_xr_types.h:51
@ XR_BASE_POSE_OBJECT
Definition: DNA_xr_types.h:52
eXrActionFlag
Definition: DNA_xr_types.h:79
@ XR_ACTION_BIMANUAL
Definition: DNA_xr_types.h:81
struct XrActionMapBinding XrActionMapBinding
struct XrUserPath XrUserPath
struct XrComponentPath XrComponentPath
eXrHapticFlag
Definition: DNA_xr_types.h:84
@ XR_HAPTIC_PRESS
Definition: DNA_xr_types.h:91
@ XR_HAPTIC_RELEASE
Definition: DNA_xr_types.h:92
@ XR_HAPTIC_MATCHUSERPATHS
Definition: DNA_xr_types.h:86
@ XR_HAPTIC_REPEAT
Definition: DNA_xr_types.h:93
struct XrActionMapBinding * next
Definition: DNA_xr_types.h:131
float pose_location[3]
Definition: DNA_xr_types.h:147
ListBase component_paths
Definition: DNA_xr_types.h:139
struct XrActionMapBinding * prev
Definition: DNA_xr_types.h:131
float pose_rotation[3]
Definition: DNA_xr_types.h:148
ListBase bindings
Definition: DNA_xr_types.h:192
struct XrActionMapItem * prev
Definition: DNA_xr_types.h:159
float haptic_amplitude
Definition: DNA_xr_types.h:188
float haptic_frequency
Definition: DNA_xr_types.h:187
struct XrActionMapItem * next
Definition: DNA_xr_types.h:159
IDProperty * op_properties
Definition: DNA_xr_types.h:173
char haptic_name[64]
Definition: DNA_xr_types.h:185
ListBase user_paths
Definition: DNA_xr_types.h:168
struct PointerRNA * op_properties_ptr
Definition: DNA_xr_types.h:175
ListBase items
Definition: DNA_xr_types.h:203
char name[64]
Definition: DNA_xr_types.h:201
char _pad[6]
Definition: DNA_xr_types.h:205
struct XrActionMap * next
Definition: DNA_xr_types.h:198
struct XrActionMap * prev
Definition: DNA_xr_types.h:198
char path[192]
Definition: DNA_xr_types.h:127
struct XrComponentPath * next
Definition: DNA_xr_types.h:126
struct XrComponentPath * prev
Definition: DNA_xr_types.h:126
int object_type_exclude_select
Definition: DNA_xr_types.h:42
float base_pose_location[3]
Definition: DNA_xr_types.h:26
Object * base_pose_object
Definition: DNA_xr_types.h:25
int object_type_exclude_viewport
Definition: DNA_xr_types.h:41
char controller_draw_style
Definition: DNA_xr_types.h:32
struct View3DShading shading
Definition: DNA_xr_types.h:19
struct XrUserPath * next
Definition: DNA_xr_types.h:154
char path[64]
Definition: DNA_xr_types.h:155
struct XrUserPath * prev
Definition: DNA_xr_types.h:154