|
#define | SET_TOUCH_INPUT(NAME) (ohd->base.inputs[OCULUS_TOUCH_##NAME].name = XRT_INPUT_TOUCH_##NAME) |
|
#define | PRESS_FLOAT_THRESHOLD 0.95 |
|
#define | FLOAT_TO_DIGITAL_THRESHOLD 0.5 |
|
#define | CONTROL_MAPPING_SIZE 16 |
|
#define | CASE_VEC1(OHMD_CONTROL) |
|
#define | CASE_VEC1_OR_DIGITAL(OHMD_CONTROL, MAKE_DIGITAL) |
|
#define | CASE_DIGITAL(OHMD_CONTROL, THRESHOLD) |
|
#define | CASE_VEC2_X(OHMD_CONTROL) |
|
#define | CASE_VEC2_Y(OHMD_CONTROL) |
|
#define | mul m_vec2_mul |
|
#define | mul_scalar m_vec2_mul_scalar |
|
#define | add m_vec2_add |
|
#define | sub m_vec2_sub |
|
#define | div m_vec2_div |
|
#define | div_scalar m_vec2_div_scalar |
|
#define | len m_vec2_len |
|
|
enum | input_indices {
SIMPLE_SELECT_CLICK = 0
, SIMPLE_MENU_CLICK
, GRIP_POSE
, AIM_POSE
,
OCULUS_TOUCH_X_CLICK
, OCULUS_TOUCH_X_TOUCH
, OCULUS_TOUCH_Y_CLICK
, OCULUS_TOUCH_Y_TOUCH
,
OCULUS_TOUCH_MENU_CLICK
, OCULUS_TOUCH_A_CLICK
, OCULUS_TOUCH_A_TOUCH
, OCULUS_TOUCH_B_CLICK
,
OCULUS_TOUCH_B_TOUCH
, OCULUS_TOUCH_SYSTEM_CLICK
, OCULUS_TOUCH_SQUEEZE_VALUE
, OCULUS_TOUCH_TRIGGER_TOUCH
,
OCULUS_TOUCH_TRIGGER_VALUE
, OCULUS_TOUCH_THUMBSTICK_CLICK
, OCULUS_TOUCH_THUMBSTICK_TOUCH
, OCULUS_TOUCH_THUMBSTICK
,
OCULUS_TOUCH_THUMBREST_TOUCH
, INPUT_INDICES_LAST
} |
|
enum | openhmd_device_type {
OPENHMD_GENERIC_HMD
, OPENHMD_GENERIC_CONTROLLER
, OPENHMD_OCULUS_RIFT_HMD
, OPENHMD_OCULUS_RIFT_CONTROLLER
,
OPENHMD_GENERIC_TRACKER
} |
|
enum | OHMD_DEVICE_INDEX { OHMD_HMD_INDEX = 0
, OHMD_LEFT_INDEX
, OHMD_RIGHT_INDEX
, OHMD_FIRST_TRACKER_INDEX
} |
|
|
static struct oh_device * | oh_device (struct xrt_device *xdev) |
|
static void | oh_device_destroy (struct xrt_device *xdev) |
|
static void | update_ohmd_controller (struct oh_device *ohd, int control_count, float *control_state) |
|
static xrt_result_t | oh_device_update_inputs (struct xrt_device *xdev) |
|
static void | oh_device_set_output (struct xrt_device *xdev, enum xrt_output_name name, const union xrt_output_value *value) |
|
static bool | check_head_pose (struct oh_device *ohd, enum xrt_input_name name) |
|
static bool | check_controller_pose (struct oh_device *ohd, enum xrt_input_name name) |
|
static bool | check_tracker_pose (struct oh_device *ohd, enum xrt_input_name name) |
|
static xrt_result_t | oh_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 struct device_info | get_info (ohmd_device *dev, const char *prod) |
|
static bool | u_compute_distortion_openhmd (struct openhmd_values *values, float u, float v, struct xrt_uv_triplet *result) |
|
static bool | compute_distortion_openhmd (struct xrt_device *xdev, uint32_t view, float u, float v, struct xrt_uv_triplet *result) |
|
static bool | compute_distortion_vive (struct xrt_device *xdev, uint32_t view, float u, float v, struct xrt_uv_triplet *result) |
|
static void | swap (int *a, int *b) |
|
static struct oh_device * | create_hmd (ohmd_context *ctx, int device_idx, int device_flags) |
|
static struct oh_device * | create_controller (ohmd_context *ctx, int device_idx, int device_flags, enum xrt_device_type device_type) |
|
int | oh_device_create (ohmd_context *ctx, bool no_hmds, struct xrt_device **out_xdevs) |
|
Adaptor to a OpenHMD device.
- Author
- Jakob Bornecrantz jakob.nosp@m.@col.nosp@m.labor.nosp@m.a.co.nosp@m.m