28enum u_device_alloc_flags
31 U_DEVICE_ALLOC_NO_FLAGS = 0,
32 U_DEVICE_ALLOC_HMD = 1u << 0u,
33 U_DEVICE_ALLOC_TRACKING_NONE = 1u << 1u,
63 float lens_horizontal_separation_meters;
64 float lens_vertical_position_meters;
66 float fov[XRT_MAX_VIEWS];
106#define U_DEVICE_ALLOCATE(type, flags, input_count, output_count) \
107 ((type *)u_device_allocate(flags, sizeof(type), input_count, output_count))
130#define XRT_DEVICE_ROLE_UNASSIGNED (-1)
170 const struct xrt_vec3 *default_eye_relation,
171 int64_t at_timestamp_ns,
208 uint64_t desired_timestamp_ns,
210 uint64_t *out_timestamp_ns);
227 const struct xrt_vec3 *default_eye_relation,
228 int64_t at_timestamp_ns,
void u_device_ni_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)
Not implemented function for xrt_device::get_view_poses.
Definition: u_device.c:512
bool u_device_setup_split_side_by_side(struct xrt_device *xdev, const struct u_device_simple_info *info)
Setup the device information given a very simple info struct.
Definition: u_device.c:204
void u_device_assign_xdev_roles(struct xrt_device **xdevs, size_t xdev_count, int *head, int *left, int *right)
Helper function to assign head, left hand and right hand roles.
Definition: u_device.c:361
void u_device_free(struct xrt_device *xdev)
Helper function to free a device and any data hanging of it.
Definition: u_device.c:331
bool u_extents_2d_split_side_by_side(struct xrt_device *xdev, const struct u_extents_2d *extents)
Setup the device's display's 2D extents.
Definition: u_device.c:131
xrt_result_t u_device_ni_get_battery_status(struct xrt_device *xdev, bool *out_present, bool *out_charging, float *out_charge)
Not implemented function for xrt_device::get_battery_status.
Definition: u_device.c:549
void u_device_ni_set_output(struct xrt_device *xdev, enum xrt_output_name name, const union xrt_output_value *value)
Not implemented function for xrt_device::set_output.
Definition: u_device.c:506
void u_device_dump_config(struct xrt_device *xdev, const char *prefix, const char *prod)
Dump the device config to stderr.
Definition: u_device.c:87
bool u_device_setup_one_eye(struct xrt_device *xdev, const struct u_device_simple_info *info)
Setup the device information given a very simple info struct.
Definition: u_device.c:160
xrt_result_t u_device_ni_get_visibility_mask(struct xrt_device *xdev, enum xrt_visibility_mask_type type, uint32_t view_index, struct xrt_visibility_mask **out_mask)
Not implemented function for xrt_device::get_visibility_mask.
Definition: u_device.c:532
void u_device_ni_get_hand_tracking(struct xrt_device *xdev, enum xrt_input_name name, uint64_t desired_timestamp_ns, struct xrt_hand_joint_set *out_value, uint64_t *out_timestamp_ns)
Not implemented function for xrt_device::get_hand_tracking.
Definition: u_device.c:496
bool u_device_ni_is_form_factor_available(struct xrt_device *xdev, enum xrt_form_factor form_factor)
Not implemented function for xrt_device::is_form_factor_available.
Definition: u_device.c:542
void * u_device_allocate(enum u_device_alloc_flags flags, size_t size, size_t input_count, size_t output_count)
Helper function to allocate a device plus inputs in the same allocation placed after the device in me...
Definition: u_device.c:272
bool u_device_ni_compute_distortion(struct xrt_device *xdev, uint32_t view, float u, float v, struct xrt_uv_triplet *out_result)
Not implemented function for xrt_device::compute_distortion.
Definition: u_device.c:524
xrt_result_t u_device_noop_update_inputs(struct xrt_device *xdev)
Noop function for xrt_device::update_inputs, should only be used from a device with any inputs.
Definition: u_device.c:480
xrt_visibility_mask_type
Visibility mask, mirror of XrVisibilityMaskKHR.
Definition: xrt_defines.h:1965
xrt_form_factor
What form factor is this device, mostly maps onto OpenXR's XrFormFactor.
Definition: xrt_defines.h:1915
xrt_input_name
Every internal input source known to monado with a baked in type.
Definition: xrt_defines.h:1298
enum xrt_result xrt_result_t
Result type used across Monado.
xrt_output_name
Name of a output with a baked in type.
Definition: xrt_defines.h:1801
Definition: m_space.cpp:87
Info to describe a very simple headset with diffractive lens optics.
Definition: u_device.h:54
Info to describe 2D extents of a device's screen.
Definition: u_device.h:43
A single HMD or input device.
Definition: xrt_device.h:241
Describes a projection matrix fov.
Definition: xrt_defines.h:486
Joint set type used for hand tracking.
Definition: xrt_defines.h:1397
A tightly packed 2x2 matrix of floats.
Definition: xrt_defines.h:513
A pose composed of a position and orientation.
Definition: xrt_defines.h:465
A relation with two spaces, includes velocity and acceleration.
Definition: xrt_defines.h:657
Represents a uv triplet for distortion, basically just three xrt_vec2.
Definition: xrt_defines.h:261
A 3 element vector with single floats.
Definition: xrt_defines.h:271
Visibility mask helper, the indices and vertices are tightly packed after this struct.
Definition: xrt_visibility_mask.h:25
void u_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 to implement xrt_device::get_view_poses in a HMD driver.
Definition: u_device.c:453
void u_device_get_view_pose(const struct xrt_vec3 *eye_relation, uint32_t view_index, struct xrt_pose *out_pose)
Helper function for get_view_pose in an HMD driver.
Definition: u_device.c:422
A union of all output types.
Definition: xrt_defines.h:1887
Header holding common defines.
Header defining an xrt display or controller device.
Header defining the tracking system integration in Monado.