Monado OpenXR Runtime
|
Data associating a device index (in xrt_system_devices::xdevs) with a given "role" for dynamic role switching. More...
#include <xrt/xrt_system.h>
Data Fields | |
uint64_t | generation_id |
Monotonically increasing generation counter for the association between role and index. More... | |
int32_t | left |
Index in xrt_system_devices::xdevs for the user's left controller/hand, or negative if none available. More... | |
int32_t | right |
Index in xrt_system_devices::xdevs for the user's right controller/hand, or negative if none available. More... | |
int32_t | gamepad |
Index in xrt_system_devices::xdevs for the user's gamepad device, or negative if none available. More... | |
enum xrt_device_name | left_profile |
enum xrt_device_name | right_profile |
enum xrt_device_name | gamepad_profile |
Related Functions | |
(Note that these are not member functions.) | |
#define | XRT_SYSTEM_ROLES_INIT |
Guaranteed invalid constant for xrt_system_roles, not using designated initializers due to C++. More... | |
Data associating a device index (in xrt_system_devices::xdevs) with a given "role" for dynamic role switching.
For each of the named roles, a negative value means unpopulated/not available.
Populated by a call from the xrt_system_devices interface.
When the caller of xrt_system_devices_get_roles sees a change (based on comparing generation_id) the caller must do the needed actions to handle device changes. For example, for the OpenXR state tracker this may include rebinding, queuing a change to the current interaction profile, and queuing the events associated with such a change.
|
related |
Guaranteed invalid constant for xrt_system_roles, not using designated initializers due to C++.
Referenced by oxr_system_fill_in().
int32_t xrt_system_roles::gamepad |
Index in xrt_system_devices::xdevs for the user's gamepad device, or negative if none available.
uint64_t xrt_system_roles::generation_id |
Monotonically increasing generation counter for the association between role and index.
Increment whenever the roles are changed.
All valid values are greater then zero; this is to make init easier where any cache can start at zero and be guaranteed to be replaced with a new xrt_system_roles.
int32_t xrt_system_roles::left |
Index in xrt_system_devices::xdevs for the user's left controller/hand, or negative if none available.
int32_t xrt_system_roles::right |
Index in xrt_system_devices::xdevs for the user's right controller/hand, or negative if none available.