Monado OpenXR Runtime
xrt_device.h
Go to the documentation of this file.
1// Copyright 2019-2024, Collabora, Ltd.
2// Copyright 2024-2025, NVIDIA CORPORATION.
3// SPDX-License-Identifier: BSL-1.0
4/*!
5 * @file
6 * @brief Header defining an xrt display or controller device.
7 * @author Jakob Bornecrantz <jakob@collabora.com>
8 * @author Moshi Turner <moshiturner@protonmail.com>
9 * @author Korcan Hussein <korcan.hussein@collabora.com>
10 * @ingroup xrt_iface
11 */
12
13#pragma once
14
15#include "xrt/xrt_defines.h"
18#include "xrt/xrt_limits.h"
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
24struct xrt_tracking;
25
26#define XRT_DEVICE_NAME_LEN 256
27
28
29/*!
30 * A per-lens/display view information.
31 *
32 * @ingroup xrt_iface
33 */
35{
36 /*!
37 * @brief Viewport position on the screen.
38 *
39 * In absolute screen coordinates on an unrotated display, like the
40 * HMD presents it to the OS.
41 *
42 * This field is only used by @ref comp to setup the device rendering.
43 *
44 * If the view is being rotated by xrt_view.rot 90° right in the
45 * distortion shader then `display.w_pixels == viewport.h_pixels` and
46 * `display.h_pixels == viewport.w_pixels`.
47 */
48 struct
49 {
50 uint32_t x_pixels;
51 uint32_t y_pixels;
52 uint32_t w_pixels;
53 uint32_t h_pixels;
55
56 /*!
57 * @brief Physical properties of this display (or the part of a display
58 * that covers this view).
59 *
60 * Not in absolute screen coordinates but like the clients see them i.e.
61 * after rotation is applied by xrt_view::rot.
62 * This field is only used for the clients' swapchain setup.
63 *
64 * The xrt_view::display::w_pixels and xrt_view::display::h_pixels
65 * become the recommended image size for this view, after being scaled
66 * by the debug environment variable `XRT_COMPOSITOR_SCALE_PERCENTAGE`.
67 */
68 struct
69 {
70 uint32_t w_pixels;
71 uint32_t h_pixels;
73
74 /*!
75 * @brief Rotation 2d matrix used to rotate the position of the output
76 * of the distortion shaders onto the screen.
77 *
78 * If the distortion shader is based on a mesh, then this matrix rotates
79 * the vertex positions.
80 */
82};
83
84/*!
85 * All of the device components that deals with interfacing to a users head.
86 *
87 * HMD is probably a bad name for the future but for now will have to do.
88 *
89 * @ingroup xrt_iface
90 */
92{
93 /*!
94 * @brief The hmd screen as an unrotated display, like the HMD presents
95 * it to the OS.
96 *
97 * This field is used by @ref comp to setup the extended mode window.
98 */
99 struct
100 {
101 int w_pixels;
102 int h_pixels;
103 //! Nominal frame interval
105 enum xrt_scanout_direction scanout_direction;
106 int64_t scanout_time_ns;
108
109 /*!
110 * Display information.
111 *
112 * For now hardcoded display to two.
113 */
114 struct xrt_view views[XRT_MAX_VIEWS];
115
116 size_t view_count;
117 /*!
118 * Array of supported blend modes.
119 */
120 enum xrt_blend_mode blend_modes[XRT_MAX_DEVICE_BLEND_MODES];
121 size_t blend_mode_count;
122
123 /*!
124 * Distortion information.
125 */
126 struct
127 {
128 //! Supported distortion models, a bitfield.
130 //! Preferred disortion model, single value.
132
133 struct
134 {
135 //! Data.
136 float *vertices;
137 //! Number of vertices.
138 uint32_t vertex_count;
139 //! Stride of vertices
140 uint32_t stride;
141 //! 1 or 3 for (chromatic aberration).
143
144 //! Indices, for triangle strip.
146 //! Number of indices for the triangle strips (one per view).
147 uint32_t index_counts[XRT_MAX_VIEWS];
148 //! Offsets for the indices (one offset per view).
149 uint32_t index_offsets[XRT_MAX_VIEWS];
150 //! Total number of elements in mesh::indices array.
152 } mesh;
153
154 //! distortion is subject to the field of view
155 struct xrt_fov fov[XRT_MAX_VIEWS];
157};
158
159/*!
160 * A single named input, that sits on a @ref xrt_device.
161 *
162 * @ingroup xrt_iface
163 */
165{
166 //! Is this input active.
167 bool active;
168
169 //! alignas for 32 bit client support, see @ref ipc-design
170 XRT_ALIGNAS(8) int64_t timestamp;
171
172 enum xrt_input_name name;
173
174 union xrt_input_value value;
175};
176
177/*!
178 * A single named output, that sits on a @ref xrt_device.
179 *
180 * @ingroup xrt_iface
181 */
183{
184 enum xrt_output_name name;
185};
186
187
188/*!
189 * A binding pair, going @p from a binding point to a @p device input.
190 *
191 * @ingroup xrt_iface
192 */
194{
195 enum xrt_input_name from; //!< From which name.
196 enum xrt_input_name device; //!< To input on the device.
197};
198
199/*!
200 * A binding pair, going @p from a binding point to a @p device output.
201 *
202 * @ingroup xrt_iface
203 */
205{
206 enum xrt_output_name from; //!< From which name.
207 enum xrt_output_name device; //!< To output on the device.
208};
209
210/*!
211 * A binding profile, has lists of binding pairs to goes from device in @p name
212 * to the device it hangs off on.
213 *
214 * @ingroup xrt_iface
215 */
217{
218 //! Device this binding emulates.
220
221 struct xrt_binding_input_pair *inputs;
222 size_t input_count;
223 struct xrt_binding_output_pair *outputs;
224 size_t output_count;
225};
226
227/*!
228 * Higher level features for devices.
229 */
231{
232 XRT_DEVICE_FEATURE_HAND_TRACKING_LEFT = 0,
233 XRT_DEVICE_FEATURE_HAND_TRACKING_RIGHT,
234 XRT_DEVICE_FEATURE_EYE_TRACKING,
235 XRT_DEVICE_FEATURE_MAX_ENUM,
236};
237
238/*!
239 * Output limits of a particular device
240 */
242{
243 //! The sample rate of the device's haptic PCM support, 0 if haptic PCM is not supported.
245};
246
247/*!
248 * Static data of supported features of the @ref xrt_device this struct sits on.
249 *
250 * This struct needs to always be a piece of data as it sits inside of the
251 * shared memory area in the IPC layer, so no pointers please.
252 *
253 * @ingroup xrt_iface
254 */
256{
257 bool orientation_tracking;
258 bool position_tracking;
259 bool hand_tracking;
260 bool eye_gaze;
261 bool presence;
262 bool force_feedback;
263 bool ref_space_usage;
264 bool form_factor_check;
265 bool stage;
266 bool face_tracking;
267 bool body_tracking;
268 bool body_tracking_calibration;
269 bool battery_status;
270 bool brightness_control;
271
272 bool planes;
273 enum xrt_plane_detection_capability_flags_ext plane_capability_flags;
274};
275
276/*!
277 * @interface xrt_device
278 *
279 * A single HMD or input device.
280 *
281 * @ingroup xrt_iface
282 */
284{
285 //! Enum identifier of the device.
287 enum xrt_device_type device_type;
288
289 //! A string describing the device.
290 char str[XRT_DEVICE_NAME_LEN];
291
292 //! A unique identifier. Persistent across configurations, if possible.
293 char serial[XRT_DEVICE_NAME_LEN];
294
295 //! Null if this device does not interface with the users head.
297
298 //! Always set, pointing to the tracking system for this device.
300
301 //! Number of bindings in xrt_device::binding_profiles
303 // Array of alternative binding profiles.
304 struct xrt_binding_profile *binding_profiles;
305
306 //! Number of inputs.
308 //! Array of input structs.
310
311 //! Number of outputs.
313 //! Array of output structs.
315
316 //! What features/functions/things does this device supports?
317 struct xrt_device_supported supported;
318
319
320 /*
321 *
322 * Functions.
323 *
324 */
325
326 /*!
327 * Update any attached inputs.
328 *
329 * @param[in] xdev The device.
330 */
331 xrt_result_t (*update_inputs)(struct xrt_device *xdev);
332
333 /*!
334 * @brief Get relationship of a tracked device to the tracking origin
335 * space as the base space.
336 *
337 * It is the responsibility of the device driver to do any prediction,
338 * there are helper functions available for this.
339 *
340 * The timestamps are system monotonic timestamps, such as returned by
341 * os_monotonic_get_ns().
342 *
343 * @param[in] xdev The device.
344 * @param[in] name Some devices may have multiple poses on
345 * them, select the one using this field. For
346 * HMDs use @p XRT_INPUT_GENERIC_HEAD_POSE.
347 * For Unbounded Reference Space you can use
348 * @p XRT_INPUT_GENERIC_UNBOUNDED_SPACE_POSE
349 * to get the origin of that space.
350 * @param[in] at_timestamp_ns If the device can predict or has a history
351 * of positions, this is when the caller
352 * wants the pose to be from.
353 * @param[out] out_relation The relation read from the device.
354 *
355 * @see xrt_input_name
356 */
358 enum xrt_input_name name,
359 int64_t at_timestamp_ns,
360 struct xrt_space_relation *out_relation);
361
362 /*!
363 * @brief Get relationship of hand joints to the tracking origin space as
364 * the base space.
365 *
366 * It is the responsibility of the device driver to either do prediction
367 * or return joints from a previous time and write that time out to
368 * @p out_timestamp_ns.
369 *
370 * The timestamps are system monotonic timestamps, such as returned by
371 * os_monotonic_get_ns().
372 *
373 * @param[in] xdev The device.
374 * @param[in] name Some devices may have multiple poses on
375 * them, select the one using this field. For
376 * hand tracking use @p XRT_INPUT_GENERIC_HAND_TRACKING_DEFAULT_SET.
377 * @param[in] desired_timestamp_ns If the device can predict or has a history
378 * of positions, this is when the caller
379 * wants the pose to be from.
380 * @param[out] out_value The hand joint data read from the device.
381 * @param[out] out_timestamp_ns The timestamp of the data being returned.
382 *
383 * @see xrt_input_name
384 */
385 xrt_result_t (*get_hand_tracking)(struct xrt_device *xdev,
386 enum xrt_input_name name,
387 int64_t desired_timestamp_ns,
388 struct xrt_hand_joint_set *out_value,
389 int64_t *out_timestamp_ns);
390
391 /*!
392 * @brief Get the requested blend shape properties & weights for a face tracker
393 *
394 * @param[in] xdev The device.
395 * @param[in] facial_expression_type The facial expression data type (XR_FB_face_tracking,
396 * XR_HTC_facial_tracking, etc).
397 * @param[in] at_timestamp_ns Timestamp to be optionally used for prediction/history. For OXR extensions
398 * that do not pass a timestamp, the current timestamp is used.
399 * @param[in] out_value Set of requested expression weights & blend shape properties.
400 *
401 * @see xrt_input_name
402 */
403 xrt_result_t (*get_face_tracking)(struct xrt_device *xdev,
404 enum xrt_input_name facial_expression_type,
405 int64_t at_timestamp_ns,
406 struct xrt_facial_expression_set *out_value);
407
408 /*!
409 * @brief Get the body skeleton in T-pose, used to query the skeleton hierarchy, scale, proportions etc
410 *
411 * @param[in] xdev The device.
412 * @param[in] body_tracking_type The body joint set type (XR_FB_body_tracking,
413 * XR_META_body_tracking_full_body, etc).
414 * @param[in] out_value The body skeleton hierarchy/properties.
415 *
416 * @see xrt_input_name
417 */
418 xrt_result_t (*get_body_skeleton)(struct xrt_device *xdev,
419 enum xrt_input_name body_tracking_type,
420 struct xrt_body_skeleton *out_value);
421
422 /*!
423 * @brief Get the joint locations for a body tracker
424 *
425 * @param[in] xdev The device.
426 * @param[in] body_tracking_type The body joint set type (XR_FB_body_tracking,
427 * XR_META_body_tracking_full_body, etc).
428 * @param[in] desired_timestamp_ns If the device can predict or has a history
429 * of locations, this is when the caller
430 * @param[in] out_value Set of body joint locations & properties.
431 *
432 * @see xrt_input_name
433 */
434 xrt_result_t (*get_body_joints)(struct xrt_device *xdev,
435 enum xrt_input_name body_tracking_type,
436 int64_t desired_timestamp_ns,
437 struct xrt_body_joint_set *out_value);
438
439 /*!
440 * @brief XR_META_body_tracking_calibration - body tracking extension to reset the body tracking calibration
441 *
442 * @param[in] xdev The body tracking device.
443 */
444 xrt_result_t (*reset_body_tracking_calibration_meta)(struct xrt_device *xdev);
445
446 /*!
447 * @brief XR_META_body_tracking_calibration - body tracking extension to suggest a body tracking calibration
448 * override
449 *
450 * @param[in] xdev The body tracking device.
451 * @param[in] new_body_height The suggested new body height to override.
452 */
454
455 /*!
456 * Set a output value.
457 *
458 * @param[in] xdev The device.
459 * @param[in] name The output component name to set.
460 * @param[in] value The value to set the output to.
461 * @see xrt_output_name
462 */
465 const struct xrt_output_value *value);
466
467 /*!
468 * Gets limits of this devices outputs.
469 *
470 * @param[in] xdev The device.
471 * @param[out] limits The returned limits.
472 */
473 xrt_result_t (*get_output_limits)(struct xrt_device *xdev, struct xrt_output_limits *limits);
474
475 /*!
476 * @brief Get current presence status of the device.
477 *
478 * @param[in] xdev The device.
479 * @param[out] presence The returned presence status.
480 */
481 xrt_result_t (*get_presence)(struct xrt_device *xdev, bool *presence);
482
483 /*!
484 * Begin a plane detection request
485 *
486 * @param[in] xdev The device.
487 * @param[in] begin_info The query specifying what type of planes are requested.
488 * @param[in] plane_detection_id The id for a previous plane detection request to be replaced or 0.
489 * @param[out] out_plane_detection_id The id of the new plane detection request generated by the xdev.
490 * @return generally XRT_SUCCESS, except for internal runtime failures.
491 */
493 const struct xrt_plane_detector_begin_info_ext *begin_info,
494 uint64_t plane_detection_id,
495 uint64_t *out_plane_detection_id);
496
497 /*!
498 * Destroy internal resources associated with plane_detector_id.
499 *
500 * @param[in] xdev The device.
501 * @param[in] plane_detection_id An id generated by the xdev.
502 * @return generally XRT_SUCCESS, except for internal runtime failures.
503 */
504 xrt_result_t (*destroy_plane_detection_ext)(struct xrt_device *xdev, uint64_t plane_detection_id);
505
506 /*!
507 * Get the state of a plane detection request.
508 *
509 * @param[in] xdev The device.
510 * @param[in] plane_detector_id An id generated by the xdev.
511 * @param[out] out_state The state of the plane detection.
512 * @return generally XRT_SUCCESS, except for internal runtime failures.
513 */
515 uint64_t plane_detection_id,
516 enum xrt_plane_detector_state_ext *out_state);
517
518 /*!
519 * Get results of a plane detection request.
520 *
521 * @param[in] xdev The device.
522 * @param[in] plane_detector_id An id generated by the xdev.
523 * @param[out] detections The detected planes, if any.
524 * @return generally XRT_SUCCESS, except for internal runtime failures.
525 */
527 uint64_t plane_detection_id,
528 struct xrt_plane_detections_ext *out_detections);
529
530 /*!
531 * @brief Get the per-view pose in relation to the view space.
532 *
533 * On most devices with coplanar displays and no built-in eye tracking
534 * or IPD sensing, this just calls a helper to process the provided
535 * eye relation, but this may also handle canted displays as well as
536 * eye tracking.
537 *
538 * Incorporates a call to xrt_device::get_tracked_pose or a wrapper for it
539 *
540 * @param[in] xdev The device.
541 * @param[in] default_eye_relation
542 * The interpupillary relation as a 3D position.
543 * Most simple stereo devices would just want to
544 * set `out_pose->position.[x|y|z] = ipd.[x|y|z]
545 * / 2.0f` and adjust for left vs right view.
546 * Not to be confused with IPD that is absolute
547 * distance, this is a full 3D translation
548 * If a device has a more accurate/dynamic way of
549 * knowing the eye relation, it may ignore this
550 * input.
551 * @param[in] at_timestamp_ns This is when the caller wants the poses and FOVs to be from.
552 * @param[in] view_count Number of views.
553 * @param[in] view_type Type of view configuration (mono or stereo).
554 * @param[out] out_head_relation
555 * The head pose in the device tracking space.
556 * Combine with @p out_poses to get the views in
557 * device tracking space.
558 * @param[out] out_fovs An array (of size @p view_count ) to populate
559 * with the device-suggested fields of view.
560 * @param[out] out_poses An array (of size @p view_count ) to populate
561 * with view output poses in head space. When
562 * implementing, be sure to also set orientation:
563 * most likely identity orientation unless you
564 * have canted screens.
565 * (Caution: Even if you have eye tracking, you
566 * won't use eye orientation here!)
567 */
568 xrt_result_t (*get_view_poses)(struct xrt_device *xdev,
569 const struct xrt_vec3 *default_eye_relation,
570 int64_t at_timestamp_ns,
571 enum xrt_view_type view_type,
572 uint32_t view_count,
573 struct xrt_space_relation *out_head_relation,
574 struct xrt_fov *out_fovs,
575 struct xrt_pose *out_poses);
576
577 /**
578 * Compute the distortion at a single point.
579 *
580 * The input is @p u @p v in screen/output space (that is, predistorted), you are to compute and return the u,v
581 * coordinates to sample the render texture. The compositor will step through a range of u,v parameters to build
582 * the lookup (vertex attribute or distortion texture) used to pre-distort the image as required by the device's
583 * optics.
584 *
585 * @param xdev the device
586 * @param view the view index
587 * @param u horizontal texture coordinate
588 * @param v vertical texture coordinate
589 * @param[out] out_result corresponding u,v pairs for all three color channels.
590 */
591 xrt_result_t (*compute_distortion)(
592 struct xrt_device *xdev, uint32_t view, float u, float v, struct xrt_uv_triplet *out_result);
593
594 /*!
595 * Get the visibility mask for this device.
596 *
597 * @param[in] xdev The device.
598 * @param[in] type The type of visibility mask.
599 * @param[in] view_index The index of the view to get the mask for.
600 * @param[out] out_mask Output mask, caller must free.
601 */
602 xrt_result_t (*get_visibility_mask)(struct xrt_device *xdev,
603 enum xrt_visibility_mask_type type,
604 uint32_t view_index,
605 struct xrt_visibility_mask **out_mask);
606
607 /*!
608 * Called by the @ref xrt_space_overseer when a reference space that is
609 * implemented by this device is first used, or when the last usage of
610 * the reference space stops.
611 *
612 * What is provided is both the @ref xrt_reference_space_type that
613 * triggered the usage change and the @ref xrt_input_name (if any) that
614 * is used to drive the space.
615 *
616 * @see xrt_space_overseer_ref_space_inc
617 * @see xrt_space_overseer_ref_space_dec
618 * @see xrt_input_name
619 * @see xrt_reference_space_type
620 */
621 xrt_result_t (*ref_space_usage)(struct xrt_device *xdev,
622 enum xrt_reference_space_type type,
623 enum xrt_input_name name,
624 bool used);
625
626 /*!
627 * @brief Check if given form factor is available or not.
628 *
629 * This should only be used in HMD device, if the device driver supports form factor check.
630 *
631 * @param[in] xdev The device.
632 * @param[in] form_factor Form factor to check.
633 *
634 * @return true if given form factor is available; otherwise false.
635 */
636 bool (*is_form_factor_available)(struct xrt_device *xdev, enum xrt_form_factor form_factor);
637
638 /*!
639 * @brief Get battery status information.
640 *
641 * @param[in] xdev The device.
642 * @param[out] out_present Whether battery status information exist for this device.
643 * @param[out] out_charging Whether the device's battery is being charged.
644 * @param[out] out_charge Battery charge as a value between 0 and 1.
645 */
647 bool *out_present,
648 bool *out_charging,
649 float *out_charge);
650
651 /*!
652 * @brief Get the current display brightness.
653 *
654 * @param[in] xdev The device.
655 * @param[out] out_brightness Current display brightness. Usually between 0 and 1. Some devices may
656 * exceed 1 if the supported range exceeds 100%
657 */
658 xrt_result_t (*get_brightness)(struct xrt_device *xdev, float *out_brightness);
659
660 /*!
661 * @brief Set the display brightness.
662 *
663 * @param[in] xdev The device.
664 * @param[in] brightness Desired display brightness. Usually between 0 and 1. Some devices may
665 * allow exceeding 1 if the supported range exceeds 100%, but it will be clamped to
666 * the supported range.
667 * @param[in] relative Whether to add \a brightness to the current brightness, instead of overwriting
668 * the current brightness.
669 */
670 xrt_result_t (*set_brightness)(struct xrt_device *xdev, float brightness, bool relative);
671
672 /*!
673 * Enable the feature for this device.
674 *
675 * @param[in] xdev The device.
676 * @param[in] type The type of device feature.
677 */
679
680 /*!
681 * Disable the feature for this device.
682 *
683 * @param[in] xdev The device.
684 * @param[in] type The type of device feature.
685 */
687
688 /*!
689 * Destroy device.
690 */
691 void (*destroy)(struct xrt_device *xdev);
692
693 // Add new functions above destroy.
694};
695
696/*!
697 * Helper function for @ref xrt_device::update_inputs.
698 *
699 * @copydoc xrt_device::update_inputs
700 *
701 * @public @memberof xrt_device
702 */
703static inline xrt_result_t
705{
706 return xdev->update_inputs(xdev);
707}
708
709/*!
710 * Helper function for @ref xrt_device::get_tracked_pose.
711 *
712 * @copydoc xrt_device::get_tracked_pose
713 *
714 * @public @memberof xrt_device
715 */
716static inline xrt_result_t
718 enum xrt_input_name name,
719 int64_t at_timestamp_ns,
720 struct xrt_space_relation *out_relation)
721{
722 return xdev->get_tracked_pose(xdev, name, at_timestamp_ns, out_relation);
723}
724
725/*!
726 * Helper function for @ref xrt_device::get_hand_tracking.
727 *
728 * @copydoc xrt_device::get_hand_tracking
729 *
730 * @public @memberof xrt_device
731 */
732static inline xrt_result_t
734 enum xrt_input_name name,
735 int64_t desired_timestamp_ns,
736 struct xrt_hand_joint_set *out_value,
737 int64_t *out_timestamp_ns)
738{
739 return xdev->get_hand_tracking(xdev, name, desired_timestamp_ns, out_value, out_timestamp_ns);
740}
741
742/*!
743 * Helper function for @ref xrt_device::get_face_tracking.
744 *
745 * @copydoc xrt_device::get_face_tracking
746 *
747 * @public @memberof xrt_device
748 */
749static inline xrt_result_t
751 enum xrt_input_name facial_expression_type,
752 int64_t at_timestamp_ns,
753 struct xrt_facial_expression_set *out_value)
754{
755 return xdev->get_face_tracking(xdev, facial_expression_type, at_timestamp_ns, out_value);
756}
757
758/*!
759 * Helper function for @ref xrt_device::get_body_skeleton.
760 *
761 * @copydoc xrt_device::get_body_skeleton
762 *
763 * @public @memberof xrt_device
764 */
765static inline xrt_result_t
767 enum xrt_input_name body_tracking_type,
768 struct xrt_body_skeleton *out_value)
769{
770 return xdev->get_body_skeleton(xdev, body_tracking_type, out_value);
771}
772
773/*!
774 * Helper function for @ref xrt_device::get_body_joints.
775 *
776 * @copydoc xrt_device::get_body_joints
777 *
778 * @public @memberof xrt_device
779 */
780static inline xrt_result_t
782 enum xrt_input_name body_tracking_type,
783 int64_t desired_timestamp_ns,
784 struct xrt_body_joint_set *out_value)
785{
786 return xdev->get_body_joints(xdev, body_tracking_type, desired_timestamp_ns, out_value);
787}
788
789/*!
790 * Helper function for @ref xrt_device::reset_body_tracking_calibration_meta.
791 *
792 * @copydoc xrt_device::reset_body_tracking_calibration_meta
793 *
794 * @public @memberof xrt_device
795 */
796static inline xrt_result_t
798{
799 if (xdev->reset_body_tracking_calibration_meta == NULL) {
801 }
802 return xdev->reset_body_tracking_calibration_meta(xdev);
803}
804
805/*!
806 * Helper function for @ref xrt_device::set_body_tracking_calibration_override_meta.
807 *
808 * @copydoc xrt_device::set_body_tracking_calibration_override_meta
809 *
810 * @public @memberof xrt_device
811 */
812static inline xrt_result_t
814{
817 }
818 return xdev->set_body_tracking_calibration_override_meta(xdev, new_body_height);
819}
820
821/*!
822 * Helper function for @ref xrt_device::set_output.
823 *
824 * @copydoc xrt_device::set_output
825 *
826 * @public @memberof xrt_device
827 */
828static inline xrt_result_t
830{
831 xdev->set_output(xdev, name, value);
832 return XRT_SUCCESS;
833}
834
835static inline xrt_result_t
836xrt_device_get_output_limits(struct xrt_device *xdev, struct xrt_output_limits *limits)
837{
838 if (xdev->get_output_limits) {
839 return xdev->get_output_limits(xdev, limits);
840 } else {
842 }
843}
844
845/*!
846 * Helper function for @ref xrt_device::get_presence.
847 *
848 * @copydoc xrt_device::get_presence
849 *
850 * @public @memberof xrt_device
851 */
852static inline xrt_result_t
853xrt_device_get_presence(struct xrt_device *xdev, bool *presence)
854{
855 if (xdev->get_presence) {
856 return xdev->get_presence(xdev, presence);
857 } else {
859 }
860}
861
862/*!
863 * Helper function for @ref xrt_device::begin_plane_detection_ext.
864 *
865 * @public @memberof xrt_device
866 */
867static inline xrt_result_t
869 const struct xrt_plane_detector_begin_info_ext *begin_info,
870 uint64_t plane_detection_id,
871 uint64_t *out_plane_detection_id)
872{
873 return xdev->begin_plane_detection_ext(xdev, begin_info, plane_detection_id, out_plane_detection_id);
874}
875
876/*!
877 * Helper function for @ref xrt_device::destroy_plane_detection_ext.
878 *
879 * @public @memberof xrt_device
880 */
881static inline xrt_result_t
882xrt_device_destroy_plane_detection_ext(struct xrt_device *xdev, uint64_t plane_detection_id)
883{
884 return xdev->destroy_plane_detection_ext(xdev, plane_detection_id);
885}
886
887/*!
888 * Helper function for @ref xrt_device::get_plane_detections_ext.
889 *
890 * @public @memberof xrt_device
891 */
892static inline xrt_result_t
894 uint64_t plane_detection_id,
895 enum xrt_plane_detector_state_ext *out_state)
896{
897 return xdev->get_plane_detection_state_ext(xdev, plane_detection_id, out_state);
898}
899
900/*!
901 * Helper function for @ref xrt_device::get_plane_detections_ext.
902 *
903 * @public @memberof xrt_device
904 */
905static inline xrt_result_t
907 uint64_t plane_detection_id,
908 struct xrt_plane_detections_ext *out_detections)
909{
910 return xdev->get_plane_detections_ext(xdev, plane_detection_id, out_detections);
911}
912
913/*!
914 * Helper function for @ref xrt_device::get_view_poses.
915 *
916 * @copydoc xrt_device::get_view_poses
917 * @public @memberof xrt_device
918 */
919static inline xrt_result_t
921 const struct xrt_vec3 *default_eye_relation,
922 int64_t at_timestamp_ns,
923 enum xrt_view_type view_type,
924 uint32_t view_count,
925 struct xrt_space_relation *out_head_relation,
926 struct xrt_fov *out_fovs,
927 struct xrt_pose *out_poses)
928{
929 return xdev->get_view_poses( //
930 xdev, //
931 default_eye_relation, //
932 at_timestamp_ns, //
933 view_type, //
934 view_count, //
935 out_head_relation, //
936 out_fovs, //
937 out_poses); //
938}
939
940/*!
941 * Helper function for @ref xrt_device::compute_distortion.
942 *
943 * @copydoc xrt_device::compute_distortion
944 *
945 * @public @memberof xrt_device
946 */
947static inline xrt_result_t
949 struct xrt_device *xdev, uint32_t view, float u, float v, struct xrt_uv_triplet *out_result)
950{
951 return xdev->compute_distortion(xdev, view, u, v, out_result);
952}
953
954/*!
955 * Helper function for @ref xrt_device::get_visibility_mask.
956 *
957 * @copydoc xrt_device::get_visibility_mask
958 *
959 * @public @memberof xrt_device
960 */
961static inline xrt_result_t
963 enum xrt_visibility_mask_type type,
964 uint32_t view_index,
965 struct xrt_visibility_mask **out_mask)
966{
967 return xdev->get_visibility_mask(xdev, type, view_index, out_mask);
968}
969
970/*!
971 * Helper function for @ref xrt_device::ref_space_usage.
972 *
973 * @copydoc xrt_device::ref_space_usage
974 *
975 * @public @memberof xrt_device
976 */
977static inline xrt_result_t
979 enum xrt_reference_space_type type,
980 enum xrt_input_name name,
981 bool used)
982{
983 return xdev->ref_space_usage(xdev, type, name, used);
984}
985
986/*!
987 * Helper function for @ref xrt_device::is_form_factor_available.
988 *
989 * @copydoc xrt_device::is_form_factor_available
990 *
991 * @public @memberof xrt_device
992 */
993static inline bool
995{
996 return xdev->is_form_factor_available(xdev, form_factor);
997}
998
999/*!
1000 * Helper function for @ref xrt_device::get_battery_status.
1001 *
1002 * @copydoc xrt_device::get_battery_status
1003 *
1004 * @public @memberof xrt_device
1005 */
1006static inline xrt_result_t
1007xrt_device_get_battery_status(struct xrt_device *xdev, bool *out_present, bool *out_charging, float *out_charge)
1008{
1009 return xdev->get_battery_status(xdev, out_present, out_charging, out_charge);
1010}
1011
1012/*!
1013 * Helper function for @ref xrt_device::get_brightness.
1014 *
1015 * @copydoc xrt_device::get_brightness
1016 * @public @memberof xrt_device
1017 */
1018static inline xrt_result_t
1019xrt_device_get_brightness(struct xrt_device *xdev, float *out_brightness)
1020{
1021 return xdev->get_brightness(xdev, out_brightness);
1022}
1023
1024/*!
1025 * Helper function for @ref xrt_device::set_brightness.
1026 *
1027 * @copydoc xrt_device::set_brightness
1028 * @public @memberof xrt_device
1029 */
1030static inline xrt_result_t
1031xrt_device_set_brightness(struct xrt_device *xdev, float brightness, bool relative)
1032{
1033 return xdev->set_brightness(xdev, brightness, relative);
1034}
1035
1036/*!
1037 * Helper function for @ref xrt_device::begin_feature.
1038 *
1039 * @copydoc xrt_device::begin_feature
1040 *
1041 * @public @memberof xrt_device
1042 */
1043static inline xrt_result_t
1045{
1046 return xdev->begin_feature(xdev, type);
1047}
1048
1049/*!
1050 * Helper function for @ref xrt_device::end_feature.
1051 *
1052 * @copydoc xrt_device::end_feature
1053 *
1054 * @public @memberof xrt_device
1055 */
1056static inline xrt_result_t
1058{
1059 return xdev->end_feature(xdev, type);
1060}
1061
1062/*!
1063 * Helper function for @ref xrt_device::destroy.
1064 *
1065 * Handles nulls, sets your pointer to null.
1066 *
1067 * @public @memberof xrt_device
1068 */
1069static inline void
1071{
1072 struct xrt_device *xdev = *xdev_ptr;
1073 if (xdev == NULL) {
1074 return;
1075 }
1076
1077 xdev->destroy(xdev);
1078 *xdev_ptr = NULL;
1079}
1080
1081
1082#ifdef __cplusplus
1083} // extern "C"
1084#endif
xrt_plane_detection_capability_flags_ext
Caps for a plane detector, see xrt_device.
Definition: xrt_plane_detector.h:30
xrt_visibility_mask_type
Visibility mask, mirror of XrVisibilityMaskKHR.
Definition: xrt_defines.h:2173
xrt_blend_mode
Blend mode that the device supports, exact mirror of XrEnvironmentBlendMode.
Definition: xrt_defines.h:112
xrt_form_factor
What form factor is this device, mostly maps onto OpenXR's XrFormFactor.
Definition: xrt_defines.h:2114
xrt_input_name
Every internal input source known to monado with a baked in type.
Definition: xrt_defines.h:1344
enum xrt_result xrt_result_t
Result type used across Monado.
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:612
xrt_output_name
Name of a output with a baked in type.
Definition: xrt_defines.h:1974
xrt_plane_detector_state_ext
State of a plane detector, see xrt_device.
Definition: xrt_plane_detector.h:83
xrt_device_type
How an xrt_device can be used.
Definition: xrt_defines.h:804
@ XRT_SUCCESS
The operation succeeded.
Definition: xrt_results.h:27
@ XRT_ERROR_NOT_IMPLEMENTED
The interface function called is not implemented by its interface.
Definition: xrt_results.h:192
A binding pair, going from a binding point to a device input.
Definition: xrt_device.h:194
enum xrt_input_name device
To input on the device.
Definition: xrt_device.h:196
enum xrt_input_name from
From which name.
Definition: xrt_device.h:195
A binding pair, going from a binding point to a device output.
Definition: xrt_device.h:205
enum xrt_output_name device
To output on the device.
Definition: xrt_device.h:207
enum xrt_output_name from
From which name.
Definition: xrt_device.h:206
A binding profile, has lists of binding pairs to goes from device in name to the device it hangs off ...
Definition: xrt_device.h:217
enum xrt_device_name name
Device this binding emulates.
Definition: xrt_device.h:219
Definition: xrt_defines.h:1957
Definition: xrt_defines.h:1914
Static data of supported features of the xrt_device this struct sits on.
Definition: xrt_device.h:256
A single HMD or input device.
Definition: xrt_device.h:284
xrt_result_t(* get_plane_detections_ext)(struct xrt_device *xdev, uint64_t plane_detection_id, struct xrt_plane_detections_ext *out_detections)
Get results of a plane detection request.
Definition: xrt_device.h:526
static xrt_result_t xrt_device_get_tracked_pose(struct xrt_device *xdev, enum xrt_input_name name, int64_t at_timestamp_ns, struct xrt_space_relation *out_relation)
Helper function for xrt_device::get_tracked_pose.
Definition: xrt_device.h:717
xrt_result_t(* get_body_skeleton)(struct xrt_device *xdev, enum xrt_input_name body_tracking_type, struct xrt_body_skeleton *out_value)
Get the body skeleton in T-pose, used to query the skeleton hierarchy, scale, proportions etc.
Definition: xrt_device.h:418
xrt_result_t(* reset_body_tracking_calibration_meta)(struct xrt_device *xdev)
XR_META_body_tracking_calibration - body tracking extension to reset the body tracking calibration.
Definition: xrt_device.h:444
static xrt_result_t xrt_device_begin_feature(struct xrt_device *xdev, enum xrt_device_feature_type type)
Helper function for xrt_device::begin_feature.
Definition: xrt_device.h:1044
static xrt_result_t xrt_device_get_hand_tracking(struct xrt_device *xdev, enum xrt_input_name name, int64_t desired_timestamp_ns, struct xrt_hand_joint_set *out_value, int64_t *out_timestamp_ns)
Helper function for xrt_device::get_hand_tracking.
Definition: xrt_device.h:733
xrt_result_t(* get_body_joints)(struct xrt_device *xdev, enum xrt_input_name body_tracking_type, int64_t desired_timestamp_ns, struct xrt_body_joint_set *out_value)
Get the joint locations for a body tracker.
Definition: xrt_device.h:434
xrt_result_t(* begin_plane_detection_ext)(struct xrt_device *xdev, const struct xrt_plane_detector_begin_info_ext *begin_info, uint64_t plane_detection_id, uint64_t *out_plane_detection_id)
Begin a plane detection request.
Definition: xrt_device.h:492
static xrt_result_t xrt_device_destroy_plane_detection_ext(struct xrt_device *xdev, uint64_t plane_detection_id)
Helper function for xrt_device::destroy_plane_detection_ext.
Definition: xrt_device.h:882
xrt_result_t(* ref_space_usage)(struct xrt_device *xdev, enum xrt_reference_space_type type, enum xrt_input_name name, bool used)
Called by the xrt_space_overseer when a reference space that is implemented by this device is first u...
Definition: xrt_device.h:621
xrt_result_t(* get_presence)(struct xrt_device *xdev, bool *presence)
Get current presence status of the device.
Definition: xrt_device.h:481
xrt_result_t(* set_output)(struct xrt_device *xdev, enum xrt_output_name name, const struct xrt_output_value *value)
Set a output value.
Definition: xrt_device.h:463
xrt_result_t(* compute_distortion)(struct xrt_device *xdev, uint32_t view, float u, float v, struct xrt_uv_triplet *out_result)
Compute the distortion at a single point.
Definition: xrt_device.h:591
static xrt_result_t xrt_device_update_inputs(struct xrt_device *xdev)
Helper function for xrt_device::update_inputs.
Definition: xrt_device.h:704
xrt_result_t(* set_body_tracking_calibration_override_meta)(struct xrt_device *xdev, float new_body_height)
XR_META_body_tracking_calibration - body tracking extension to suggest a body tracking calibration ov...
Definition: xrt_device.h:453
xrt_result_t(* get_output_limits)(struct xrt_device *xdev, struct xrt_output_limits *limits)
Gets limits of this devices outputs.
Definition: xrt_device.h:473
static xrt_result_t xrt_device_ref_space_usage(struct xrt_device *xdev, enum xrt_reference_space_type type, enum xrt_input_name name, bool used)
Helper function for xrt_device::ref_space_usage.
Definition: xrt_device.h:978
static xrt_result_t xrt_device_reset_body_tracking_calibration_meta(struct xrt_device *xdev)
Helper function for xrt_device::reset_body_tracking_calibration_meta.
Definition: xrt_device.h:797
xrt_result_t(* get_hand_tracking)(struct xrt_device *xdev, enum xrt_input_name name, int64_t desired_timestamp_ns, struct xrt_hand_joint_set *out_value, int64_t *out_timestamp_ns)
Get relationship of hand joints to the tracking origin space as the base space.
Definition: xrt_device.h:385
static xrt_result_t xrt_device_get_face_tracking(struct xrt_device *xdev, enum xrt_input_name facial_expression_type, int64_t at_timestamp_ns, struct xrt_facial_expression_set *out_value)
Helper function for xrt_device::get_face_tracking.
Definition: xrt_device.h:750
xrt_result_t(* get_visibility_mask)(struct xrt_device *xdev, enum xrt_visibility_mask_type type, uint32_t view_index, struct xrt_visibility_mask **out_mask)
Get the visibility mask for this device.
Definition: xrt_device.h:602
static xrt_result_t xrt_device_begin_plane_detection_ext(struct xrt_device *xdev, const struct xrt_plane_detector_begin_info_ext *begin_info, uint64_t plane_detection_id, uint64_t *out_plane_detection_id)
Helper function for xrt_device::begin_plane_detection_ext.
Definition: xrt_device.h:868
struct xrt_hmd_parts * hmd
Null if this device does not interface with the users head.
Definition: xrt_device.h:296
xrt_result_t(* get_face_tracking)(struct xrt_device *xdev, enum xrt_input_name facial_expression_type, int64_t at_timestamp_ns, struct xrt_facial_expression_set *out_value)
Get the requested blend shape properties & weights for a face tracker.
Definition: xrt_device.h:403
xrt_result_t(* destroy_plane_detection_ext)(struct xrt_device *xdev, uint64_t plane_detection_id)
Destroy internal resources associated with plane_detector_id.
Definition: xrt_device.h:504
static xrt_result_t xrt_device_compute_distortion(struct xrt_device *xdev, uint32_t view, float u, float v, struct xrt_uv_triplet *out_result)
Helper function for xrt_device::compute_distortion.
Definition: xrt_device.h:948
struct xrt_output * outputs
Array of output structs.
Definition: xrt_device.h:314
xrt_result_t(* begin_feature)(struct xrt_device *xdev, enum xrt_device_feature_type type)
Enable the feature for this device.
Definition: xrt_device.h:678
static xrt_result_t xrt_device_get_presence(struct xrt_device *xdev, bool *presence)
Helper function for xrt_device::get_presence.
Definition: xrt_device.h:853
size_t output_count
Number of outputs.
Definition: xrt_device.h:312
bool(* is_form_factor_available)(struct xrt_device *xdev, enum xrt_form_factor form_factor)
Check if given form factor is available or not.
Definition: xrt_device.h:636
xrt_result_t(* set_brightness)(struct xrt_device *xdev, float brightness, bool relative)
Set the display brightness.
Definition: xrt_device.h:670
struct xrt_input * inputs
Array of input structs.
Definition: xrt_device.h:309
static xrt_result_t xrt_device_get_body_skeleton(struct xrt_device *xdev, enum xrt_input_name body_tracking_type, struct xrt_body_skeleton *out_value)
Helper function for xrt_device::get_body_skeleton.
Definition: xrt_device.h:766
size_t input_count
Number of inputs.
Definition: xrt_device.h:307
xrt_result_t(* get_battery_status)(struct xrt_device *xdev, bool *out_present, bool *out_charging, float *out_charge)
Get battery status information.
Definition: xrt_device.h:646
void(* destroy)(struct xrt_device *xdev)
Destroy device.
Definition: xrt_device.h:691
static xrt_result_t xrt_device_get_plane_detections_ext(struct xrt_device *xdev, uint64_t plane_detection_id, struct xrt_plane_detections_ext *out_detections)
Helper function for xrt_device::get_plane_detections_ext.
Definition: xrt_device.h:906
xrt_result_t(* get_brightness)(struct xrt_device *xdev, float *out_brightness)
Get the current display brightness.
Definition: xrt_device.h:658
static xrt_result_t xrt_device_set_brightness(struct xrt_device *xdev, float brightness, bool relative)
Helper function for xrt_device::set_brightness.
Definition: xrt_device.h:1031
static xrt_result_t xrt_device_end_feature(struct xrt_device *xdev, enum xrt_device_feature_type type)
Helper function for xrt_device::end_feature.
Definition: xrt_device.h:1057
xrt_result_t(* get_plane_detection_state_ext)(struct xrt_device *xdev, uint64_t plane_detection_id, enum xrt_plane_detector_state_ext *out_state)
Get the state of a plane detection request.
Definition: xrt_device.h:514
xrt_result_t(* update_inputs)(struct xrt_device *xdev)
Update any attached inputs.
Definition: xrt_device.h:331
static xrt_result_t xrt_device_get_body_joints(struct xrt_device *xdev, enum xrt_input_name body_tracking_type, int64_t desired_timestamp_ns, struct xrt_body_joint_set *out_value)
Helper function for xrt_device::get_body_joints.
Definition: xrt_device.h:781
static xrt_result_t xrt_device_set_body_tracking_calibration_override_meta(struct xrt_device *xdev, float new_body_height)
Helper function for xrt_device::set_body_tracking_calibration_override_meta.
Definition: xrt_device.h:813
xrt_result_t(* get_view_poses)(struct xrt_device *xdev, const struct xrt_vec3 *default_eye_relation, int64_t at_timestamp_ns, enum xrt_view_type view_type, uint32_t view_count, struct xrt_space_relation *out_head_relation, struct xrt_fov *out_fovs, struct xrt_pose *out_poses)
Get the per-view pose in relation to the view space.
Definition: xrt_device.h:568
static xrt_result_t xrt_device_get_plane_detection_state_ext(struct xrt_device *xdev, uint64_t plane_detection_id, enum xrt_plane_detector_state_ext *out_state)
Helper function for xrt_device::get_plane_detections_ext.
Definition: xrt_device.h:893
struct xrt_tracking_origin * tracking_origin
Always set, pointing to the tracking system for this device.
Definition: xrt_device.h:299
xrt_result_t(* end_feature)(struct xrt_device *xdev, enum xrt_device_feature_type type)
Disable the feature for this device.
Definition: xrt_device.h:686
size_t binding_profile_count
Number of bindings in xrt_device::binding_profiles.
Definition: xrt_device.h:302
static xrt_result_t xrt_device_get_view_poses(struct xrt_device *xdev, const struct xrt_vec3 *default_eye_relation, int64_t at_timestamp_ns, enum xrt_view_type view_type, uint32_t view_count, struct xrt_space_relation *out_head_relation, struct xrt_fov *out_fovs, struct xrt_pose *out_poses)
Helper function for xrt_device::get_view_poses.
Definition: xrt_device.h:920
enum xrt_device_name name
Enum identifier of the device.
Definition: xrt_device.h:286
static xrt_result_t xrt_device_get_visibility_mask(struct xrt_device *xdev, enum xrt_visibility_mask_type type, uint32_t view_index, struct xrt_visibility_mask **out_mask)
Helper function for xrt_device::get_visibility_mask.
Definition: xrt_device.h:962
static bool xrt_device_is_form_factor_available(struct xrt_device *xdev, enum xrt_form_factor form_factor)
Helper function for xrt_device::is_form_factor_available.
Definition: xrt_device.h:994
static xrt_result_t xrt_device_get_brightness(struct xrt_device *xdev, float *out_brightness)
Helper function for xrt_device::get_brightness.
Definition: xrt_device.h:1019
static void xrt_device_destroy(struct xrt_device **xdev_ptr)
Helper function for xrt_device::destroy.
Definition: xrt_device.h:1070
xrt_result_t(* get_tracked_pose)(struct xrt_device *xdev, enum xrt_input_name name, int64_t at_timestamp_ns, struct xrt_space_relation *out_relation)
Get relationship of a tracked device to the tracking origin space as the base space.
Definition: xrt_device.h:357
static xrt_result_t xrt_device_get_battery_status(struct xrt_device *xdev, bool *out_present, bool *out_charging, float *out_charge)
Helper function for xrt_device::get_battery_status.
Definition: xrt_device.h:1007
static xrt_result_t xrt_device_set_output(struct xrt_device *xdev, enum xrt_output_name name, const struct xrt_output_value *value)
Helper function for xrt_device::set_output.
Definition: xrt_device.h:829
Definition: xrt_defines.h:1692
Describes a projection matrix fov.
Definition: xrt_defines.h:499
Joint set type used for hand tracking.
Definition: xrt_defines.h:1443
All of the device components that deals with interfacing to a users head.
Definition: xrt_device.h:92
struct xrt_hmd_parts::@250 screens[1]
The hmd screen as an unrotated display, like the HMD presents it to the OS.
float * vertices
Data.
Definition: xrt_device.h:136
struct xrt_fov fov[XRT_MAX_VIEWS]
distortion is subject to the field of view
Definition: xrt_device.h:155
uint32_t vertex_count
Number of vertices.
Definition: xrt_device.h:138
struct xrt_view views[XRT_MAX_VIEWS]
Display information.
Definition: xrt_device.h:114
uint64_t nominal_frame_interval_ns
Nominal frame interval.
Definition: xrt_device.h:104
uint32_t stride
Stride of vertices.
Definition: xrt_device.h:140
enum xrt_blend_mode blend_modes[XRT_MAX_DEVICE_BLEND_MODES]
Array of supported blend modes.
Definition: xrt_device.h:120
int * indices
Indices, for triangle strip.
Definition: xrt_device.h:145
enum xrt_distortion_model models
Supported distortion models, a bitfield.
Definition: xrt_device.h:129
uint32_t index_count_total
Total number of elements in mesh::indices array.
Definition: xrt_device.h:151
uint32_t index_offsets[XRT_MAX_VIEWS]
Offsets for the indices (one offset per view).
Definition: xrt_device.h:149
uint32_t uv_channels_count
1 or 3 for (chromatic aberration).
Definition: xrt_device.h:142
enum xrt_distortion_model preferred
Preferred disortion model, single value.
Definition: xrt_device.h:131
struct xrt_hmd_parts::@251 distortion
Distortion information.
uint32_t index_counts[XRT_MAX_VIEWS]
Number of indices for the triangle strips (one per view).
Definition: xrt_device.h:147
A single named input, that sits on a xrt_device.
Definition: xrt_device.h:165
XRT_ALIGNAS(8) int64_t timestamp
alignas for 32 bit client support, see IPC Design and Implementation
bool active
Is this input active.
Definition: xrt_device.h:167
A tightly packed 2x2 matrix of floats.
Definition: xrt_defines.h:526
Output limits of a particular device.
Definition: xrt_device.h:242
float haptic_pcm_sample_rate
The sample rate of the device's haptic PCM support, 0 if haptic PCM is not supported.
Definition: xrt_device.h:244
A union of all output types.
Definition: xrt_defines.h:2092
A single named output, that sits on a xrt_device.
Definition: xrt_device.h:183
Each plane has n polygons; ultimately plane metadata from locations and vetices is reconstructed.
Definition: xrt_plane_detector.h:171
A query for a plane.
Definition: xrt_plane_detector.h:97
A pose composed of a position and orientation.
Definition: xrt_defines.h:479
A relation with two spaces, includes velocity and acceleration.
Definition: xrt_defines.h:670
A tracking system or device origin.
Definition: xrt_tracking.h:71
Represents a uv triplet for distortion, basically just three xrt_vec2.
Definition: xrt_defines.h:279
A 3 element vector with single floats.
Definition: xrt_defines.h:289
A per-lens/display view information.
Definition: xrt_device.h:35
struct xrt_matrix_2x2 rot
Rotation 2d matrix used to rotate the position of the output of the distortion shaders onto the scree...
Definition: xrt_device.h:81
struct xrt_view::@248 viewport
Viewport position on the screen.
struct xrt_view::@249 display
Physical properties of this display (or the part of a display that covers this view).
Visibility mask helper, the indices and vertices are tightly packed after this struct.
Definition: xrt_visibility_mask.h:25
A union of all input types.
Definition: xrt_defines.h:1459
Common defines and enums for XRT.
xrt_distortion_model
Which distortion model does the device expose, used both as a bitfield and value.
Definition: xrt_defines.h:167
xrt_device_name
A enum that is used to name devices so that the state trackers can reason about the devices easier.
Definition: xrt_defines.h:724
xrt_scanout_direction
Screen scanout direction.
Definition: xrt_defines.h:179
xrt_view_type
View type to be rendered to by the compositor.
Definition: xrt_defines.h:2123
xrt_device_feature_type
Higher level features for devices.
Definition: xrt_device.h:231
Header for limits of the XRT interfaces.
Header defining planes detector enum and structs.
Header defining visibility mask helper struct.