27#define XRT_DEVICE_NAME_LEN 256
120 size_t blend_mode_count;
231 XRT_DEVICE_FEATURE_HAND_TRACKING_LEFT = 0,
232 XRT_DEVICE_FEATURE_HAND_TRACKING_RIGHT,
233 XRT_DEVICE_FEATURE_EYE_TRACKING,
234 XRT_DEVICE_FEATURE_MAX_ENUM,
251 char str[XRT_DEVICE_NAME_LEN];
277 bool orientation_tracking_supported;
278 bool position_tracking_supported;
279 bool hand_tracking_supported;
280 bool eye_gaze_supported;
281 bool force_feedback_supported;
282 bool ref_space_usage_supported;
283 bool form_factor_check_supported;
284 bool stage_supported;
285 bool face_tracking_supported;
286 bool body_tracking_supported;
287 bool battery_status_supported;
288 bool planes_supported;
330 int64_t at_timestamp_ns,
358 int64_t desired_timestamp_ns,
360 int64_t *out_timestamp_ns);
376 int64_t at_timestamp_ns,
407 int64_t desired_timestamp_ns,
431 uint64_t plane_detection_id,
432 uint64_t *out_plane_detection_id);
452 uint64_t plane_detection_id,
464 uint64_t plane_detection_id,
505 const struct xrt_vec3 *default_eye_relation,
506 int64_t at_timestamp_ns,
633 int64_t at_timestamp_ns,
649 int64_t desired_timestamp_ns,
651 int64_t *out_timestamp_ns)
666 int64_t at_timestamp_ns,
669 return xdev->
get_face_tracking(xdev, facial_expression_type, at_timestamp_ns, out_value);
697 int64_t desired_timestamp_ns,
700 return xdev->
get_body_joints(xdev, body_tracking_type, desired_timestamp_ns, out_value);
724 uint64_t plane_detection_id,
725 uint64_t *out_plane_detection_id)
748 uint64_t plane_detection_id,
761 uint64_t plane_detection_id,
775 const struct xrt_vec3 *default_eye_relation,
776 int64_t at_timestamp_ns,
782 xdev->
get_view_poses(xdev, default_eye_relation, at_timestamp_ns, view_count, out_head_relation, out_fovs,
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:1970
xrt_blend_mode
Blend mode that the device supports, exact mirror of XrEnvironmentBlendMode.
Definition: xrt_defines.h:109
xrt_form_factor
What form factor is this device, mostly maps onto OpenXR's XrFormFactor.
Definition: xrt_defines.h:1920
xrt_input_name
Every internal input source known to monado with a baked in type.
Definition: xrt_defines.h:1303
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:601
xrt_output_name
Name of a output with a baked in type.
Definition: xrt_defines.h:1806
xrt_result
Result type used across Monado.
Definition: xrt_results.h:22
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:788
A binding pair, going from a binding point to a device output.
Definition: xrt_device.h:204
enum xrt_output_name device
To output on the device.
Definition: xrt_device.h:206
enum xrt_output_name from
From which name.
Definition: xrt_device.h:205
A binding profile, has lists of binding pairs to goes from device in name to the device it hangs off ...
Definition: xrt_device.h:216
enum xrt_device_name name
Device this binding emulates.
Definition: xrt_device.h:218
Definition: xrt_defines.h:1790
Definition: xrt_defines.h:1762
A single HMD or input device.
Definition: xrt_device.h:245
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:631
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:441
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:760
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:389
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:866
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:405
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:556
void(* set_output)(struct xrt_device *xdev, enum xrt_output_name name, const union xrt_output_value *value)
Set a output value.
Definition: xrt_device.h:418
static xrt_result_t xrt_device_update_inputs(struct xrt_device *xdev)
Helper function for xrt_device::update_inputs.
Definition: xrt_device.h:618
void(* 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:356
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:736
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:824
char str[256]
A string describing the device.
Definition: xrt_device.h:251
static void 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:774
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:664
void(* 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:504
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:537
struct xrt_hmd_parts * hmd
Null if this device does not interface with the users head.
Definition: xrt_device.h:257
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:374
char serial[256]
A unique identifier. Persistent across configurations, if possible.
Definition: xrt_device.h:254
struct xrt_output * outputs
Array of output structs.
Definition: xrt_device.h:275
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:592
size_t output_count
Number of outputs.
Definition: xrt_device.h:273
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:571
struct xrt_input * inputs
Array of input structs.
Definition: xrt_device.h:270
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:680
size_t input_count
Number of inputs.
Definition: xrt_device.h:268
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:581
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:463
void(* destroy)(struct xrt_device *xdev)
Destroy device.
Definition: xrt_device.h:605
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:879
xrt_result_t(* update_inputs)(struct xrt_device *xdev)
Update any attached inputs.
Definition: xrt_device.h:302
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:695
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:451
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:722
struct xrt_tracking_origin * tracking_origin
Always set, pointing to the tracking system for this device.
Definition: xrt_device.h:260
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:600
size_t binding_profile_count
Number of bindings in xrt_device::binding_profiles.
Definition: xrt_device.h:263
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:429
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:747
enum xrt_device_name name
Enum identifier of the device.
Definition: xrt_device.h:247
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:808
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:840
static void xrt_device_destroy(struct xrt_device **xdev_ptr)
Helper function for xrt_device::destroy.
Definition: xrt_device.h:892
static void xrt_device_set_output(struct xrt_device *xdev, enum xrt_output_name name, const union xrt_output_value *value)
Helper function for xrt_device::set_output.
Definition: xrt_device.h:711
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:328
bool(* 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:526
static bool 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:794
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:853
static void 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:647
Definition: xrt_defines.h:1651
Describes a projection matrix fov.
Definition: xrt_defines.h:488
Joint set type used for hand tracking.
Definition: xrt_defines.h:1402
All of the device components that deals with interfacing to a users head.
Definition: xrt_device.h:93
float * vertices
Data.
Definition: xrt_device.h:135
struct xrt_fov fov[XRT_MAX_VIEWS]
distortion is subject to the field of view
Definition: xrt_device.h:154
uint32_t vertex_count
Number of vertices.
Definition: xrt_device.h:137
struct xrt_view views[XRT_MAX_VIEWS]
Display information.
Definition: xrt_device.h:113
uint64_t nominal_frame_interval_ns
Nominal frame interval.
Definition: xrt_device.h:105
uint32_t stride
Stride of vertices.
Definition: xrt_device.h:139
enum xrt_blend_mode blend_modes[XRT_MAX_DEVICE_BLEND_MODES]
Array of supported blend modes.
Definition: xrt_device.h:119
int * indices
Indices, for triangle strip.
Definition: xrt_device.h:144
enum xrt_distortion_model models
Supported distortion models, a bitfield.
Definition: xrt_device.h:128
uint32_t index_count_total
Total number of elements in mesh::indices array.
Definition: xrt_device.h:150
struct xrt_hmd_parts::@235 distortion
Distortion information.
uint32_t index_offsets[XRT_MAX_VIEWS]
Offsets for the indices (one offset per view).
Definition: xrt_device.h:148
uint32_t uv_channels_count
1 or 3 for (chromatic aberration).
Definition: xrt_device.h:141
struct xrt_hmd_parts::@234 screens[1]
The hmd screen as an unrotated display, like the HMD presents it to the OS.
enum xrt_distortion_model preferred
Preferred disortion model, single value.
Definition: xrt_device.h:130
uint32_t index_counts[XRT_MAX_VIEWS]
Number of indices for the triangle strips (one per view).
Definition: xrt_device.h:146
A tightly packed 2x2 matrix of floats.
Definition: xrt_defines.h:515
A single named output, that sits on a xrt_device.
Definition: xrt_device.h:182
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:467
A relation with two spaces, includes velocity and acceleration.
Definition: xrt_defines.h:659
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:263
A 3 element vector with single floats.
Definition: xrt_defines.h:273
A per-lens/display view information.
Definition: xrt_device.h:36
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:82
struct xrt_view::@232 viewport
Viewport position on the screen.
struct xrt_view::@233 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 output types.
Definition: xrt_defines.h:1892
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:164
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:714
xrt_device_feature_type
Higher level features for devices.
Definition: xrt_device.h:230
Header for limits of the XRT interfaces.
Header defining planes detector enum and structs.
Header defining visibility mask helper struct.