mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-01 12:46:12 +00:00
d/remote: expose hand active state to remote gui
This commit is contained in:
parent
51d321824f
commit
2188d8afc2
|
@ -145,6 +145,7 @@ r_device_get_hand_tracking(struct xrt_device *xdev,
|
||||||
xrt_device_get_tracked_pose(xdev, XRT_INPUT_SIMPLE_GRIP_POSE, requested_timestamp_ns, &relation);
|
xrt_device_get_tracked_pose(xdev, XRT_INPUT_SIMPLE_GRIP_POSE, requested_timestamp_ns, &relation);
|
||||||
|
|
||||||
u_hand_joints_set_out_data(&rd->hand_tracking, hand, &relation, &hand_on_handle_pose, out_value);
|
u_hand_joints_set_out_data(&rd->hand_tracking, hand, &relation, &hand_on_handle_pose, out_value);
|
||||||
|
out_value->is_active = latest->hand_tracking_active;
|
||||||
|
|
||||||
// This is a lie
|
// This is a lie
|
||||||
*out_timestamp_ns = requested_timestamp_ns;
|
*out_timestamp_ns = requested_timestamp_ns;
|
||||||
|
|
|
@ -172,11 +172,14 @@ r_create_devices(uint16_t port,
|
||||||
r->reset.hmd.pose.position.y = 1.6f;
|
r->reset.hmd.pose.position.y = 1.6f;
|
||||||
r->reset.hmd.pose.orientation.w = 1.0f;
|
r->reset.hmd.pose.orientation.w = 1.0f;
|
||||||
r->reset.left.active = true;
|
r->reset.left.active = true;
|
||||||
|
r->reset.left.hand_tracking_active = true;
|
||||||
r->reset.left.pose.position.x = -0.2f;
|
r->reset.left.pose.position.x = -0.2f;
|
||||||
r->reset.left.pose.position.y = 1.3f;
|
r->reset.left.pose.position.y = 1.3f;
|
||||||
r->reset.left.pose.position.z = -0.5f;
|
r->reset.left.pose.position.z = -0.5f;
|
||||||
r->reset.left.pose.orientation.w = 1.0f;
|
r->reset.left.pose.orientation.w = 1.0f;
|
||||||
|
|
||||||
r->reset.right.active = true;
|
r->reset.right.active = true;
|
||||||
|
r->reset.right.hand_tracking_active = true;
|
||||||
r->reset.right.pose.position.x = 0.2f;
|
r->reset.right.pose.position.x = 0.2f;
|
||||||
r->reset.right.pose.position.y = 1.3f;
|
r->reset.right.pose.position.y = 1.3f;
|
||||||
r->reset.right.pose.position.z = -0.5f;
|
r->reset.right.pose.position.z = -0.5f;
|
||||||
|
|
|
@ -49,6 +49,8 @@ struct r_remote_controller_data
|
||||||
|
|
||||||
float hand_curl[5];
|
float hand_curl[5];
|
||||||
|
|
||||||
|
bool hand_tracking_active;
|
||||||
|
|
||||||
bool active;
|
bool active;
|
||||||
bool select;
|
bool select;
|
||||||
bool menu;
|
bool menu;
|
||||||
|
|
|
@ -228,6 +228,7 @@ render_cheat_menu(struct gui_remote *gr, struct gui_program *p)
|
||||||
#define CURL(prefix, name, index) igDragFloat(#prefix "." #name, &d->prefix.hand_curl[index], 0.01, 0.0, 1.0, "%f", 0);
|
#define CURL(prefix, name, index) igDragFloat(#prefix "." #name, &d->prefix.hand_curl[index], 0.01, 0.0, 1.0, "%f", 0);
|
||||||
#define HAND(prefix) \
|
#define HAND(prefix) \
|
||||||
do { \
|
do { \
|
||||||
|
igCheckbox("Hand tracking Active", &d->prefix.hand_tracking_active); \
|
||||||
CURL(prefix, little, 0); \
|
CURL(prefix, little, 0); \
|
||||||
CURL(prefix, ring, 1); \
|
CURL(prefix, ring, 1); \
|
||||||
CURL(prefix, middle, 2); \
|
CURL(prefix, middle, 2); \
|
||||||
|
|
Loading…
Reference in a new issue