22#define QWERTY_HMD_STR "Qwerty HMD"
23#define QWERTY_HMD_TRACKER_STR QWERTY_HMD_STR " Tracker"
24#define QWERTY_LEFT_STR "Qwerty Left Controller"
25#define QWERTY_LEFT_TRACKER_STR QWERTY_LEFT_STR " Tracker"
26#define QWERTY_RIGHT_STR "Qwerty Right Controller"
27#define QWERTY_RIGHT_TRACKER_STR QWERTY_RIGHT_STR " Tracker"
63 bool backward_pressed;
68 bool look_left_pressed;
69 bool look_right_pressed;
71 bool look_down_pressed;
99 int64_t trigger_timestamp;
101 int64_t menu_timestamp;
102 bool squeeze_clicked;
103 int64_t squeeze_timestamp;
105 int64_t system_timestamp;
107 bool thumbstick_left_pressed;
108 bool thumbstick_right_pressed;
109 bool thumbstick_up_pressed;
110 bool thumbstick_down_pressed;
111 int64_t thumbstick_timestamp;
112 bool thumbstick_clicked;
113 int64_t thumbstick_click_timestamp;
115 bool trackpad_left_pressed;
116 bool trackpad_right_pressed;
117 bool trackpad_up_pressed;
118 bool trackpad_down_pressed;
119 int64_t trackpad_timestamp;
120 bool trackpad_clicked;
121 int64_t trackpad_click_timestamp;
u_logging_level
Logging level enum.
Definition u_logging.h:45
int64_t time_duration_ns
Integer duration type in nanoseconds.
Definition u_time.h:88
void qwerty_follow_hmd(struct qwerty_controller *qc, bool follow)
Attach/detach the pose of qc to its HMD.
Definition qwerty_device.c:669
void qwerty_press_menu(struct qwerty_controller *qc)
Simulate pressing input/menu/click.
Definition qwerty_device.c:583
void qwerty_release_squeeze(struct qwerty_controller *qc)
Simulate releasing input/squeeze/click.
Definition qwerty_device.c:604
void qwerty_press_system(struct qwerty_controller *qc)
Simulate pressing input/system/click.
Definition qwerty_device.c:611
void qwerty_press_sprint(struct qwerty_device *qd)
Momentarily increase movement_speed until qwerty_release_sprint()
Definition qwerty_device.c:525
void qwerty_release_system(struct qwerty_controller *qc)
Simulate releasing input/system/click.
Definition qwerty_device.c:618
void qwerty_release_trigger(struct qwerty_controller *qc)
Simulate releasing input/trigger/value to 0.0.
Definition qwerty_device.c:576
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:536
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:543
void qwerty_press_trigger(struct qwerty_controller *qc)
Simulate pressing input/trigger/value to 1.0.
Definition qwerty_device.c:569
void qwerty_release_sprint(struct qwerty_device *qd)
Stop doing what qwerty_press_sprint started.
Definition qwerty_device.c:530
struct qwerty_hmd * qwerty_hmd_create(void)
Create qwerty_hmd.
Definition qwerty_device.c:272
void qwerty_release_all(struct qwerty_device *qd)
Release all movement input.
Definition qwerty_device.c:549
void qwerty_reset_controller_pose(struct qwerty_controller *qc)
Reset controller to initial pose and makes it follow the HMD.
Definition qwerty_device.c:695
void qwerty_press_squeeze(struct qwerty_controller *qc)
Simulate pressing input/squeeze/click.
Definition qwerty_device.c:597
void qwerty_release_menu(struct qwerty_controller *qc)
Simulate releasing input/menu/click.
Definition qwerty_device.c:590
struct qwerty_controller * qwerty_controller_create(bool is_left, struct qwerty_hmd *qhmd)
Definition qwerty_device.c:329
Supports input actions and can be attached to the HMD pose.
Definition qwerty_device.h:95
bool follow_hmd
Only used when a qwerty_hmd exists in the system.
Definition qwerty_device.h:128
Fake device that modifies its tracked pose through its methods.
Definition qwerty_device.h:54
float pitch_delta
Similar to yaw_delta
Definition qwerty_device.h:75
struct xrt_pose pose
Internal pose state.
Definition qwerty_device.h:56
struct qwerty_system * sys
Reference to the system this device is in.
Definition qwerty_device.h:57
bool sprint_pressed
Movement speed boost.
Definition qwerty_device.h:73
float look_speed
In radians per frame.
Definition qwerty_device.h:67
float yaw_delta
How much extra yaw to add for the next pose.
Definition qwerty_device.h:74
float movement_speed
In meters per frame.
Definition qwerty_device.h:59
Definition qwerty_device.h:83
Container of qwerty devices and driver properties.
Definition qwerty_device.h:38
struct qwerty_hmd * hmd
Can be NULL.
Definition qwerty_device.h:39
bool process_keys
If false disable keyboard and mouse input.
Definition qwerty_device.h:43
bool hmd_focused
For gui var tracking only, true if hmd is the focused device.
Definition qwerty_device.h:44
struct qwerty_controller * lctrl
Cannot be NULL.
Definition qwerty_device.h:40
bool rctrl_focused
Same as hmd_focused but for the right controller.
Definition qwerty_device.h:46
bool lctrl_focused
Same as hmd_focused but for the left controller.
Definition qwerty_device.h:45
struct qwerty_controller * rctrl
Cannot be NULL.
Definition qwerty_device.h:41
A single HMD or input device.
Definition xrt_device.h:345
A pose composed of a position and orientation.
Definition xrt_defines.h:535
Basic logging functionality.
Time-keeping: a clock that is steady, convertible to system time, and ideally high-resolution.
Header defining an xrt display or controller device.