|
Monado OpenXR Runtime
|
A collection of xrt_device, and an interface for identifying the roles they have been assigned. More...
#include <xrt/xrt_system.h>


Static Public Member Functions | |
| static XRT_NONNULL_ALL xrt_result_t | xrt_system_devices_get_roles (struct xrt_system_devices *xsysd, struct xrt_system_roles *out_roles) |
| Function to get the dynamic input device roles from this system devices, see xrt_system_roles for more information. | |
| static XRT_NONNULL_ALL xrt_result_t | xrt_system_devices_create_body_tracker (struct xrt_system_devices *xsysd, const struct xrt_body_tracker_create_info *info, struct xrt_body_tracker **out_xbt) |
| Create a xrt_body_tracker from this system devices object. | |
| static XRT_NONNULL_ALL xrt_result_t | xrt_system_devices_create_hand_tracker (struct xrt_system_devices *xsysd, const struct xrt_hand_tracker_create_info *info, struct xrt_hand_tracker **out_xht) |
| Create a xrt_hand_tracker from this system devices object. | |
| static XRT_NONNULL_ALL xrt_result_t | xrt_system_devices_create_io_cache (struct xrt_system_devices *xsysd, struct xrt_space_overseer *xso, struct xrt_io_cache **out_xic) |
| Create a xrt_io_cache from this system devices object. | |
| static XRT_NONNULL_ALL xrt_result_t | xrt_system_devices_feature_inc (struct xrt_system_devices *xsysd, enum xrt_device_feature_type type) |
| Increment the usage count of a feature. | |
| static XRT_NONNULL_ALL xrt_result_t | xrt_system_devices_feature_dec (struct xrt_system_devices *xsysd, enum xrt_device_feature_type type) |
| Decrement the usage count of a feature. | |
| static XRT_NONNULL_ALL void | xrt_system_devices_destroy (struct xrt_system_devices **xsysd_ptr) |
| Destroy an xrt_system_devices and owned devices - helper function. | |
Data Fields | ||
| struct xrt_system_devices_supported | supported | |
| Features supported by these system devices. | ||
| struct xrt_device * | static_xdevs [XRT_SYSTEM_MAX_DEVICES] | |
| All devices known in the system. | ||
| size_t | static_xdev_count | |
| The number of elements in static_xdevs that are valid in the static device list. | ||
| struct { | ||
| struct xrt_device * head | ||
| An observing pointer to the device serving as the "head" (and HMD). More... | ||
| struct xrt_device * eyes | ||
| An observing pointer to the device providing eye tracking (optional). More... | ||
| struct xrt_device * face | ||
| An observing pointer to the device providing face tracking (optional). More... | ||
| struct xrt_device * body | ||
| An observing pointer to the device providing body tracking (optional). More... | ||
| struct { | ||
| struct { | ||
| struct xrt_device * left | ||
| An observing pointer to the device providing unobstructed hand-tracking for the left hand (optional). More... | ||
| struct xrt_device * right | ||
| An observing pointer to the device providing unobstructed hand-tracking for the right hand (optional). More... | ||
| } unobstructed | ||
| struct { | ||
| struct xrt_device * left | ||
| An observing pointer to the device providing conforming (controller) hand-tracking for the left hand (optional). More... | ||
| struct xrt_device * right | ||
| An observing pointer to the device providing conforming (controller) hand-tracking for the right hand (optional). More... | ||
| } conforming | ||
| } hand_tracking | ||
| Devices providing optical (or otherwise more directly measured than from controller estimation) hand tracking. More... | ||
| } | static_roles | |
| Observing pointers for devices in some static (unchangeable) roles. | ||
| xrt_result_t(* | get_roles )(struct xrt_system_devices *xsysd, struct xrt_system_roles *out_roles) | |
| Function to get the dynamic input device roles from this system devices, see xrt_system_roles for more information. | ||
| xrt_result_t(* | create_body_tracker )(struct xrt_system_devices *xsysd, const struct xrt_body_tracker_create_info *info, struct xrt_body_tracker **out_xbt) | |
| Create a xrt_body_tracker from this system devices object. | ||
| xrt_result_t(* | create_hand_tracker )(struct xrt_system_devices *xsysd, const struct xrt_hand_tracker_create_info *info, struct xrt_hand_tracker **out_xht) | |
| Create a xrt_hand_tracker from this system devices object. | ||
| xrt_result_t(* | create_io_cache )(struct xrt_system_devices *xsysd, struct xrt_space_overseer *xso, struct xrt_io_cache **out_xic) | |
| Create a xrt_io_cache from this system devices object. | ||
| xrt_result_t(* | feature_inc )(struct xrt_system_devices *xsysd, enum xrt_device_feature_type type) | |
| Increment the usage count of a feature. | ||
| xrt_result_t(* | feature_dec )(struct xrt_system_devices *xsysd, enum xrt_device_feature_type type) | |
| Decrement the usage count of a feature. | ||
| void(* | destroy )(struct xrt_system_devices *xsysd) | |
| Destroy all the devices that are owned by this system devices. | ||
A collection of xrt_device, and an interface for identifying the roles they have been assigned.
|
inlinestatic |
Create a xrt_body_tracker from this system devices object.
| xsysd | Pointer to self. |
| info | Body-tracker creation info. |
| out_xbt | Created body tracker. |
References create_body_tracker.
|
inlinestatic |
Create a xrt_hand_tracker from this system devices object.
| xsysd | Pointer to self. |
| info | Hand-tracker creation info. |
| out_xht | Created hand tracker. |
References create_hand_tracker.
|
inlinestatic |
Create a xrt_io_cache from this system devices object.
| xsysd | Pointer to self. |
| xso | Space overseer used when creating input spaces. |
| out_xic | Created input/output cache. |
References create_io_cache.
|
inlinestatic |
Destroy an xrt_system_devices and owned devices - helper function.
| [in,out] | xsysd_ptr | A pointer to the xrt_system_devices struct pointer. |
Will destroy the system devices if *xsysd_ptr is not NULL. Will then set *xsysd_ptr to NULL.
References destroy.
|
inlinestatic |
Decrement the usage count of a feature.
When the feature is not used by the current application any more, then the feature will be ended.
| xsysd | Pointer to self |
| type | Which feature is being counted. |
Helper for calling through the function pointer.
References feature_dec.
|
inlinestatic |
Increment the usage count of a feature.
When the feature is used for the first time, then the feature will be begun.
| xsysd | Pointer to self |
| type | Which feature is being counted. |
Helper for calling through the function pointer.
References feature_inc.
|
inlinestatic |
Function to get the dynamic input device roles from this system devices, see xrt_system_roles for more information.
| xsysd | Pointer to self | |
| [out] | out_roles | Pointer to xrt_system_roles |
Helper for calling through the function pointer.
References get_roles.
| struct xrt_device* xrt_system_devices::body |
An observing pointer to the device providing body tracking (optional).
Referenced by u_system_devices_supported_from_static_roles().
| xrt_result_t(* xrt_system_devices::create_body_tracker) (struct xrt_system_devices *xsysd, const struct xrt_body_tracker_create_info *info, struct xrt_body_tracker **out_xbt) |
Create a xrt_body_tracker from this system devices object.
| xsysd | Pointer to self. |
| info | Body-tracker creation info. |
| out_xbt | Created body tracker. |
Referenced by b_system_devices_allocate(), b_system_devices_static_allocate(), r_create_devices(), sdl_system_devices_init(), and xrt_system_devices_create_body_tracker().
| xrt_result_t(* xrt_system_devices::create_hand_tracker) (struct xrt_system_devices *xsysd, const struct xrt_hand_tracker_create_info *info, struct xrt_hand_tracker **out_xht) |
Create a xrt_hand_tracker from this system devices object.
| xsysd | Pointer to self. |
| info | Hand-tracker creation info. |
| out_xht | Created hand tracker. |
Referenced by b_system_devices_allocate(), b_system_devices_static_allocate(), r_create_devices(), sdl_system_devices_init(), and xrt_system_devices_create_hand_tracker().
| xrt_result_t(* xrt_system_devices::create_io_cache) (struct xrt_system_devices *xsysd, struct xrt_space_overseer *xso, struct xrt_io_cache **out_xic) |
Create a xrt_io_cache from this system devices object.
| xsysd | Pointer to self. |
| xso | Space overseer used when creating input spaces. |
| out_xic | Created input/output cache. |
Referenced by b_system_devices_allocate(), b_system_devices_static_allocate(), r_create_devices(), sdl_system_devices_init(), and xrt_system_devices_create_io_cache().
| void(* xrt_system_devices::destroy) (struct xrt_system_devices *xsysd) |
Destroy all the devices that are owned by this system devices.
Code consuming this interface should use xrt_system_devices_destroy.
| xsysd | Pointer to self |
Referenced by b_system_devices_allocate(), and xrt_system_devices_destroy().
| struct xrt_device* xrt_system_devices::eyes |
An observing pointer to the device providing eye tracking (optional).
Referenced by t_builder_roles_helper_open_system(), and u_system_devices_supported_from_static_roles().
| struct xrt_device* xrt_system_devices::face |
An observing pointer to the device providing face tracking (optional).
Referenced by t_builder_roles_helper_open_system(), and u_system_devices_supported_from_static_roles().
| xrt_result_t(* xrt_system_devices::feature_dec) (struct xrt_system_devices *xsysd, enum xrt_device_feature_type type) |
Decrement the usage count of a feature.
When the feature is not used by the current application any more, then the feature will be ended.
| xsysd | Pointer to self |
| type | Which feature is being counted. |
Referenced by b_system_devices_static_allocate(), and xrt_system_devices_feature_dec().
| xrt_result_t(* xrt_system_devices::feature_inc) (struct xrt_system_devices *xsysd, enum xrt_device_feature_type type) |
Increment the usage count of a feature.
When the feature is used for the first time, then the feature will be begun.
| xsysd | Pointer to self |
| type | Which feature is being counted. |
Referenced by b_system_devices_static_allocate(), and xrt_system_devices_feature_inc().
| xrt_result_t(* xrt_system_devices::get_roles) (struct xrt_system_devices *xsysd, struct xrt_system_roles *out_roles) |
Function to get the dynamic input device roles from this system devices, see xrt_system_roles for more information.
| xsysd | Pointer to self | |
| [out] | out_roles | Pointer to xrt_system_roles |
Referenced by xrt_system_devices_get_roles().
| struct { ... } xrt_system_devices::hand_tracking |
Devices providing optical (or otherwise more directly measured than from controller estimation) hand tracking.
Referenced by r_create_devices(), and u_system_devices_supported_from_static_roles().
| struct xrt_device* xrt_system_devices::head |
An observing pointer to the device serving as the "head" (and HMD).
Required.
Referenced by CServerDriver_Monado::Init(), r_create_devices(), remote_builder_setup_space_overseer(), sdl_system_devices_init(), t_builder_roles_helper_open_system(), and u_system_devices_supported_from_static_roles().
| struct xrt_device* xrt_system_devices::left |
An observing pointer to the device providing unobstructed hand-tracking for the left hand (optional).
An observing pointer to the device providing conforming (controller) hand-tracking for the left hand (optional).
can reference the same xrt_device instance as hand_tracking::conforming::left, if provides both input types.
can reference the same xrt_device instance as hand_tracking::unobstructed::left, if provides both input types.
Referenced by b_system_devices_static_finalize(), r_create_devices(), and u_system_devices_supported_from_static_roles().
| struct xrt_device* xrt_system_devices::right |
An observing pointer to the device providing unobstructed hand-tracking for the right hand (optional).
An observing pointer to the device providing conforming (controller) hand-tracking for the right hand (optional).
can reference the same xrt_device instance as hand_tracking::conforming::right, if provides both input types.
can reference the same xrt_device instance as hand_tracking::unobstructed::right, if provides both input types.
Referenced by b_system_devices_static_finalize(), r_create_devices(), and u_system_devices_supported_from_static_roles().
| struct { ... } xrt_system_devices::static_roles |
Observing pointers for devices in some static (unchangeable) roles.
All pointers in this struct must also exist in static_xdevs. The association between a member of this struct and a given device cannot change during runtime.
Referenced by CServerDriver_Monado::Init(), r_create_devices(), remote_builder_setup_space_overseer(), sdl_system_devices_init(), t_builder_roles_helper_open_system(), and u_system_devices_supported_from_static_roles().
| size_t xrt_system_devices::static_xdev_count |
The number of elements in static_xdevs that are valid in the static device list.
Referenced by gui_program::gui_prober_update(), r_create_devices(), remote_builder_setup_space_overseer(), sdl_system_devices_init(), simulated_open_system_impl(), steamvr_lh_create_devices(), t_builder_roles_helper_open_system(), and u_system_devices_get_ht_device().
| struct xrt_device* xrt_system_devices::static_xdevs[XRT_SYSTEM_MAX_DEVICES] |
All devices known in the system.
This is conventionally considered the "owning" reference to the devices. Valid entries are contiguous.
Referenced by b_system_devices_close(), gui_program::gui_prober_update(), CServerDriver_Monado::Init(), r_create_devices(), remote_builder_setup_space_overseer(), sdl_system_devices_init(), simulated_open_system_impl(), steamvr_lh_create_devices(), t_builder_roles_helper_open_system(), and u_system_devices_get_ht_device().
| struct xrt_system_devices_supported xrt_system_devices::supported |
Features supported by these system devices.
Filled in by the system at creation time and is static, it doesn't change during runtime. State trackers use this field to decide which features to announce support for to applications, for instance which extensions or system properties to expose.
On systems that support hot-plug the capabilities themselves may come and go, for example a xrt_hand_tracker object may stop returning hand poses when a device is unplugged. So for features backed by hot-plug capable interfaces, such as hand-tracking, these fields only describe possible capabilities rather than currently available ones.
Referenced by b_system_devices_static_finalize(), r_create_devices(), and sdl_system_devices_init().