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