19#define QWERTY_HMD_STR "Qwerty HMD"
20#define QWERTY_HMD_TRACKER_STR QWERTY_HMD_STR " Tracker"
21#define QWERTY_LEFT_STR "Qwerty Left Controller"
22#define QWERTY_LEFT_TRACKER_STR QWERTY_LEFT_STR " Tracker"
23#define QWERTY_RIGHT_STR "Qwerty Right Controller"
24#define QWERTY_RIGHT_TRACKER_STR QWERTY_RIGHT_STR " Tracker"
60 bool backward_pressed;
65 bool look_left_pressed;
66 bool look_right_pressed;
68 bool look_down_pressed;
94 int64_t trigger_timestamp;
96 int64_t menu_timestamp;
98 int64_t squeeze_timestamp;
100 int64_t system_timestamp;
102 bool thumbstick_left_pressed;
103 bool thumbstick_right_pressed;
104 bool thumbstick_up_pressed;
105 bool thumbstick_down_pressed;
106 int64_t thumbstick_timestamp;
107 bool thumbstick_clicked;
108 int64_t thumbstick_click_timestamp;
110 bool trackpad_left_pressed;
111 bool trackpad_right_pressed;
112 bool trackpad_up_pressed;
113 bool trackpad_down_pressed;
114 int64_t trackpad_timestamp;
115 bool trackpad_clicked;
116 int64_t trackpad_click_timestamp;
u_logging_level
Logging level enum.
Definition: u_logging.h:44
struct qwerty_controller * qwerty_controller_create(bool is_left, struct qwerty_hmd *qhmd)
Create qwerty_controller.
Definition: qwerty_device.c:330
void qwerty_follow_hmd(struct qwerty_controller *qc, bool follow)
Attach/detach the pose of qc to its HMD.
Definition: qwerty_device.c:668
void qwerty_press_menu(struct qwerty_controller *qc)
Simulate pressing input/menu/click.
Definition: qwerty_device.c:582
void qwerty_release_squeeze(struct qwerty_controller *qc)
Simulate releasing input/squeeze/click.
Definition: qwerty_device.c:603
void qwerty_press_system(struct qwerty_controller *qc)
Simulate pressing input/system/click.
Definition: qwerty_device.c:610
struct qwerty_hmd * qwerty_hmd(struct xrt_device *xd)
Cast to qwerty_hmd.
Definition: qwerty_device.c:111
void qwerty_press_sprint(struct qwerty_device *qd)
Momentarily increase movement_speed until qwerty_release_sprint()
Definition: qwerty_device.c:524
void qwerty_release_system(struct qwerty_controller *qc)
Simulate releasing input/system/click.
Definition: qwerty_device.c:617
void qwerty_release_trigger(struct qwerty_controller *qc)
Simulate releasing input/trigger/value to 0.0.
Definition: qwerty_device.c:575
void qwerty_add_look_delta(struct qwerty_device *qd, float yaw, float pitch)
Add yaw and pitch movement for the next frame.
Definition: qwerty_device.c:535
void qwerty_change_movement_speed(struct qwerty_device *qd, float steps)
Change movement speed in exponential steps (usually integers, but any float allowed)
Definition: qwerty_device.c:542
void qwerty_press_trigger(struct qwerty_controller *qc)
Simulate pressing input/trigger/value to 1.0.
Definition: qwerty_device.c:568
void qwerty_release_sprint(struct qwerty_device *qd)
Stop doing what qwerty_press_sprint started.
Definition: qwerty_device.c:529
struct qwerty_controller * qwerty_controller(struct xrt_device *xd)
Cast to qwerty_controller.
Definition: qwerty_device.c:123
struct qwerty_hmd * qwerty_hmd_create(void)
Create qwerty_hmd.
Definition: qwerty_device.c:276
void qwerty_release_all(struct qwerty_device *qd)
Release all movement input.
Definition: qwerty_device.c:548
void qwerty_reset_controller_pose(struct qwerty_controller *qc)
Reset controller to initial pose and makes it follow the HMD.
Definition: qwerty_device.c:694
struct qwerty_device * qwerty_device(struct xrt_device *xd)
Cast to qwerty_device.
Definition: qwerty_device.c:99
void qwerty_press_squeeze(struct qwerty_controller *qc)
Simulate pressing input/squeeze/click.
Definition: qwerty_device.c:596
void qwerty_release_menu(struct qwerty_controller *qc)
Simulate releasing input/menu/click.
Definition: qwerty_device.c:589
Supports input actions and can be attached to the HMD pose.
Definition: qwerty_device.h:90
bool follow_hmd
Only used when a qwerty_hmd exists in the system.
Definition: qwerty_device.h:123
Fake device that modifies its tracked pose through its methods.
Definition: qwerty_device.h:51
float pitch_delta
Similar to yaw_delta
Definition: qwerty_device.h:72
struct xrt_pose pose
Internal pose state.
Definition: qwerty_device.h:53
struct qwerty_system * sys
Reference to the system this device is in.
Definition: qwerty_device.h:54
bool sprint_pressed
Movement speed boost.
Definition: qwerty_device.h:70
float look_speed
In radians per frame.
Definition: qwerty_device.h:64
float yaw_delta
How much extra yaw to add for the next pose.
Definition: qwerty_device.h:71
float movement_speed
In meters per frame.
Definition: qwerty_device.h:56
Definition: qwerty_device.h:80
Container of qwerty devices and driver properties.
Definition: qwerty_device.h:35
struct qwerty_hmd * hmd
Can be NULL.
Definition: qwerty_device.h:36
bool process_keys
If false disable keyboard and mouse input.
Definition: qwerty_device.h:40
bool hmd_focused
For gui var tracking only, true if hmd is the focused device.
Definition: qwerty_device.h:41
struct qwerty_controller * lctrl
Cannot be NULL.
Definition: qwerty_device.h:37
bool rctrl_focused
Same as hmd_focused but for the right controller.
Definition: qwerty_device.h:43
bool lctrl_focused
Same as hmd_focused but for the left controller.
Definition: qwerty_device.h:42
struct qwerty_controller * rctrl
Cannot be NULL.
Definition: qwerty_device.h:38
A single HMD or input device.
Definition: xrt_device.h:281
A pose composed of a position and orientation.
Definition: xrt_defines.h:467
Basic logging functionality.
Header defining an xrt display or controller device.