Monado OpenXR Runtime
u_hand_simulation.c File Reference

Wrapper around Mercury's parametric hand code, used by Index and OpenGloves to simulate hand tracking. More...

#include "math/m_mathinclude.h"
#include "util/u_hand_tracking.h"
#include "xrt/xrt_defines.h"
#include "u_hand_simulation.h"
#include "math/m_api.h"
#include "u_trace_marker.h"
Include dependency graph for u_hand_simulation.c:

Data Structures

struct  translations55
 
struct  orientations54
 

Macros

#define HAND_SIM_NUM_FINGERS   5
 
#define HAND_SIM_NUM_JOINTS_IN_FINGER   5
 
#define HAND_SIM_NUM_ORIENTATIONS_IN_FINGER   4
 
#define DEG_TO_RAD(DEG)   (DEG * M_PI / 180.)
 
#define assert_quat_length_1(q)
 

Functions

static void eval_hand_set_rel_orientations (const struct u_hand_sim_hand *opt, struct orientations54 *rel_orientations)
 
static void eval_hand_set_rel_translations (const struct u_hand_sim_hand *opt, struct translations55 *rel_translations)
 
void eval_hand_with_orientation (const struct u_hand_sim_hand *opt, bool is_right, struct translations55 *translations_absolute, struct orientations54 *orientations_absolute)
 
static void zldtt_ori_right (const struct xrt_quat *orientation, struct xrt_quat *out)
 
static void zldtt (const struct xrt_vec3 *trans, const struct xrt_quat *orientation, bool is_right, struct xrt_space_relation *out)
 
static void our_eval_to_viz_hand (struct u_hand_sim_hand *opt, struct translations55 *translations_absolute, struct orientations54 *orientations_absolute, bool is_right, struct xrt_hand_joint_set *out_viz_hand)
 
static void hand_sim_hand_init (struct u_hand_sim_hand *out_opt, enum xrt_hand xhand, const struct xrt_space_relation *root_pose)
 
void u_hand_sim_simulate (struct u_hand_sim_hand *hand_ptr, struct xrt_hand_joint_set *out_set)
 
void u_hand_sim_simulate_for_valve_index_knuckles (const struct u_hand_tracking_curl_values *values, enum xrt_hand xhand, const struct xrt_space_relation *root_pose, struct xrt_hand_joint_set *out_set)
 
static void u_hand_sim_apply_generic_finger_transform (const struct u_hand_tracking_finger_value *finger_value, struct u_hand_sim_finger *out_finger)
 
void u_hand_sim_simulate_generic (const struct u_hand_tracking_values *values, enum xrt_hand xhand, const struct xrt_space_relation *root_pose, struct xrt_hand_joint_set *out_set)
 

Detailed Description

Wrapper around Mercury's parametric hand code, used by Index and OpenGloves to simulate hand tracking.

Author
Christoph Haag chris.nosp@m.toph.nosp@m..haag.nosp@m.@col.nosp@m.labor.nosp@m.a.co.nosp@m.m
Moses Turner moses.nosp@m.@col.nosp@m.labor.nosp@m.a.co.nosp@m.m
Daniel Willmott web@d.nosp@m.an-w.nosp@m..com

Function Documentation

◆ hand_sim_hand_init()

static void hand_sim_hand_init ( struct u_hand_sim_hand out_opt,
enum xrt_hand  xhand,
const struct xrt_space_relation root_pose 
)
static
Todo:
needed?