|
#define | DEFAULT_WAIT_TIMEOUT 3.5f |
|
#define | SURVIVE_LEFT_CONTROLLER_INDEX 0 |
|
#define | SURVIVE_RIGHT_CONTROLLER_INDEX 1 |
|
#define | SURVIVE_NON_CONTROLLER_START 2 |
|
#define | MAX_TRACKED_DEVICE_COUNT 16 |
| excl HMD we support 16 devices (controllers, trackers, ...) More...
|
|
#define | SURVIVE_TRACE(d, ...) U_LOG_XDEV_IFL_T(&d->base, d->sys->log_level, __VA_ARGS__) |
|
#define | SURVIVE_DEBUG(d, ...) U_LOG_XDEV_IFL_D(&d->base, d->sys->log_level, __VA_ARGS__) |
|
#define | SURVIVE_INFO(d, ...) U_LOG_XDEV_IFL_I(&d->base, d->sys->log_level, __VA_ARGS__) |
|
#define | SURVIVE_WARN(d, ...) U_LOG_XDEV_IFL_W(&d->base, d->sys->log_level, __VA_ARGS__) |
|
#define | SURVIVE_ERROR(d, ...) U_LOG_XDEV_IFL_E(&d->base, d->sys->log_level, __VA_ARGS__) |
|
#define | SET_WAND_INPUT(NAME, NAME2) |
|
#define | SET_INDEX_INPUT(NAME, NAME2) |
|
|
enum | input_index {
VIVE_CONTROLLER_AIM_POSE = 0
, VIVE_CONTROLLER_GRIP_POSE
, VIVE_CONTROLLER_SYSTEM_CLICK
, VIVE_CONTROLLER_TRIGGER_CLICK
,
VIVE_CONTROLLER_TRIGGER_VALUE
, VIVE_CONTROLLER_TRACKPAD
, VIVE_CONTROLLER_TRACKPAD_TOUCH
, VIVE_CONTROLLER_SQUEEZE_CLICK
,
VIVE_CONTROLLER_MENU_CLICK
, VIVE_CONTROLLER_TRACKPAD_CLICK
, VIVE_CONTROLLER_THUMBSTICK
, VIVE_CONTROLLER_A_CLICK
,
VIVE_CONTROLLER_B_CLICK
, VIVE_CONTROLLER_THUMBSTICK_CLICK
, VIVE_CONTROLLER_THUMBSTICK_TOUCH
, VIVE_CONTROLLER_SYSTEM_TOUCH
,
VIVE_CONTROLLER_A_TOUCH
, VIVE_CONTROLLER_B_TOUCH
, VIVE_CONTROLLER_SQUEEZE_VALUE
, VIVE_CONTROLLER_SQUEEZE_FORCE
,
VIVE_CONTROLLER_TRIGGER_TOUCH
, VIVE_CONTROLLER_TRACKPAD_FORCE
, VIVE_CONTROLLER_HAND_TRACKING
, VIVE_TRACKER_POSE
,
VIVE_CONTROLLER_MAX_INDEX
} |
|
enum | DeviceType { DEVICE_TYPE_HMD
, DEVICE_TYPE_CONTROLLER
} |
|
enum | InputComponent { COMP_1D
, COMP_2DX
, COMP_2DY
} |
|
|
static void | survive_device_destroy (struct xrt_device *xdev) |
|
static double | survive_timecode_now_s (void) |
|
static timepoint_ns | survive_timecode_to_monotonic (struct survive_device *survive, double timecode) |
|
static void | pose_to_relation (const SurvivePose *pose, const SurviveVelocity *vel, struct xrt_space_relation *out_relation) |
|
static bool | verify_device_name (struct survive_device *survive, enum xrt_input_name name) |
|
static xrt_result_t | survive_device_get_tracked_pose (struct xrt_device *xdev, enum xrt_input_name name, int64_t at_timestamp_ns, struct xrt_space_relation *out_relation) |
|
static xrt_result_t | survive_device_get_battery_status (struct xrt_device *xdev, bool *out_present, bool *out_charging, float *out_charge) |
|
static int | survive_controller_haptic_pulse (struct survive_device *survive, const union xrt_output_value *value) |
|
static void | survive_controller_device_set_output (struct xrt_device *xdev, enum xrt_output_name name, const union xrt_output_value *value) |
|
static void | survive_controller_get_hand_tracking (struct xrt_device *xdev, enum xrt_input_name name, int64_t at_timestamp_ns, struct xrt_hand_joint_set *out_value, int64_t *out_timestamp_ns) |
|
static void | survive_device_get_view_poses (struct xrt_device *xdev, const struct xrt_vec3 *default_eye_relation, int64_t at_timestamp_ns, uint32_t view_count, struct xrt_space_relation *out_head_relation, struct xrt_fov *out_fovs, struct xrt_pose *out_poses) |
|
static bool | update_axis (struct survive_device *survive, struct Axis *axis, const SurviveSimpleButtonEvent *e, int i, uint64_t now) |
|
static bool | update_button (struct survive_device *survive, const struct SurviveSimpleButtonEvent *e, timepoint_ns ts) |
|
static float | _calculate_squeeze_value (struct survive_device *survive) |
|
static void | _process_button_event (struct survive_device *survive, const struct SurviveSimpleButtonEvent *e) |
|
static void | _process_hmd_button_event (struct survive_device *survive, const struct SurviveSimpleButtonEvent *e) |
|
static struct survive_device * | get_device_by_object (struct survive_system *sys, const SurviveSimpleObject *object) |
|
static void | add_device (struct survive_system *ss, const struct SurviveSimpleConfigEvent *e) |
|
static void | _process_pose_event (struct survive_device *survive, const struct SurviveSimplePoseUpdatedEvent *e) |
|
static void | _process_event (struct survive_system *ss, struct SurviveSimpleEvent *event) |
|
static xrt_result_t | survive_device_update_inputs (struct xrt_device *xdev) |
|
static bool | compute_distortion (struct xrt_device *xdev, uint32_t view, float u, float v, struct xrt_uv_triplet *result) |
|
static bool | _create_hmd_device (struct survive_system *sys, const struct SurviveSimpleObject *sso, char *conf_str) |
|
static bool | _create_controller_device (struct survive_system *sys, const SurviveSimpleObject *sso, struct vive_controller_config *config) |
|
static bool | add_connected_devices (struct survive_system *ss) |
|
static void * | run_event_thread (void *ptr) |
|
int | survive_get_devices (struct xrt_device **out_xdevs, struct vive_config **out_vive_config) |
|