Monado OpenXR Runtime
xrt_space.h
Go to the documentation of this file.
1// Copyright 2019-2023, Collabora, Ltd.
2// SPDX-License-Identifier: BSL-1.0
3/*!
4 * @file
5 * @brief Header defining xrt space and space overseer.
6 * @author Jakob Bornecrantz <jakob@collabora.com>
7 * @ingroup xrt_iface
8 */
9
10#pragma once
11
12#include "xrt/xrt_defines.h"
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
18#define XRT_MAX_CLIENT_SPACES 128
19struct xrt_device;
21
22/*!
23 * A space very similar to a OpenXR XrSpace but not a full one-to-one mapping,
24 * but used to power XrSpace.
25 *
26 * @see @ref xrt_space_overseer
27 * @see @ref design-spaces
28 * @ingroup xrt_iface
29 */
31{
32 /*!
33 * Reference helper.
34 */
36
37 /*!
38 * Destroy function.
39 */
40 void (*destroy)(struct xrt_space *xs);
41};
42
43/*!
44 * Update the reference counts on space(s).
45 *
46 * @param[in,out] dst Pointer to a object reference: if the object reference is
47 * non-null will decrement its counter. The reference that
48 * @p dst points to will be set to @p src.
49 * @param[in] src New object for @p dst to refer to (may be null).
50 * If non-null, will have its refcount increased.
51 * @ingroup xrt_iface
52 * @relates xrt_space
53 */
54static inline void
55xrt_space_reference(struct xrt_space **dst, struct xrt_space *src)
56{
57 struct xrt_space *old_dst = *dst;
58
59 if (old_dst == src) {
60 return;
61 }
62
63 if (src) {
65 }
66
67 *dst = src;
68
69 if (old_dst) {
71 old_dst->destroy(old_dst);
72 }
73 }
74}
75
76/*!
77 * Object that oversees and manages spaces, one created for each XR system.
78 *
79 * The space overseer is used by the state tracker to query the poses of spaces
80 * and devices in that space system. While the default implementation
81 * @ref u_space_overseer implements the spaces as a graph of relatable spaces,
82 * that is a implementation detail (the interface also lends itself to that
83 * since bases have parents). As such the graph is not exposed in this interface
84 * and spaces are technically free floating.
85 *
86 * One advantage of the free floating nature is that an overseer implementation
87 * has much greater flexibility in configuring the graph to fit the current XR
88 * system the best, it also have freedom to reconfigure the graph at runtime
89 * should that be needed. Since any potential graph isn't exposed there is no
90 * need to synchronise it across the app process and the service process.
91 *
92 * @see @ref design-spaces
93 * @ingroup xrt_iface
94 */
96{
97 struct
98 {
99 struct xrt_space *root; //!< Root space, always available
100 struct xrt_space *view; //!< View space, may be null (in very rare cases).
101 struct xrt_space *local; //!< Local space, may be null (in very rare cases).
102 struct xrt_space *local_floor; //!< Local floor space, may be null.
103 struct xrt_space *stage; //!< Stage space, may be null.
104 struct xrt_space *unbounded; //!< Unbounded space, only here for slam trackers.
105
106 /*!
107 * Semantic spaces to be mapped to OpenXR spaces.
108 */
109 } semantic;
110
111 //! Ptrs to the localspace
112 struct xrt_space *localspace[XRT_MAX_CLIENT_SPACES];
113 //! Ptrs to the localfloorspace
114 struct xrt_space *localfloorspace[XRT_MAX_CLIENT_SPACES];
115
116 /*!
117 * Create a space with a fixed offset to the parent space.
118 *
119 * @param[in] xso Owning space overseer.
120 * @param[in] parent The parent space for the new space.
121 * @param[in] offset Offset to the space.
122 * @param[out] out_space The newly created space.
123 */
125 struct xrt_space *parent,
126 const struct xrt_pose *offset,
127 struct xrt_space **out_space);
128
129 /*!
130 * Create a space that wraps the @p xdev input pose described by input
131 * @p name, implicitly make the device's tracking space the parent of
132 * the created space. The name pose_space was chosen because while most
133 * input poses are part of the device, they may also be things tracked
134 * by the device. The important part is that the space is following the
135 * pose, that it happens to be attached to device is coincidental.
136 *
137 * @param[in] xso Owning space overseer.
138 * @param[in] xdev Device to get the pose from.
139 * @param[in] name Name of the pose input.
140 * @param[out] out_space The newly created space.
141 */
143 struct xrt_device *xdev,
144 enum xrt_input_name name,
145 struct xrt_space **out_space);
146
147 /*!
148 * Locate a space in the base space.
149 *
150 * @see xrt_device::get_tracked_pose.
151 *
152 * @param[in] xso Owning space overseer.
153 * @param[in] base_space The space that we want the pose in.
154 * @param[in] base_offset Offset if any to the base space.
155 * @param[in] at_timestamp_ns At which time.
156 * @param[in] space The space to be located.
157 * @param[in] offset Offset if any to the located space.
158 * @param[out] out_relation Resulting pose.
159 */
161 struct xrt_space *base_space,
162 const struct xrt_pose *base_offset,
163 int64_t at_timestamp_ns,
164 struct xrt_space *space,
165 const struct xrt_pose *offset,
166 struct xrt_space_relation *out_relation);
167
168 /*!
169 * Locate spaces in the base space.
170 *
171 * @see xrt_device::get_tracked_pose.
172 *
173 * @param[in] xso Owning space overseer.
174 * @param[in] base_space The space that we want the pose in.
175 * @param[in] base_offset Offset if any to the base space.
176 * @param[in] at_timestamp_ns At which time.
177 * @param[in] spaces The array of pointers to spaces to be located.
178 * @param[in] space_count The number of spaces to locate.
179 * @param[in] offsets Array of offset if any to the located spaces.
180 * @param[out] out_relations Array of resulting poses.
181 */
183 struct xrt_space *base_space,
184 const struct xrt_pose *base_offset,
185 int64_t at_timestamp_ns,
186 struct xrt_space **spaces,
187 uint32_t space_count,
188 const struct xrt_pose *offsets,
189 struct xrt_space_relation *out_relations);
190
191 /*!
192 * Locate a the origin of the tracking space of a device, this is not
193 * the same as the device position. In other words, what is the position
194 * of the space that the device is in, and which it returns its poses
195 * in. Needed to use @ref xrt_device::get_view_poses and
196 * @ref xrt_device::get_hand_tracking.
197 *
198 * @see xrt_device::get_tracked_pose.
199 *
200 * @param[in] xso Owning space overseer.
201 * @param[in] base_space The space that we want the pose in.
202 * @param[in] base_offset Offset if any to the base space.
203 * @param[in] at_timestamp_ns At which time.
204 * @param[in] xdev Device to get the pose from.
205 * @param[out] out_relation Resulting pose.
206 */
208 struct xrt_space *base_space,
209 const struct xrt_pose *base_offset,
210 int64_t at_timestamp_ns,
211 struct xrt_device *xdev,
212 struct xrt_space_relation *out_relation);
213
214 /*!
215 * Increment the usage count of a reference space (aka semantic space).
216 * This lets the overseer know when different spaces are being used,
217 * allowing it to triggering a recenter if the local space is used for
218 * the first time, or stopping calculating where the stage space is if
219 * it is not used by the current application.
220 *
221 * @param[in] xso Owning space overseer.
222 * @param[in] type Which reference space is being referenced.
223 */
225
226 /*!
227 * Decrement the usage count of a reference space (aka semantic space).
228 * See @ref xrt_space_overseer::ref_space_inc.
229 *
230 * @param[in] xso Owning space overseer.
231 * @param[in] type Which reference space is being referenced.
232 */
234
235 /*!
236 * Trigger a re-center of the local and local_floor spaces, not all
237 * implementations of @ref xrt_space_overseer may support recenter. The
238 * recenter operation will normally mean that the local and local_floor
239 * will move to the where the view space currently is.
240 *
241 * @param[in] xso The space overseer.
242 */
244
245 /*!
246 * Read the offset from a tracking origin, not all
247 * implementations of @ref xrt_space_overseer may support this.
248 * Outputs are only valid if XRT_SUCCESS is returned.
249 *
250 * @param[in] xso The space overseer.
251 * @param[in] xto The tracking origin.
252 * @param[out] out_offset Pointer to an xrt_pose to write the offset to
253 */
255 struct xrt_tracking_origin *xto,
256 struct xrt_pose *out_offset);
257
258 /*!
259 * Apply an offset to a tracking origin, not all
260 * implementations of @ref xrt_space_overseer may support this.
261 *
262 * @param[in] xso The space overseer.
263 * @param[in] xto The tracking origin.
264 * @param[in] offset The offset to apply.
265 */
267 struct xrt_tracking_origin *xto,
268 const struct xrt_pose *offset);
269
270 /*!
271 * Read the offset from the given reference space, not all
272 * implementations of @ref xrt_space_overseer may support this.
273 * Outputs are only valid if XRT_SUCCESS is returned.
274 *
275 * @param[in] xso The space overseer.
276 * @param[in] type The reference space.
277 * @param[out] out_offset Pointer to write the offset to.
278 */
280 enum xrt_reference_space_type type,
281 struct xrt_pose *out_offset);
282
283 /*!
284 * Apply an offset to the given reference space, not all
285 * implementations of @ref xrt_space_overseer may support this.
286 *
287 * @param[in] xso The space overseer.
288 * @param[in] type The reference space.
289 * @param[in] offset The offset to apply.
290 */
292 enum xrt_reference_space_type type,
293 const struct xrt_pose *offset);
294
295 /*!
296 * Create a localspace and a localfloorspace.
297 *
298 * @param[in] xso Owning space overseer.
299 * @param[out] out_local_space The newly created localspace.
300 * @param[out] out_local_floor_space The newly created localfloorspace.
301 */
303 struct xrt_space **out_local_space,
304 struct xrt_space **out_local_floor_space);
305
306 /*!
307 * Destroy function.
308 *
309 * @param xso The space overseer.
310 */
311 void (*destroy)(struct xrt_space_overseer *xs);
312};
313
314/*!
315 * @copydoc xrt_space_overseer::create_offset_space
316 *
317 * Helper for calling through the function pointer.
318 *
319 * @public @memberof xrt_space_overseer
320 */
321static inline xrt_result_t
323 struct xrt_space *parent,
324 const struct xrt_pose *offset,
325 struct xrt_space **out_space)
326{
327 return xso->create_offset_space(xso, parent, offset, out_space);
328}
329
330/*!
331 * @copydoc xrt_space_overseer::create_pose_space
332 *
333 * Helper for calling through the function pointer.
334 *
335 * @public @memberof xrt_space_overseer
336 */
337static inline xrt_result_t
339 struct xrt_device *xdev,
340 enum xrt_input_name name,
341 struct xrt_space **out_space)
342{
343 return xso->create_pose_space(xso, xdev, name, out_space);
344}
345
346/*!
347 * @copydoc xrt_space_overseer::locate_space
348 *
349 * Helper for calling through the function pointer.
350 *
351 * @public @memberof xrt_space_overseer
352 */
353static inline xrt_result_t
355 struct xrt_space *base_space,
356 const struct xrt_pose *base_offset,
357 int64_t at_timestamp_ns,
358 struct xrt_space *space,
359 const struct xrt_pose *offset,
360 struct xrt_space_relation *out_relation)
361{
362 return xso->locate_space(xso, base_space, base_offset, at_timestamp_ns, space, offset, out_relation);
363}
364
365/*!
366 * @copydoc xrt_space_overseer::locate_spaces
367 *
368 * Helper for calling through the function pointer.
369 *
370 * @public @memberof xrt_space_overseer
371 */
372static inline xrt_result_t
374 struct xrt_space *base_space,
375 const struct xrt_pose *base_offset,
376 int64_t at_timestamp_ns,
377 struct xrt_space **spaces,
378 uint32_t space_count,
379 const struct xrt_pose *offsets,
380 struct xrt_space_relation *out_relations)
381{
382 return xso->locate_spaces(xso, base_space, base_offset, at_timestamp_ns, spaces, space_count, offsets,
383 out_relations);
384}
385
386/*!
387 * @copydoc xrt_space_overseer::locate_device
388 *
389 * Helper for calling through the function pointer.
390 *
391 * @public @memberof xrt_space_overseer
392 */
393static inline xrt_result_t
395 struct xrt_space *base_space,
396 const struct xrt_pose *base_offset,
397 int64_t at_timestamp_ns,
398 struct xrt_device *xdev,
399 struct xrt_space_relation *out_relation)
400{
401 return xso->locate_device(xso, base_space, base_offset, at_timestamp_ns, xdev, out_relation);
402}
403
404/*!
405 * @copydoc xrt_space_overseer::ref_space_inc
406 *
407 * Helper for calling through the function pointer.
408 *
409 * @public @memberof xrt_space_overseer
410 */
411static inline xrt_result_t
413{
414 return xso->ref_space_inc(xso, type);
415}
416
417/*!
418 * @copydoc xrt_space_overseer::ref_space_dec
419 *
420 * Helper for calling through the function pointer.
421 *
422 * @public @memberof xrt_space_overseer
423 */
424static inline xrt_result_t
426{
427 return xso->ref_space_dec(xso, type);
428}
429
430/*!
431 * @copydoc xrt_space_overseer::recenter_local_spaces
432 *
433 * Helper for calling through the function pointer.
434 *
435 * @public @memberof xrt_space_overseer
436 */
437static inline xrt_result_t
439{
440 return xso->recenter_local_spaces(xso);
441}
442
443/*!
444 * @copydoc xrt_space_overseer::get_tracking_origin_offset
445 *
446 * Helper for calling through the function pointer.
447 *
448 * @public @memberof xrt_space_overseer
449 */
450static inline xrt_result_t
452 struct xrt_tracking_origin *xto,
453 struct xrt_pose *out_offset)
454{
455 return xso->get_tracking_origin_offset(xso, xto, out_offset);
456}
457
458/*!
459 * @copydoc xrt_space_overseer::set_tracking_origin_offset
460 *
461 * Helper for calling through the function pointer.
462 *
463 * @public @memberof xrt_space_overseer
464 */
465static inline xrt_result_t
467 struct xrt_tracking_origin *xto,
468 const struct xrt_pose *offset)
469{
470 return xso->set_tracking_origin_offset(xso, xto, offset);
471}
472
473/*!
474 * @copydoc xrt_space_overseer::get_reference_space_offset
475 *
476 * Helper for calling through the function pointer.
477 *
478 * @public @memberof xrt_space_overseer
479 */
480static inline xrt_result_t
482 enum xrt_reference_space_type type,
483 struct xrt_pose *out_offset)
484{
485 return xso->get_reference_space_offset(xso, type, out_offset);
486}
487
488/*!
489 * @copydoc xrt_space_overseer::set_reference_space_offset
490 *
491 * Helper for calling through the function pointer.
492 *
493 * @public @memberof xrt_space_overseer
494 */
495static inline xrt_result_t
497 enum xrt_reference_space_type type,
498 const struct xrt_pose *offset)
499{
500 return xso->set_reference_space_offset(xso, type, offset);
501}
502
503/*!
504 * @copydoc xrt_space_overseer::create_local_space
505 *
506 * Helper for calling through the function pointer.
507 *
508 * @public @memberof xrt_space_overseer
509 */
510static inline xrt_result_t
512 struct xrt_space **out_local_space,
513 struct xrt_space **out_local_floor_space)
514{
515 return xso->create_local_space(xso, out_local_space, out_local_floor_space);
516}
517
518/*!
519 * Helper for calling through the function pointer: does a null check and sets
520 * xc_ptr to null if freed.
521 *
522 * @see xrt_space_overseer::destroy
523 * @public @memberof xrt_space_overseer
524 */
525static inline void
527{
528 struct xrt_space_overseer *xso = *xso_ptr;
529 if (xso == NULL) {
530 return;
531 }
532
533 xso->destroy(xso);
534 *xso_ptr = NULL;
535}
536
537
538#ifdef __cplusplus
539}
540#endif
static XRT_CHECK_RESULT bool xrt_reference_dec_and_is_zero(struct xrt_reference *xref)
Decrement the reference and return true if the value is now zero.
Definition: xrt_defines.h:2025
xrt_input_name
Every internal input source known to monado with a baked in type.
Definition: xrt_defines.h:1301
enum xrt_result xrt_result_t
Result type used across Monado.
static void xrt_reference_inc(struct xrt_reference *xref)
Increment the reference, probably want xrt_reference_inc_and_was_zero.
Definition: xrt_defines.h:1988
xrt_reference_space_type
Type of a OpenXR mapped reference space, maps to the semantic spaces on the xrt_space_overseer struct...
Definition: xrt_defines.h:599
static void xrt_space_reference(struct xrt_space **dst, struct xrt_space *src)
Update the reference counts on space(s).
Definition: xrt_space.h:55
A single HMD or input device.
Definition: xrt_device.h:241
enum xrt_device_name name
Enum identifier of the device.
Definition: xrt_device.h:243
A pose composed of a position and orientation.
Definition: xrt_defines.h:465
A base class for reference counted objects.
Definition: xrt_defines.h:96
Object that oversees and manages spaces, one created for each XR system.
Definition: xrt_space.h:96
static xrt_result_t xrt_space_overseer_get_tracking_origin_offset(struct xrt_space_overseer *xso, struct xrt_tracking_origin *xto, struct xrt_pose *out_offset)
Read the offset from a tracking origin, not all implementations of xrt_space_overseer may support thi...
Definition: xrt_space.h:451
xrt_result_t(* get_reference_space_offset)(struct xrt_space_overseer *xso, enum xrt_reference_space_type type, struct xrt_pose *out_offset)
Read the offset from the given reference space, not all implementations of xrt_space_overseer may sup...
Definition: xrt_space.h:279
struct xrt_space * unbounded
Unbounded space, only here for slam trackers.
Definition: xrt_space.h:104
struct xrt_space * localspace[128]
Ptrs to the localspace.
Definition: xrt_space.h:112
xrt_result_t(* get_tracking_origin_offset)(struct xrt_space_overseer *xso, struct xrt_tracking_origin *xto, struct xrt_pose *out_offset)
Read the offset from a tracking origin, not all implementations of xrt_space_overseer may support thi...
Definition: xrt_space.h:254
void(* destroy)(struct xrt_space_overseer *xs)
Destroy function.
Definition: xrt_space.h:311
xrt_result_t(* ref_space_dec)(struct xrt_space_overseer *xso, enum xrt_reference_space_type type)
Decrement the usage count of a reference space (aka semantic space).
Definition: xrt_space.h:233
struct xrt_space * local
Local space, may be null (in very rare cases).
Definition: xrt_space.h:101
struct xrt_space * local_floor
Local floor space, may be null.
Definition: xrt_space.h:102
static xrt_result_t xrt_space_overseer_ref_space_dec(struct xrt_space_overseer *xso, enum xrt_reference_space_type type)
Decrement the usage count of a reference space (aka semantic space).
Definition: xrt_space.h:425
xrt_result_t(* create_offset_space)(struct xrt_space_overseer *xso, struct xrt_space *parent, const struct xrt_pose *offset, struct xrt_space **out_space)
Create a space with a fixed offset to the parent space.
Definition: xrt_space.h:124
struct xrt_space * view
View space, may be null (in very rare cases).
Definition: xrt_space.h:100
xrt_result_t(* locate_spaces)(struct xrt_space_overseer *xso, struct xrt_space *base_space, const struct xrt_pose *base_offset, int64_t at_timestamp_ns, struct xrt_space **spaces, uint32_t space_count, const struct xrt_pose *offsets, struct xrt_space_relation *out_relations)
Locate spaces in the base space.
Definition: xrt_space.h:182
static xrt_result_t xrt_space_overseer_set_reference_space_offset(struct xrt_space_overseer *xso, enum xrt_reference_space_type type, const struct xrt_pose *offset)
Apply an offset to the given reference space, not all implementations of xrt_space_overseer may suppo...
Definition: xrt_space.h:496
xrt_result_t(* set_tracking_origin_offset)(struct xrt_space_overseer *xso, struct xrt_tracking_origin *xto, const struct xrt_pose *offset)
Apply an offset to a tracking origin, not all implementations of xrt_space_overseer may support this.
Definition: xrt_space.h:266
static xrt_result_t xrt_space_overseer_locate_spaces(struct xrt_space_overseer *xso, struct xrt_space *base_space, const struct xrt_pose *base_offset, int64_t at_timestamp_ns, struct xrt_space **spaces, uint32_t space_count, const struct xrt_pose *offsets, struct xrt_space_relation *out_relations)
Locate spaces in the base space.
Definition: xrt_space.h:373
struct xrt_space * stage
Stage space, may be null.
Definition: xrt_space.h:103
static void xrt_space_overseer_destroy(struct xrt_space_overseer **xso_ptr)
Helper for calling through the function pointer: does a null check and sets xc_ptr to null if freed.
Definition: xrt_space.h:526
static xrt_result_t xrt_space_overseer_ref_space_inc(struct xrt_space_overseer *xso, enum xrt_reference_space_type type)
Increment the usage count of a reference space (aka semantic space).
Definition: xrt_space.h:412
xrt_result_t(* locate_space)(struct xrt_space_overseer *xso, struct xrt_space *base_space, const struct xrt_pose *base_offset, int64_t at_timestamp_ns, struct xrt_space *space, const struct xrt_pose *offset, struct xrt_space_relation *out_relation)
Locate a space in the base space.
Definition: xrt_space.h:160
xrt_result_t(* set_reference_space_offset)(struct xrt_space_overseer *xso, enum xrt_reference_space_type type, const struct xrt_pose *offset)
Apply an offset to the given reference space, not all implementations of xrt_space_overseer may suppo...
Definition: xrt_space.h:291
static xrt_result_t xrt_space_overseer_recenter_local_spaces(struct xrt_space_overseer *xso)
Trigger a re-center of the local and local_floor spaces, not all implementations of xrt_space_oversee...
Definition: xrt_space.h:438
static xrt_result_t xrt_space_overseer_create_local_space(struct xrt_space_overseer *xso, struct xrt_space **out_local_space, struct xrt_space **out_local_floor_space)
Create a localspace and a localfloorspace.
Definition: xrt_space.h:511
static xrt_result_t xrt_space_overseer_locate_space(struct xrt_space_overseer *xso, struct xrt_space *base_space, const struct xrt_pose *base_offset, int64_t at_timestamp_ns, struct xrt_space *space, const struct xrt_pose *offset, struct xrt_space_relation *out_relation)
Locate a space in the base space.
Definition: xrt_space.h:354
xrt_result_t(* create_local_space)(struct xrt_space_overseer *xso, struct xrt_space **out_local_space, struct xrt_space **out_local_floor_space)
Create a localspace and a localfloorspace.
Definition: xrt_space.h:302
static xrt_result_t xrt_space_overseer_create_offset_space(struct xrt_space_overseer *xso, struct xrt_space *parent, const struct xrt_pose *offset, struct xrt_space **out_space)
Create a space with a fixed offset to the parent space.
Definition: xrt_space.h:322
static xrt_result_t xrt_space_overseer_locate_device(struct xrt_space_overseer *xso, struct xrt_space *base_space, const struct xrt_pose *base_offset, int64_t at_timestamp_ns, struct xrt_device *xdev, struct xrt_space_relation *out_relation)
Locate a the origin of the tracking space of a device, this is not the same as the device position.
Definition: xrt_space.h:394
struct xrt_space * root
Root space, always available.
Definition: xrt_space.h:99
xrt_result_t(* locate_device)(struct xrt_space_overseer *xso, struct xrt_space *base_space, const struct xrt_pose *base_offset, int64_t at_timestamp_ns, struct xrt_device *xdev, struct xrt_space_relation *out_relation)
Locate a the origin of the tracking space of a device, this is not the same as the device position.
Definition: xrt_space.h:207
static xrt_result_t xrt_space_overseer_get_reference_space_offset(struct xrt_space_overseer *xso, enum xrt_reference_space_type type, struct xrt_pose *out_offset)
Read the offset from the given reference space, not all implementations of xrt_space_overseer may sup...
Definition: xrt_space.h:481
xrt_result_t(* create_pose_space)(struct xrt_space_overseer *xso, struct xrt_device *xdev, enum xrt_input_name name, struct xrt_space **out_space)
Create a space that wraps the xdev input pose described by input name, implicitly make the device's t...
Definition: xrt_space.h:142
static xrt_result_t xrt_space_overseer_set_tracking_origin_offset(struct xrt_space_overseer *xso, struct xrt_tracking_origin *xto, const struct xrt_pose *offset)
Apply an offset to a tracking origin, not all implementations of xrt_space_overseer may support this.
Definition: xrt_space.h:466
static xrt_result_t xrt_space_overseer_create_pose_space(struct xrt_space_overseer *xso, struct xrt_device *xdev, enum xrt_input_name name, struct xrt_space **out_space)
Create a space that wraps the xdev input pose described by input name, implicitly make the device's t...
Definition: xrt_space.h:338
xrt_result_t(* recenter_local_spaces)(struct xrt_space_overseer *xso)
Trigger a re-center of the local and local_floor spaces, not all implementations of xrt_space_oversee...
Definition: xrt_space.h:243
struct xrt_space * localfloorspace[128]
Ptrs to the localfloorspace.
Definition: xrt_space.h:114
xrt_result_t(* ref_space_inc)(struct xrt_space_overseer *xso, enum xrt_reference_space_type type)
Increment the usage count of a reference space (aka semantic space).
Definition: xrt_space.h:224
A relation with two spaces, includes velocity and acceleration.
Definition: xrt_defines.h:657
A space very similar to a OpenXR XrSpace but not a full one-to-one mapping, but used to power XrSpace...
Definition: xrt_space.h:31
struct xrt_reference reference
Reference helper.
Definition: xrt_space.h:35
void(* destroy)(struct xrt_space *xs)
Destroy function.
Definition: xrt_space.h:40
A tracking system or device origin.
Definition: xrt_tracking.h:71
Common defines and enums for XRT.