mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-29 11:06:18 +00:00
u/hand: Take xrt_hand enum instead of bool
This commit is contained in:
parent
2b05bfc709
commit
e6efcd7a02
|
@ -391,12 +391,12 @@ u_hand_sim_simulate(struct u_hand_sim_hand *hand_ptr, struct xrt_hand_joint_set
|
|||
|
||||
void
|
||||
u_hand_sim_simulate_for_valve_index_knuckles(const struct u_hand_tracking_curl_values *values,
|
||||
bool is_right,
|
||||
enum xrt_hand xhand,
|
||||
const struct xrt_space_relation *root_pose,
|
||||
struct xrt_hand_joint_set *out_set)
|
||||
{
|
||||
struct u_hand_sim_hand hand;
|
||||
hand.is_right = is_right;
|
||||
hand.is_right = xhand == XRT_HAND_RIGHT;
|
||||
|
||||
hand_sim_hand_init(&hand);
|
||||
hand.wrist_pose.pose.position.x = 0.f;
|
||||
|
@ -450,12 +450,12 @@ u_hand_sim_apply_generic_finger_transform(const struct u_hand_tracking_finger_va
|
|||
|
||||
void
|
||||
u_hand_sim_simulate_generic(const struct u_hand_tracking_values *values,
|
||||
bool is_right,
|
||||
enum xrt_hand xhand,
|
||||
const struct xrt_space_relation *root_pose,
|
||||
struct xrt_hand_joint_set *out_set)
|
||||
{
|
||||
struct u_hand_sim_hand hand;
|
||||
hand.is_right = is_right;
|
||||
hand.is_right = xhand == XRT_HAND_RIGHT;
|
||||
|
||||
hand_sim_hand_init(&hand);
|
||||
hand.wrist_pose.pose.position.x = 0.f;
|
||||
|
|
|
@ -71,13 +71,13 @@ u_hand_sim_simulate(struct u_hand_sim_hand *hand, struct xrt_hand_joint_set *out
|
|||
|
||||
void
|
||||
u_hand_sim_simulate_for_valve_index_knuckles(const struct u_hand_tracking_curl_values *values,
|
||||
bool is_right,
|
||||
enum xrt_hand xhand,
|
||||
const struct xrt_space_relation *root_pose,
|
||||
struct xrt_hand_joint_set *out_set);
|
||||
|
||||
void
|
||||
u_hand_sim_simulate_generic(const struct u_hand_tracking_values *values,
|
||||
bool is_right,
|
||||
enum xrt_hand xhand,
|
||||
const struct xrt_space_relation *root_pose,
|
||||
struct xrt_hand_joint_set *out_set);
|
||||
|
||||
|
|
|
@ -162,8 +162,7 @@ r_device_get_hand_tracking(struct xrt_device *xdev,
|
|||
|
||||
// Simulate the hand.
|
||||
enum xrt_hand hand = rd->is_left ? XRT_HAND_LEFT : XRT_HAND_RIGHT;
|
||||
bool is_right = hand == XRT_HAND_RIGHT;
|
||||
u_hand_sim_simulate_for_valve_index_knuckles(&values, is_right, &relation, out_value);
|
||||
u_hand_sim_simulate_for_valve_index_knuckles(&values, hand, &relation, out_value);
|
||||
|
||||
out_value->is_active = latest->hand_tracking_active;
|
||||
|
||||
|
|
Loading…
Reference in a new issue