Monado OpenXR Runtime
|
Driver for emulated HMD and controllers through keyboard and mouse. More...
Files | |
file | qwerty_device.c |
Implementation of qwerty_device related methods. | |
file | qwerty_device.h |
Internal header for qwerty_device and its friends. | |
file | qwerty_interface.h |
Interface to Qwerty driver. | |
file | qwerty_prober.c |
Qwerty devices autoprober. | |
file | qwerty_sdl.c |
Connection between user-generated SDL events and qwerty devices. | |
file | target_builder_qwerty.c |
Qwerty devices builder. | |
Data Structures | |
struct | qwerty_system |
Container of qwerty devices and driver properties. More... | |
struct | qwerty_device |
Fake device that modifies its tracked pose through its methods. More... | |
struct | qwerty_hmd |
struct | qwerty_controller |
Supports input actions and can be attached to the HMD pose. More... | |
Functions | |
void | qwerty_process_event (struct xrt_device **xdevs, size_t xdev_count, SDL_Event event) |
Process an SDL_Event (like a key press) and dispatches a suitable action to the appropriate qwerty_device. More... | |
xrt_result_t | qwerty_create_devices (enum u_logging_level log_level, struct xrt_device **out_hmd, struct xrt_device **out_left, struct xrt_device **out_right) |
Create all qwerty devices. More... | |
struct qwerty_system * | qwerty_system::qwerty_system_create (struct qwerty_hmd *qhmd, struct qwerty_controller *qleft, struct qwerty_controller *qright, enum u_logging_level log_level) |
struct qwerty_device * | qwerty_device::qwerty_device (struct xrt_device *xd) |
Cast to qwerty_device. More... | |
void | qwerty_device::qwerty_press_left (struct qwerty_device *qd) |
void | qwerty_device::qwerty_release_left (struct qwerty_device *qd) |
void | qwerty_device::qwerty_press_right (struct qwerty_device *qd) |
void | qwerty_device::qwerty_release_right (struct qwerty_device *qd) |
void | qwerty_device::qwerty_press_forward (struct qwerty_device *qd) |
void | qwerty_device::qwerty_release_forward (struct qwerty_device *qd) |
void | qwerty_device::qwerty_press_backward (struct qwerty_device *qd) |
void | qwerty_device::qwerty_release_backward (struct qwerty_device *qd) |
void | qwerty_device::qwerty_press_up (struct qwerty_device *qd) |
void | qwerty_device::qwerty_release_up (struct qwerty_device *qd) |
void | qwerty_device::qwerty_press_down (struct qwerty_device *qd) |
void | qwerty_device::qwerty_release_down (struct qwerty_device *qd) |
void | qwerty_device::qwerty_press_look_left (struct qwerty_device *qd) |
void | qwerty_device::qwerty_release_look_left (struct qwerty_device *qd) |
void | qwerty_device::qwerty_press_look_right (struct qwerty_device *qd) |
void | qwerty_device::qwerty_release_look_right (struct qwerty_device *qd) |
void | qwerty_device::qwerty_press_look_up (struct qwerty_device *qd) |
void | qwerty_device::qwerty_release_look_up (struct qwerty_device *qd) |
void | qwerty_device::qwerty_press_look_down (struct qwerty_device *qd) |
void | qwerty_device::qwerty_release_look_down (struct qwerty_device *qd) |
void | qwerty_device::qwerty_press_sprint (struct qwerty_device *qd) |
Momentarily increase movement_speed until qwerty_release_sprint() More... | |
void | qwerty_device::qwerty_release_sprint (struct qwerty_device *qd) |
Stop doing what qwerty_press_sprint started. More... | |
void | qwerty_device::qwerty_add_look_delta (struct qwerty_device *qd, float yaw, float pitch) |
Add yaw and pitch movement for the next frame. More... | |
void | qwerty_device::qwerty_change_movement_speed (struct qwerty_device *qd, float steps) |
Change movement speed in exponential steps (usually integers, but any float allowed) More... | |
void | qwerty_device::qwerty_release_all (struct qwerty_device *qd) |
Release all movement input. More... | |
struct qwerty_hmd * | qwerty_hmd::qwerty_hmd_create (void) |
Create qwerty_hmd. More... | |
struct qwerty_hmd * | qwerty_hmd::qwerty_hmd (struct xrt_device *xd) |
Cast to qwerty_hmd. More... | |
struct qwerty_controller * | qwerty_controller::qwerty_controller_create (bool is_left, struct qwerty_hmd *qhmd) |
Create qwerty_controller. More... | |
struct qwerty_controller * | qwerty_controller::qwerty_controller (struct xrt_device *xd) |
Cast to qwerty_controller. More... | |
void | qwerty_controller::qwerty_press_trigger (struct qwerty_controller *qc) |
Simulate pressing input/trigger/value to 1.0. More... | |
void | qwerty_controller::qwerty_release_trigger (struct qwerty_controller *qc) |
Simulate releasing input/trigger/value to 0.0. More... | |
void | qwerty_controller::qwerty_press_menu (struct qwerty_controller *qc) |
Simulate pressing input/menu/click. More... | |
void | qwerty_controller::qwerty_release_menu (struct qwerty_controller *qc) |
Simulate releasing input/menu/click. More... | |
void | qwerty_controller::qwerty_press_squeeze (struct qwerty_controller *qc) |
Simulate pressing input/squeeze/click. More... | |
void | qwerty_controller::qwerty_release_squeeze (struct qwerty_controller *qc) |
Simulate releasing input/squeeze/click. More... | |
void | qwerty_controller::qwerty_press_system (struct qwerty_controller *qc) |
Simulate pressing input/system/click. More... | |
void | qwerty_controller::qwerty_release_system (struct qwerty_controller *qc) |
Simulate releasing input/system/click. More... | |
void | qwerty_controller::qwerty_press_thumbstick_left (struct qwerty_controller *qc) |
void | qwerty_controller::qwerty_release_thumbstick_left (struct qwerty_controller *qc) |
void | qwerty_controller::qwerty_press_thumbstick_right (struct qwerty_controller *qc) |
void | qwerty_controller::qwerty_release_thumbstick_right (struct qwerty_controller *qc) |
void | qwerty_controller::qwerty_press_thumbstick_up (struct qwerty_controller *qc) |
void | qwerty_controller::qwerty_release_thumbstick_up (struct qwerty_controller *qc) |
void | qwerty_controller::qwerty_press_thumbstick_down (struct qwerty_controller *qc) |
void | qwerty_controller::qwerty_release_thumbstick_down (struct qwerty_controller *qc) |
void | qwerty_controller::qwerty_press_thumbstick_click (struct qwerty_controller *qc) |
void | qwerty_controller::qwerty_release_thumbstick_click (struct qwerty_controller *qc) |
void | qwerty_controller::qwerty_press_trackpad_left (struct qwerty_controller *qc) |
void | qwerty_controller::qwerty_release_trackpad_left (struct qwerty_controller *qc) |
void | qwerty_controller::qwerty_press_trackpad_right (struct qwerty_controller *qc) |
void | qwerty_controller::qwerty_release_trackpad_right (struct qwerty_controller *qc) |
void | qwerty_controller::qwerty_press_trackpad_up (struct qwerty_controller *qc) |
void | qwerty_controller::qwerty_release_trackpad_up (struct qwerty_controller *qc) |
void | qwerty_controller::qwerty_press_trackpad_down (struct qwerty_controller *qc) |
void | qwerty_controller::qwerty_release_trackpad_down (struct qwerty_controller *qc) |
void | qwerty_controller::qwerty_press_trackpad_click (struct qwerty_controller *qc) |
void | qwerty_controller::qwerty_release_trackpad_click (struct qwerty_controller *qc) |
void | qwerty_controller::qwerty_follow_hmd (struct qwerty_controller *qc, bool follow) |
Attach/detach the pose of qc to its HMD. More... | |
void | qwerty_controller::qwerty_reset_controller_pose (struct qwerty_controller *qc) |
Reset controller to initial pose and makes it follow the HMD. More... | |
Driver for emulated HMD and controllers through keyboard and mouse.
void qwerty_add_look_delta | ( | struct qwerty_device * | qd, |
float | yaw, | ||
float | pitch | ||
) |
Add yaw and pitch movement for the next frame.
References qwerty_device::look_speed, qwerty_device::pitch_delta, and qwerty_device::yaw_delta.
void qwerty_change_movement_speed | ( | struct qwerty_device * | qd, |
float | steps | ||
) |
Change movement speed in exponential steps (usually integers, but any float allowed)
References qwerty_device::movement_speed.
struct qwerty_controller * qwerty_controller | ( | struct xrt_device * | xd | ) |
Cast to qwerty_controller.
Ensures returning a valid controller or crashing.
struct qwerty_controller * qwerty_controller_create | ( | bool | is_left, |
struct qwerty_hmd * | qhmd | ||
) |
Create qwerty_controller.
Crash on failure.
xrt_result_t qwerty_create_devices | ( | enum u_logging_level | log_level, |
struct xrt_device ** | out_hmd, | ||
struct xrt_device ** | out_left, | ||
struct xrt_device ** | out_right | ||
) |
#include <drivers/qwerty/qwerty_interface.h>
Create all qwerty devices.
struct qwerty_device * qwerty_device | ( | struct xrt_device * | xd | ) |
Cast to qwerty_device.
Ensures returning a valid device or crashing.
void qwerty_follow_hmd | ( | struct qwerty_controller * | qc, |
bool | follow | ||
) |
Attach/detach the pose of qc
to its HMD.
Only works when a qwerty_hmd is present.
References qwerty_controller::follow_hmd, qwerty_system::hmd, xrt_relation_chain::m_relation_chain_push_inverted_pose_if_not_identity(), xrt_relation_chain::m_relation_chain_push_pose(), xrt_relation_chain::m_relation_chain_resolve(), qwerty_device::pose, qwerty_device::sys, and xrt_space_relation::XRT_SPACE_RELATION_ZERO.
struct qwerty_hmd * qwerty_hmd | ( | struct xrt_device * | xd | ) |
Cast to qwerty_hmd.
Ensures returning a valid HMD or crashing.
struct qwerty_hmd * qwerty_hmd_create | ( | void | ) |
Create qwerty_hmd.
Crash on failure.
void qwerty_press_menu | ( | struct qwerty_controller * | qc | ) |
Simulate pressing input/menu/click.
References os_monotonic_get_ns().
void qwerty_press_sprint | ( | struct qwerty_device * | qd | ) |
Momentarily increase movement_speed
until qwerty_release_sprint()
References qwerty_device::sprint_pressed.
void qwerty_press_squeeze | ( | struct qwerty_controller * | qc | ) |
Simulate pressing input/squeeze/click.
References os_monotonic_get_ns().
void qwerty_press_system | ( | struct qwerty_controller * | qc | ) |
Simulate pressing input/system/click.
References os_monotonic_get_ns().
void qwerty_press_trigger | ( | struct qwerty_controller * | qc | ) |
Simulate pressing input/trigger/value to 1.0.
References os_monotonic_get_ns().
void qwerty_process_event | ( | struct xrt_device ** | xdevs, |
size_t | xdev_count, | ||
SDL_Event | event | ||
) |
#include <drivers/qwerty/qwerty_interface.h>
Process an SDL_Event (like a key press) and dispatches a suitable action to the appropriate qwerty_device.
void qwerty_release_all | ( | struct qwerty_device * | qd | ) |
Release all movement input.
References qwerty_device::pitch_delta, qwerty_device::sprint_pressed, and qwerty_device::yaw_delta.
void qwerty_release_menu | ( | struct qwerty_controller * | qc | ) |
Simulate releasing input/menu/click.
References os_monotonic_get_ns().
void qwerty_release_sprint | ( | struct qwerty_device * | qd | ) |
Stop doing what qwerty_press_sprint started.
References qwerty_device::sprint_pressed.
void qwerty_release_squeeze | ( | struct qwerty_controller * | qc | ) |
Simulate releasing input/squeeze/click.
References os_monotonic_get_ns().
void qwerty_release_system | ( | struct qwerty_controller * | qc | ) |
Simulate releasing input/system/click.
References os_monotonic_get_ns().
void qwerty_release_trigger | ( | struct qwerty_controller * | qc | ) |
Simulate releasing input/trigger/value to 0.0.
References os_monotonic_get_ns().
void qwerty_reset_controller_pose | ( | struct qwerty_controller * | qc | ) |
Reset controller to initial pose and makes it follow the HMD.
References qwerty_system::hmd, and qwerty_device::sys.