mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-29 11:06:18 +00:00
xrt: Add eye gaze defines and role
This commit is contained in:
parent
9966c16cdd
commit
96c88f488e
|
@ -114,6 +114,7 @@ u_pp_xrt_input_name(struct u_pp_delegate dg, enum xrt_input_name name)
|
|||
case XRT_INPUT_GENERIC_HAND_TRACKING_LEFT: DG("XRT_INPUT_GENERIC_HAND_TRACKING_LEFT"); return;
|
||||
case XRT_INPUT_GENERIC_HAND_TRACKING_RIGHT: DG("XRT_INPUT_GENERIC_HAND_TRACKING_RIGHT"); return;
|
||||
case XRT_INPUT_GENERIC_TRACKER_POSE: DG("XRT_INPUT_GENERIC_TRACKER_POSE"); return;
|
||||
case XRT_INPUT_GENERIC_EYE_GAZE_POSE: DG("XRT_INPUT_GENERIC_EYE_GAZE_POSE"); return;
|
||||
case XRT_INPUT_SIMPLE_SELECT_CLICK: DG("XRT_INPUT_SIMPLE_SELECT_CLICK"); return;
|
||||
case XRT_INPUT_SIMPLE_MENU_CLICK: DG("XRT_INPUT_SIMPLE_MENU_CLICK"); return;
|
||||
case XRT_INPUT_SIMPLE_GRIP_POSE: DG("XRT_INPUT_SIMPLE_GRIP_POSE"); return;
|
||||
|
|
|
@ -628,6 +628,8 @@ enum xrt_device_name
|
|||
|
||||
XRT_DEVICE_HAND_INTERACTION,
|
||||
|
||||
XRT_DEVICE_EYE_GAZE_INTERACTION,
|
||||
|
||||
XRT_DEVICE_PSMV,
|
||||
XRT_DEVICE_PSSENSE,
|
||||
XRT_DEVICE_HYDRA,
|
||||
|
@ -652,6 +654,7 @@ enum xrt_device_type
|
|||
XRT_DEVICE_TYPE_ANY_HAND_CONTROLLER,
|
||||
XRT_DEVICE_TYPE_GENERIC_TRACKER,
|
||||
XRT_DEVICE_TYPE_HAND_TRACKER,
|
||||
XRT_DEVICE_TYPE_EYE_TRACKER
|
||||
};
|
||||
|
||||
/*!
|
||||
|
@ -748,6 +751,7 @@ enum xrt_input_name
|
|||
XRT_INPUT_GENERIC_TRACKER_POSE = XRT_INPUT_NAME(0x0005, POSE),
|
||||
XRT_INPUT_GENERIC_STAGE_SPACE_POSE = XRT_INPUT_NAME(0x0006, POSE),
|
||||
XRT_INPUT_GENERIC_LOCAL_SPACE_POSE = XRT_INPUT_NAME(0x0007, POSE),
|
||||
XRT_INPUT_GENERIC_EYE_GAZE_POSE = XRT_INPUT_NAME(0x0008, POSE),
|
||||
|
||||
XRT_INPUT_SIMPLE_SELECT_CLICK = XRT_INPUT_NAME(0x0010, BOOLEAN),
|
||||
XRT_INPUT_SIMPLE_MENU_CLICK = XRT_INPUT_NAME(0x0011, BOOLEAN),
|
||||
|
|
|
@ -259,6 +259,7 @@ struct xrt_device
|
|||
bool orientation_tracking_supported;
|
||||
bool position_tracking_supported;
|
||||
bool hand_tracking_supported;
|
||||
bool eye_gaze_supported;
|
||||
bool force_feedback_supported;
|
||||
bool form_factor_check_supported;
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@ struct xrt_system_devices
|
|||
struct xrt_device *left;
|
||||
struct xrt_device *right;
|
||||
struct xrt_device *gamepad;
|
||||
struct xrt_device *eyes;
|
||||
|
||||
struct
|
||||
{
|
||||
|
|
|
@ -209,6 +209,7 @@ ipc_client_device_create(struct ipc_connection *ipc_c, struct xrt_tracking_origi
|
|||
icd->base.orientation_tracking_supported = isdev->orientation_tracking_supported;
|
||||
icd->base.position_tracking_supported = isdev->position_tracking_supported;
|
||||
icd->base.hand_tracking_supported = isdev->hand_tracking_supported;
|
||||
icd->base.eye_gaze_supported = isdev->eye_gaze_supported;
|
||||
icd->base.force_feedback_supported = isdev->force_feedback_supported;
|
||||
|
||||
icd->base.device_type = isdev->device_type;
|
||||
|
|
|
@ -244,6 +244,7 @@ ipc_client_hmd_create(struct ipc_connection *ipc_c, struct xrt_tracking_origin *
|
|||
ich->base.position_tracking_supported = isdev->position_tracking_supported;
|
||||
ich->base.device_type = isdev->device_type;
|
||||
ich->base.hand_tracking_supported = isdev->hand_tracking_supported;
|
||||
ich->base.eye_gaze_supported = isdev->eye_gaze_supported;
|
||||
ich->base.force_feedback_supported = isdev->force_feedback_supported;
|
||||
ich->base.form_factor_check_supported = isdev->form_factor_check_supported;
|
||||
|
||||
|
|
|
@ -345,6 +345,7 @@ ipc_client_instance_create_system(struct xrt_instance *xinst,
|
|||
SET_ROLE(left);
|
||||
SET_ROLE(right);
|
||||
SET_ROLE(gamepad);
|
||||
SET_ROLE(eyes);
|
||||
SET_ROLE(hand_tracking.left);
|
||||
SET_ROLE(hand_tracking.right);
|
||||
|
||||
|
|
|
@ -279,6 +279,7 @@ init_shm(struct ipc_server *s)
|
|||
isdev->hand_tracking_supported = xdev->hand_tracking_supported;
|
||||
isdev->force_feedback_supported = xdev->force_feedback_supported;
|
||||
isdev->form_factor_check_supported = xdev->form_factor_check_supported;
|
||||
isdev->eye_gaze_supported = xdev->eye_gaze_supported;
|
||||
|
||||
// Is this a HMD?
|
||||
if (xdev->hmd != NULL) {
|
||||
|
@ -359,6 +360,7 @@ init_shm(struct ipc_server *s)
|
|||
ism->roles.gamepad = find_xdev_index(s, s->xsysd->roles.gamepad);
|
||||
ism->roles.hand_tracking.left = find_xdev_index(s, s->xsysd->roles.hand_tracking.left);
|
||||
ism->roles.hand_tracking.right = find_xdev_index(s, s->xsysd->roles.hand_tracking.right);
|
||||
ism->roles.eyes = find_xdev_index(s, s->xsysd->roles.eyes);
|
||||
|
||||
// Fill out git version info.
|
||||
snprintf(s->ism->u_git_tag, IPC_VERSION_NAME_LEN, "%s", u_git_tag);
|
||||
|
|
|
@ -124,6 +124,7 @@ struct ipc_shared_device
|
|||
bool orientation_tracking_supported;
|
||||
bool position_tracking_supported;
|
||||
bool hand_tracking_supported;
|
||||
bool eye_gaze_supported;
|
||||
bool force_feedback_supported;
|
||||
bool form_factor_check_supported;
|
||||
};
|
||||
|
@ -221,6 +222,7 @@ struct ipc_shared_memory
|
|||
int32_t left;
|
||||
int32_t right;
|
||||
int32_t gamepad;
|
||||
int32_t eyes;
|
||||
|
||||
struct
|
||||
{
|
||||
|
|
|
@ -117,6 +117,7 @@ debug_print_devices(struct oxr_logger *log, struct oxr_system *sys)
|
|||
struct xrt_device *h = GET_XDEV_BY_ROLE(sys, head);
|
||||
struct xrt_device *l = GET_XDEV_BY_ROLE(sys, left);
|
||||
struct xrt_device *r = GET_XDEV_BY_ROLE(sys, right);
|
||||
struct xrt_device *e = GET_XDEV_BY_ROLE(sys, eyes);
|
||||
struct xrt_device *hl = GET_XDEV_BY_ROLE(sys, hand_tracking.left);
|
||||
struct xrt_device *hr = GET_XDEV_BY_ROLE(sys, hand_tracking.right);
|
||||
|
||||
|
@ -127,9 +128,10 @@ debug_print_devices(struct oxr_logger *log, struct oxr_system *sys)
|
|||
"\n\tHead: '%s'"
|
||||
"\n\tLeft: '%s'"
|
||||
"\n\tRight: '%s'"
|
||||
"\n\tEyes: '%s'"
|
||||
"\n\tHand-Tracking Left: '%s'"
|
||||
"\n\tHand-Tracking Right: '%s'",
|
||||
P(h), P(l), P(r), P(hl), P(hr));
|
||||
P(h), P(l), P(r), P(e), P(hl), P(hr));
|
||||
|
||||
#undef P
|
||||
}
|
||||
|
|
|
@ -848,6 +848,7 @@ print_system_devices(u_pp_delegate_t dg, struct xrt_system_devices *xsysd)
|
|||
P(left);
|
||||
P(right);
|
||||
P(gamepad);
|
||||
P(eyes);
|
||||
P(hand_tracking.left);
|
||||
P(hand_tracking.right);
|
||||
#undef P
|
||||
|
|
Loading…
Reference in a new issue