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_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. More... | |
static 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. More... | |
static 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. More... | |
static void | xrt_system_devices_destroy (struct xrt_system_devices **xsysd_ptr) |
Destroy an xrt_system_devices and owned devices - helper function. More... | |
Data Fields | |
struct xrt_device * | xdevs [(32)] |
All devices known in the system. More... | |
size_t | xdev_count |
The number of elements in xdevs that are valid. More... | |
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 xrt_device * left | |
An observing pointer to the device providing hand tracking for the left hand (optional). More... | |
struct xrt_device * right | |
An observing pointer to the device providing hand tracking for the right hand (optional). More... | |
} 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. More... | |
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. More... | |
xrt_result_t(* | feature_inc )(struct xrt_system_devices *xsysd, enum xrt_device_feature_type type) |
Increment the usage count of a feature. More... | |
xrt_result_t(* | feature_dec )(struct xrt_system_devices *xsysd, enum xrt_device_feature_type type) |
Decrement the usage count of a feature. More... | |
void(* | destroy )(struct xrt_system_devices *xsysd) |
Destroy all the devices that are owned by this system devices. More... | |
A collection of xrt_device, and an interface for identifying the roles they have been assigned.
|
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.
Referenced by u_builder_roles_helper_open_system().
|
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.
|
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.
|
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).
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 r_create_devices(), sdl_system_devices_init(), steamvr_lh_create_devices(), u_system_devices_allocate(), u_system_devices_static_allocate(), and xrt_system_devices_destroy().
struct xrt_device* xrt_system_devices::eyes |
An observing pointer to the device providing eye tracking (optional).
struct xrt_device* xrt_system_devices::face |
An observing pointer to the device providing face tracking (optional).
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. |
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. |
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 u_builder_roles_helper_open_system().
struct xrt_device* xrt_system_devices::head |
An observing pointer to the device serving as the "head" (and HMD).
Required.
Referenced by u_builder_roles_helper_open_system().
struct xrt_device* xrt_system_devices::left |
An observing pointer to the device providing hand tracking for the left hand (optional).
Currently this is used for both optical and controller driven hand-tracking.
Referenced by u_builder_roles_helper_open_system().
struct xrt_device* xrt_system_devices::right |
An observing pointer to the device providing hand tracking for the right hand (optional).
Currently this is used for both optical and controller driven hand-tracking.
Referenced by u_builder_roles_helper_open_system().
struct { ... } xrt_system_devices::static_roles |
Observing pointers for devices in some static (unchangeable) roles.
All pointers in this struct must also exist in xdevs. The association between a member of this struct and a given device cannot change during runtime.
Referenced by u_builder_roles_helper_open_system().
size_t xrt_system_devices::xdev_count |
The number of elements in xdevs that are valid.
Referenced by u_builder_roles_helper_open_system(), and u_system_devices_get_ht_device().
struct xrt_device* xrt_system_devices::xdevs[(32)] |
All devices known in the system.
This is conventionally considered the "owning" reference to the devices. Valid entries are contiguous.
Referenced by u_builder_roles_helper_open_system(), u_system_devices_close(), and u_system_devices_get_ht_device().