From 9b656cde77fdbd4d4c36935f0ff3f7099df46f2e Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Tue, 8 Feb 2022 01:16:49 +0000 Subject: [PATCH] xrt: Remove xrt_device::get_view_pose Co-authored-by: Christoph Haag --- src/xrt/drivers/android/android_sensors.c | 11 ------ src/xrt/drivers/dummy/dummy_hmd.c | 11 ------ src/xrt/drivers/euroc/euroc_device.c | 11 ------ src/xrt/drivers/hdk/hdk_device.cpp | 11 ------ src/xrt/drivers/illixr/illixr_device.cpp | 10 ----- src/xrt/drivers/multi_wrapper/multi.c | 12 ------ src/xrt/drivers/north_star/ns_hmd.c | 11 ------ src/xrt/drivers/ohmd/oh_device.c | 12 ------ src/xrt/drivers/psvr/psvr_device.c | 11 ------ src/xrt/drivers/qwerty/qwerty_device.c | 11 ------ src/xrt/drivers/realsense/rs_ddev.c | 10 ----- src/xrt/drivers/remote/r_device.c | 11 ------ src/xrt/drivers/remote/r_hmd.c | 11 ------ src/xrt/drivers/sample/sample_hmd.c | 12 ------ src/xrt/drivers/survive/survive_driver.c | 17 -------- src/xrt/drivers/vive/vive_device.c | 19 --------- src/xrt/drivers/wmr/wmr_hmd.c | 13 ------- src/xrt/include/xrt/xrt_device.h | 47 ----------------------- src/xrt/ipc/client/ipc_client_device.c | 11 ------ src/xrt/ipc/client/ipc_client_hmd.c | 15 -------- src/xrt/ipc/server/ipc_server_handler.c | 17 -------- src/xrt/ipc/shared/proto.json | 11 ------ 22 files changed, 305 deletions(-) diff --git a/src/xrt/drivers/android/android_sensors.c b/src/xrt/drivers/android/android_sensors.c index 6e641250c..599f2617f 100644 --- a/src/xrt/drivers/android/android_sensors.c +++ b/src/xrt/drivers/android/android_sensors.c @@ -168,16 +168,6 @@ android_device_get_tracked_pose(struct xrt_device *xdev, XRT_SPACE_RELATION_ORIENTATION_TRACKED_BIT); } -static void -android_device_get_view_pose(struct xrt_device *xdev, - const struct xrt_vec3 *eye_relation, - uint32_t view_index, - struct xrt_pose *out_pose) -{ - (void)xdev; - u_device_get_view_pose(eye_relation, view_index, out_pose); -} - static void android_device_get_view_poses(struct xrt_device *xdev, const struct xrt_vec3 *default_eye_relation, @@ -217,7 +207,6 @@ android_device_create() d->base.destroy = android_device_destroy; d->base.update_inputs = android_device_update_inputs; d->base.get_tracked_pose = android_device_get_tracked_pose; - d->base.get_view_pose = android_device_get_view_pose; d->base.get_view_poses = android_device_get_view_poses; d->base.compute_distortion = android_device_compute_distortion; d->base.inputs[0].name = XRT_INPUT_GENERIC_HEAD_POSE; diff --git a/src/xrt/drivers/dummy/dummy_hmd.c b/src/xrt/drivers/dummy/dummy_hmd.c index 73b3be224..ebfc17ed5 100644 --- a/src/xrt/drivers/dummy/dummy_hmd.c +++ b/src/xrt/drivers/dummy/dummy_hmd.c @@ -143,16 +143,6 @@ dummy_hmd_get_tracked_pose(struct xrt_device *xdev, XRT_SPACE_RELATION_ORIENTATION_TRACKED_BIT); } -static void -dummy_hmd_get_view_pose(struct xrt_device *xdev, - const struct xrt_vec3 *eye_relation, - uint32_t view_index, - struct xrt_pose *out_pose) -{ - (void)xdev; - u_device_get_view_pose(eye_relation, view_index, out_pose); -} - static void dummy_hmd_get_view_poses(struct xrt_device *xdev, const struct xrt_vec3 *default_eye_relation, @@ -174,7 +164,6 @@ dummy_hmd_create(void) struct dummy_hmd *dh = U_DEVICE_ALLOCATE(struct dummy_hmd, flags, 1, 0); dh->base.update_inputs = dummy_hmd_update_inputs; dh->base.get_tracked_pose = dummy_hmd_get_tracked_pose; - dh->base.get_view_pose = dummy_hmd_get_view_pose; dh->base.get_view_poses = dummy_hmd_get_view_poses; dh->base.destroy = dummy_hmd_destroy; dh->base.name = XRT_DEVICE_GENERIC_HMD; diff --git a/src/xrt/drivers/euroc/euroc_device.c b/src/xrt/drivers/euroc/euroc_device.c index 25743b24e..503c0f95f 100644 --- a/src/xrt/drivers/euroc/euroc_device.c +++ b/src/xrt/drivers/euroc/euroc_device.c @@ -159,16 +159,6 @@ euroc_device_get_tracked_pose(struct xrt_device *xdev, XRT_SPACE_RELATION_ORIENTATION_TRACKED_BIT | XRT_SPACE_RELATION_POSITION_TRACKED_BIT); } -static void -euroc_get_view_pose(struct xrt_device *xdev, - const struct xrt_vec3 *eye_relation, - uint32_t view_index, - struct xrt_pose *out_pose) -{ - (void)xdev; - u_device_get_view_pose(eye_relation, view_index, out_pose); -} - static void euroc_get_view_poses(struct xrt_device *xdev, const struct xrt_vec3 *default_eye_relation, @@ -261,7 +251,6 @@ euroc_device_create(struct xrt_prober *xp) xd->get_tracked_pose = euroc_device_get_tracked_pose; xd->destroy = euroc_device_destroy; if (is_hmd) { - xd->get_view_pose = euroc_get_view_pose; xd->get_view_poses = euroc_get_view_poses; } diff --git a/src/xrt/drivers/hdk/hdk_device.cpp b/src/xrt/drivers/hdk/hdk_device.cpp index ee0bc2a65..4ba903b10 100644 --- a/src/xrt/drivers/hdk/hdk_device.cpp +++ b/src/xrt/drivers/hdk/hdk_device.cpp @@ -253,16 +253,6 @@ hdk_device_get_tracked_pose(struct xrt_device *xdev, hd->quat.w, hd->ang_vel_quat.x, hd->ang_vel_quat.y, hd->ang_vel_quat.z); } -static void -hdk_device_get_view_pose(struct xrt_device *xdev, - const struct xrt_vec3 *eye_relation, - uint32_t view_index, - struct xrt_pose *out_pose) -{ - (void)xdev; - u_device_get_view_pose(eye_relation, view_index, out_pose); -} - static void hdk_device_get_view_poses(struct xrt_device *xdev, const struct xrt_vec3 *default_eye_relation, @@ -318,7 +308,6 @@ hdk_device_create(struct os_hid_device *dev, enum HDK_VARIANT variant) hd->base.update_inputs = hdk_device_update_inputs; hd->base.get_tracked_pose = hdk_device_get_tracked_pose; - hd->base.get_view_pose = hdk_device_get_view_pose; hd->base.get_view_poses = hdk_device_get_view_poses; hd->base.destroy = hdk_device_destroy; hd->base.inputs[0].name = XRT_INPUT_GENERIC_HEAD_POSE; diff --git a/src/xrt/drivers/illixr/illixr_device.cpp b/src/xrt/drivers/illixr/illixr_device.cpp index 3fa0c8f55..12cea1a53 100644 --- a/src/xrt/drivers/illixr/illixr_device.cpp +++ b/src/xrt/drivers/illixr/illixr_device.cpp @@ -130,16 +130,6 @@ illixr_hmd_get_tracked_pose(struct xrt_device *xdev, XRT_SPACE_RELATION_POSITION_VALID_BIT | XRT_SPACE_RELATION_POSITION_TRACKED_BIT); } -static void -illixr_hmd_get_view_pose(struct xrt_device *xdev, - const struct xrt_vec3 *eye_relation, - uint32_t view_index, - struct xrt_pose *out_pose) -{ - (void)xdev; - u_device_get_view_pose(eye_relation, view_index, out_pose); -} - static void illixr_hmd_get_view_poses(struct xrt_device *xdev, const struct xrt_vec3 *default_eye_relation, diff --git a/src/xrt/drivers/multi_wrapper/multi.c b/src/xrt/drivers/multi_wrapper/multi.c index 5d5ee884f..054c929c6 100644 --- a/src/xrt/drivers/multi_wrapper/multi.c +++ b/src/xrt/drivers/multi_wrapper/multi.c @@ -182,17 +182,6 @@ set_output(struct xrt_device *xdev, enum xrt_output_name name, union xrt_output_ xrt_device_set_output(target, name, value); } -static void -get_view_pose(struct xrt_device *xdev, - const struct xrt_vec3 *eye_relation, - uint32_t view_index, - struct xrt_pose *out_pose) -{ - struct multi_device *d = (struct multi_device *)xdev; - struct xrt_device *target = d->tracking_override.target; - xrt_device_get_view_pose(target, eye_relation, view_index, out_pose); -} - static void get_view_poses(struct xrt_device *xdev, const struct xrt_vec3 *default_eye_relation, @@ -267,7 +256,6 @@ multi_create_tracking_override(enum xrt_tracking_override_type override_type, d->base.set_output = set_output; d->base.update_inputs = update_inputs; d->base.compute_distortion = compute_distortion; - d->base.get_view_pose = get_view_pose; d->base.get_view_poses = get_view_poses; return &d->base; diff --git a/src/xrt/drivers/north_star/ns_hmd.c b/src/xrt/drivers/north_star/ns_hmd.c index 636bef02f..4516a5ee3 100644 --- a/src/xrt/drivers/north_star/ns_hmd.c +++ b/src/xrt/drivers/north_star/ns_hmd.c @@ -454,16 +454,6 @@ ns_hmd_get_tracked_pose(struct xrt_device *xdev, *out_relation = ns->no_tracker_relation; // you can change this using the debug gui } -static void -ns_hmd_get_view_pose(struct xrt_device *xdev, - const struct xrt_vec3 *eye_relation, - uint32_t view_index, - struct xrt_pose *out_pose) -{ - struct ns_hmd *ns = ns_hmd(xdev); - *out_pose = ns->head_pose_to_eye[view_index]; -} - static void ns_hmd_get_view_poses(struct xrt_device *xdev, const struct xrt_vec3 *default_eye_relation, @@ -587,7 +577,6 @@ ns_hmd_create(const char *config_path) ns->base.update_inputs = ns_hmd_update_inputs; ns->base.get_tracked_pose = ns_hmd_get_tracked_pose; - ns->base.get_view_pose = ns_hmd_get_view_pose; ns->base.get_view_poses = ns_hmd_get_view_poses; ns->base.destroy = ns_hmd_destroy; ns->base.name = XRT_DEVICE_GENERIC_HMD; diff --git a/src/xrt/drivers/ohmd/oh_device.c b/src/xrt/drivers/ohmd/oh_device.c index 77dc9f5ec..1a42e33a6 100644 --- a/src/xrt/drivers/ohmd/oh_device.c +++ b/src/xrt/drivers/ohmd/oh_device.c @@ -427,16 +427,6 @@ oh_device_get_tracked_pose(struct xrt_device *xdev, ohd->last_relation = *out_relation; } -static void -oh_device_get_view_pose(struct xrt_device *xdev, - const struct xrt_vec3 *eye_relation, - uint32_t view_index, - struct xrt_pose *out_pose) -{ - (void)xdev; - u_device_get_view_pose(eye_relation, view_index, out_pose); -} - static void oh_device_get_view_poses(struct xrt_device *xdev, const struct xrt_vec3 *default_eye_relation, @@ -729,7 +719,6 @@ create_hmd(ohmd_context *ctx, int device_idx, int device_flags) struct oh_device *ohd = U_DEVICE_ALLOCATE(struct oh_device, flags, 1, 0); ohd->base.update_inputs = oh_device_update_inputs; ohd->base.get_tracked_pose = oh_device_get_tracked_pose; - ohd->base.get_view_pose = oh_device_get_view_pose; ohd->base.get_view_poses = oh_device_get_view_poses; ohd->base.destroy = oh_device_destroy; ohd->base.inputs[0].name = XRT_INPUT_GENERIC_HEAD_POSE; @@ -1046,7 +1035,6 @@ create_controller(ohmd_context *ctx, int device_idx, int device_flags, enum xrt_ ohd->base.update_inputs = oh_device_update_inputs; ohd->base.set_output = oh_device_set_output; ohd->base.get_tracked_pose = oh_device_get_tracked_pose; - ohd->base.get_view_pose = oh_device_get_view_pose; ohd->base.get_view_poses = oh_device_get_view_poses; ohd->base.destroy = oh_device_destroy; if (oculus_touch) { diff --git a/src/xrt/drivers/psvr/psvr_device.c b/src/xrt/drivers/psvr/psvr_device.c index c7ef4dade..6e1205678 100644 --- a/src/xrt/drivers/psvr/psvr_device.c +++ b/src/xrt/drivers/psvr/psvr_device.c @@ -927,16 +927,6 @@ psvr_device_get_tracked_pose(struct xrt_device *xdev, math_quat_normalize(&out_relation->pose.orientation); } -static void -psvr_device_get_view_pose(struct xrt_device *xdev, - const struct xrt_vec3 *eye_relation, - uint32_t view_index, - struct xrt_pose *out_pose) -{ - (void)xdev; - u_device_get_view_pose(eye_relation, view_index, out_pose); -} - static void psvr_device_get_view_poses(struct xrt_device *xdev, const struct xrt_vec3 *default_eye_relation, @@ -988,7 +978,6 @@ psvr_device_create(struct hid_device_info *sensor_hid_info, psvr->log_level = log_level; psvr->base.update_inputs = psvr_device_update_inputs; psvr->base.get_tracked_pose = psvr_device_get_tracked_pose; - psvr->base.get_view_pose = psvr_device_get_view_pose; psvr->base.get_view_poses = psvr_device_get_view_poses; psvr->base.compute_distortion = psvr_compute_distortion; psvr->base.destroy = psvr_device_destroy; diff --git a/src/xrt/drivers/qwerty/qwerty_device.c b/src/xrt/drivers/qwerty/qwerty_device.c index 3dec15cc2..aef810cb2 100644 --- a/src/xrt/drivers/qwerty/qwerty_device.c +++ b/src/xrt/drivers/qwerty/qwerty_device.c @@ -203,16 +203,6 @@ qwerty_get_tracked_pose(struct xrt_device *xd, XRT_SPACE_RELATION_ORIENTATION_TRACKED_BIT | XRT_SPACE_RELATION_POSITION_TRACKED_BIT; } -static void -qwerty_get_view_pose(struct xrt_device *xdev, - const struct xrt_vec3 *eye_relation, - uint32_t view_index, - struct xrt_pose *out_pose) -{ - (void)xdev; - u_device_get_view_pose(eye_relation, view_index, out_pose); -} - static void qwerty_get_view_poses(struct xrt_device *xdev, const struct xrt_vec3 *default_eye_relation, @@ -282,7 +272,6 @@ qwerty_hmd_create(void) xd->update_inputs = qwerty_update_inputs; xd->get_tracked_pose = qwerty_get_tracked_pose; - xd->get_view_pose = qwerty_get_view_pose; xd->get_view_poses = qwerty_get_view_poses; xd->destroy = qwerty_destroy; u_distortion_mesh_set_none(xd); // Fill in xd->compute_distortion() diff --git a/src/xrt/drivers/realsense/rs_ddev.c b/src/xrt/drivers/realsense/rs_ddev.c index 5c618fc4a..71a7d8440 100644 --- a/src/xrt/drivers/realsense/rs_ddev.c +++ b/src/xrt/drivers/realsense/rs_ddev.c @@ -411,15 +411,6 @@ rs_ddev_get_tracked_pose(struct xrt_device *xdev, m_relation_history_get(rs->relation_hist, at_timestamp_ns, out_relation); } -static void -rs_ddev_get_view_pose(struct xrt_device *xdev, - const struct xrt_vec3 *eye_relation, - uint32_t view_index, - struct xrt_pose *out_pose) -{ - assert(false); -} - static void rs_ddev_get_view_poses(struct xrt_device *xdev, const struct xrt_vec3 *default_eye_relation, @@ -477,7 +468,6 @@ rs_ddev_create(int device_idx) rs->enable_relocalization, rs->enable_pose_prediction, rs->enable_pose_filtering); rs->base.update_inputs = rs_ddev_update_inputs; rs->base.get_tracked_pose = rs_ddev_get_tracked_pose; - rs->base.get_view_pose = rs_ddev_get_view_pose; rs->base.get_view_poses = rs_ddev_get_view_poses; rs->base.destroy = rs_ddev_destroy; rs->base.name = XRT_DEVICE_REALSENSE; diff --git a/src/xrt/drivers/remote/r_device.c b/src/xrt/drivers/remote/r_device.c index 7d69060a9..c5537c1b3 100644 --- a/src/xrt/drivers/remote/r_device.c +++ b/src/xrt/drivers/remote/r_device.c @@ -151,16 +151,6 @@ r_device_get_hand_tracking(struct xrt_device *xdev, *out_timestamp_ns = requested_timestamp_ns; } -static void -r_device_get_view_pose(struct xrt_device *xdev, - const struct xrt_vec3 *eye_relation, - uint32_t view_index, - struct xrt_pose *out_pose) -{ - // Empty - assert(false); -} - static void r_device_get_view_poses(struct xrt_device *xdev, const struct xrt_vec3 *default_eye_relation, @@ -197,7 +187,6 @@ r_device_create(struct r_hub *r, bool is_left) rd->base.update_inputs = r_device_update_inputs; rd->base.get_tracked_pose = r_device_get_tracked_pose; rd->base.get_hand_tracking = r_device_get_hand_tracking; - rd->base.get_view_pose = r_device_get_view_pose; rd->base.get_view_poses = r_device_get_view_poses; rd->base.set_output = r_device_set_output; rd->base.destroy = r_device_destroy; diff --git a/src/xrt/drivers/remote/r_hmd.c b/src/xrt/drivers/remote/r_hmd.c index 28ea0f75b..d2cb6e6df 100644 --- a/src/xrt/drivers/remote/r_hmd.c +++ b/src/xrt/drivers/remote/r_hmd.c @@ -84,16 +84,6 @@ r_hmd_get_hand_tracking(struct xrt_device *xdev, (void)rh; } -static void -r_hmd_get_view_pose(struct xrt_device *xdev, - const struct xrt_vec3 *eye_relation, - uint32_t view_index, - struct xrt_pose *out_pose) -{ - (void)xdev; - u_device_get_view_pose(eye_relation, view_index, out_pose); -} - static void r_hmd_get_view_poses(struct xrt_device *xdev, const struct xrt_vec3 *default_eye_relation, @@ -130,7 +120,6 @@ r_hmd_create(struct r_hub *r) rh->base.update_inputs = r_hmd_update_inputs; rh->base.get_tracked_pose = r_hmd_get_tracked_pose; rh->base.get_hand_tracking = r_hmd_get_hand_tracking; - rh->base.get_view_pose = r_hmd_get_view_pose; rh->base.get_view_poses = r_hmd_get_view_poses; rh->base.set_output = r_hmd_set_output; rh->base.destroy = r_hmd_destroy; diff --git a/src/xrt/drivers/sample/sample_hmd.c b/src/xrt/drivers/sample/sample_hmd.c index 82bf6ee05..136bd344e 100644 --- a/src/xrt/drivers/sample/sample_hmd.c +++ b/src/xrt/drivers/sample/sample_hmd.c @@ -102,17 +102,6 @@ sample_hmd_get_tracked_pose(struct xrt_device *xdev, XRT_SPACE_RELATION_ORIENTATION_TRACKED_BIT); } -static void -sample_hmd_get_view_pose(struct xrt_device *xdev, - const struct xrt_vec3 *eye_relation, - uint32_t view_index, - struct xrt_pose *out_pose) -{ - (void)xdev; - // This helper function assumes a symmetric IPD - u_device_get_view_pose(eye_relation, view_index, out_pose); -} - static void sample_hmd_get_view_poses(struct xrt_device *xdev, const struct xrt_vec3 *default_eye_relation, @@ -136,7 +125,6 @@ sample_hmd_create(void) struct sample_hmd *sh = U_DEVICE_ALLOCATE(struct sample_hmd, flags, 1, 0); sh->base.update_inputs = sample_hmd_update_inputs; sh->base.get_tracked_pose = sample_hmd_get_tracked_pose; - sh->base.get_view_pose = sample_hmd_get_view_pose; sh->base.get_view_poses = sample_hmd_get_view_poses; sh->base.destroy = sample_hmd_destroy; sh->base.name = XRT_DEVICE_GENERIC_HMD; diff --git a/src/xrt/drivers/survive/survive_driver.c b/src/xrt/drivers/survive/survive_driver.c index b9c88a818..4ede07311 100644 --- a/src/xrt/drivers/survive/survive_driver.c +++ b/src/xrt/drivers/survive/survive_driver.c @@ -448,22 +448,6 @@ survive_controller_get_hand_tracking(struct xrt_device *xdev, out_value->is_active = true; } -static void -survive_device_get_view_pose(struct xrt_device *xdev, - const struct xrt_vec3 *eye_relation, - uint32_t view_index, - struct xrt_pose *out_pose) -{ - // Only supports two views. - assert(view_index < 2); - - u_device_get_view_pose(eye_relation, view_index, out_pose); - - // This is for the Index' canted displays, on the Vive [Pro] they are identity. - struct survive_device *survive = (struct survive_device *)xdev; - out_pose->orientation = survive->hmd.config.display.rot[view_index]; -} - static void survive_device_get_view_poses(struct xrt_device *xdev, const struct xrt_vec3 *default_eye_relation, @@ -856,7 +840,6 @@ _create_hmd_device(struct survive_system *sys, const struct SurviveSimpleObject survive->base.destroy = survive_device_destroy; survive->base.update_inputs = survive_device_update_inputs; survive->base.get_tracked_pose = survive_device_get_tracked_pose; - survive->base.get_view_pose = survive_device_get_view_pose; survive->base.get_view_poses = survive_device_get_view_poses; survive->base.tracking_origin = &sys->base; diff --git a/src/xrt/drivers/vive/vive_device.c b/src/xrt/drivers/vive/vive_device.c index ee1456bed..6f2797a56 100644 --- a/src/xrt/drivers/vive/vive_device.c +++ b/src/xrt/drivers/vive/vive_device.c @@ -116,24 +116,6 @@ vive_device_get_tracked_pose(struct xrt_device *xdev, m_relation_history_get(d->relation_hist, at_timestamp_ns, out_relation); } -static void -vive_device_get_view_pose(struct xrt_device *xdev, - const struct xrt_vec3 *eye_relation, - uint32_t view_index, - struct xrt_pose *out_pose) -{ - XRT_TRACE_MARKER(); - - // Only supports two views. - assert(view_index < 2); - - u_device_get_view_pose(eye_relation, view_index, out_pose); - - // This is for the Index' canted displays, on the Vive [Pro] they are identity. - struct vive_device *d = vive_device(xdev); - out_pose->orientation = d->config.display.rot[view_index]; -} - static void vive_device_get_view_poses(struct xrt_device *xdev, const struct xrt_vec3 *default_eye_relation, @@ -779,7 +761,6 @@ vive_device_create(struct os_hid_device *mainboard_dev, d->base.update_inputs = vive_device_update_inputs; d->base.get_tracked_pose = vive_device_get_tracked_pose; - d->base.get_view_pose = vive_device_get_view_pose; d->base.get_view_poses = vive_device_get_view_poses; d->base.destroy = vive_device_destroy; d->base.inputs[0].name = XRT_INPUT_GENERIC_HEAD_POSE; diff --git a/src/xrt/drivers/wmr/wmr_hmd.c b/src/xrt/drivers/wmr/wmr_hmd.c index ac64327df..64cd51227 100644 --- a/src/xrt/drivers/wmr/wmr_hmd.c +++ b/src/xrt/drivers/wmr/wmr_hmd.c @@ -980,18 +980,6 @@ wmr_hmd_get_tracked_pose(struct xrt_device *xdev, math_pose_transform(&wh->offset, &out_relation->pose, &out_relation->pose); } -static void -wmr_hmd_get_view_pose(struct xrt_device *xdev, - const struct xrt_vec3 *eye_relation, - uint32_t view_index, - struct xrt_pose *out_pose) -{ - DRV_TRACE_MARKER(); - - (void)xdev; - u_device_get_view_pose(eye_relation, view_index, out_pose); -} - static void wmr_hmd_get_view_poses(struct xrt_device *xdev, const struct xrt_vec3 *default_eye_relation, @@ -1245,7 +1233,6 @@ wmr_hmd_create(enum wmr_headset_type hmd_type, // Populate the base members. wh->base.update_inputs = wmr_hmd_update_inputs; wh->base.get_tracked_pose = wmr_hmd_get_tracked_pose; - wh->base.get_view_pose = wmr_hmd_get_view_pose; wh->base.get_view_poses = wmr_hmd_get_view_poses; wh->base.destroy = wmr_hmd_destroy; wh->base.name = XRT_DEVICE_GENERIC_HMD; diff --git a/src/xrt/include/xrt/xrt_device.h b/src/xrt/include/xrt/xrt_device.h index 2d9926962..59304136c 100644 --- a/src/xrt/include/xrt/xrt_device.h +++ b/src/xrt/include/xrt/xrt_device.h @@ -336,39 +336,6 @@ struct xrt_device */ void (*set_output)(struct xrt_device *xdev, enum xrt_output_name name, union xrt_output_value *value); - /*! - * @brief Get the per-view pose in relation to the view space. - * - * On most device with coplanar displays, this just calls a helper to - * process the provided eye relation, but this may also handle canted - * displays as well as eye tracking. - * - * Does not do any device level tracking, use - * xrt_device::get_tracked_pose for that. - * - * @param[in] xdev The device. - * @param[in] eye_relation The interpupillary relation as a 3D position. - * Most simple stereo devices would just want to - * set `out_pose->position.[x|y|z] = ipd.[x|y|z] - * / 2.0f` and adjust for left vs right view. - * Not to be confused with IPD that is absolute - * distance, this is a full 3D translation - * If a device has a more accurate/dynamic way of - * knowing the eye relation, it may ignore this - * input. - * @param[in] view_index Index of view. - * @param[out] out_pose Output pose. See eye_relation argument for - * sample position. Be sure to also set - * orientation: most likely identity - * orientation unless you have canted screens. - * (Caution: Even if you have eye tracking, you - * won't use eye orientation here!) - */ - void (*get_view_pose)(struct xrt_device *xdev, - const struct xrt_vec3 *eye_relation, - uint32_t view_index, - struct xrt_pose *out_pose); - /*! * @brief Get the per-view pose in relation to the view space. * @@ -465,20 +432,6 @@ xrt_device_set_output(struct xrt_device *xdev, enum xrt_output_name name, union xdev->set_output(xdev, name, value); } -/*! - * Helper function for @ref xrt_device::get_view_pose. - * - * @public @memberof xrt_device - */ -static inline void -xrt_device_get_view_pose(struct xrt_device *xdev, - const struct xrt_vec3 *eye_relation, - uint32_t view_index, - struct xrt_pose *out_pose) -{ - xdev->get_view_pose(xdev, eye_relation, view_index, out_pose); -} - /*! * Helper function for @ref xrt_device::get_view_poses. * diff --git a/src/xrt/ipc/client/ipc_client_device.c b/src/xrt/ipc/client/ipc_client_device.c index c0e7ae93e..542c7bf36 100644 --- a/src/xrt/ipc/client/ipc_client_device.c +++ b/src/xrt/ipc/client/ipc_client_device.c @@ -119,16 +119,6 @@ ipc_client_device_get_hand_tracking(struct xrt_device *xdev, } } -static void -ipc_client_device_get_view_pose(struct xrt_device *xdev, - const struct xrt_vec3 *eye_relation, - uint32_t view_index, - struct xrt_pose *out_pose) -{ - // Empty - assert(false); -} - static void ipc_client_device_get_view_poses(struct xrt_device *xdev, const struct xrt_vec3 *default_eye_relation, @@ -170,7 +160,6 @@ ipc_client_device_create(struct ipc_connection *ipc_c, struct xrt_tracking_origi icd->base.update_inputs = ipc_client_device_update_inputs; icd->base.get_tracked_pose = ipc_client_device_get_tracked_pose; icd->base.get_hand_tracking = ipc_client_device_get_hand_tracking; - icd->base.get_view_pose = ipc_client_device_get_view_pose; icd->base.get_view_poses = ipc_client_device_get_view_poses; icd->base.set_output = ipc_client_device_set_output; icd->base.destroy = ipc_client_device_destroy; diff --git a/src/xrt/ipc/client/ipc_client_hmd.c b/src/xrt/ipc/client/ipc_client_hmd.c index d5e47f017..4e66e44fa 100644 --- a/src/xrt/ipc/client/ipc_client_hmd.c +++ b/src/xrt/ipc/client/ipc_client_hmd.c @@ -104,20 +104,6 @@ ipc_client_hmd_get_tracked_pose(struct xrt_device *xdev, } } -static void -ipc_client_hmd_get_view_pose(struct xrt_device *xdev, - const struct xrt_vec3 *eye_relation, - uint32_t view_index, - struct xrt_pose *out_pose) -{ - struct ipc_client_hmd *ich = ipc_client_hmd(xdev); - - xrt_result_t r = ipc_call_device_get_view_pose(ich->ipc_c, ich->device_id, eye_relation, view_index, out_pose); - if (r != XRT_SUCCESS) { - IPC_ERROR(ich->ipc_c, "Error calling view pose!"); - } -} - static void ipc_client_hmd_get_view_poses(struct xrt_device *xdev, const struct xrt_vec3 *default_eye_relation, @@ -171,7 +157,6 @@ ipc_client_hmd_create(struct ipc_connection *ipc_c, struct xrt_tracking_origin * ich->device_id = device_id; ich->base.update_inputs = ipc_client_hmd_update_inputs; ich->base.get_tracked_pose = ipc_client_hmd_get_tracked_pose; - ich->base.get_view_pose = ipc_client_hmd_get_view_pose; ich->base.get_view_poses = ipc_client_hmd_get_view_poses; ich->base.destroy = ipc_client_hmd_destroy; diff --git a/src/xrt/ipc/server/ipc_server_handler.c b/src/xrt/ipc/server/ipc_server_handler.c index afc2327fd..13cb1539b 100644 --- a/src/xrt/ipc/server/ipc_server_handler.c +++ b/src/xrt/ipc/server/ipc_server_handler.c @@ -954,23 +954,6 @@ ipc_handle_device_get_hand_tracking(volatile struct ipc_client_state *ics, return XRT_SUCCESS; } -xrt_result_t -ipc_handle_device_get_view_pose(volatile struct ipc_client_state *ics, - uint32_t id, - const struct xrt_vec3 *eye_relation, - uint32_t view_index, - struct xrt_pose *out_pose) -{ - // To make the code a bit more readable. - uint32_t device_id = id; - struct xrt_device *xdev = get_xdev(ics, device_id); - - // Get the pose. - xrt_device_get_view_pose(xdev, eye_relation, view_index, out_pose); - - return XRT_SUCCESS; -} - xrt_result_t ipc_handle_device_get_view_poses_2(volatile struct ipc_client_state *ics, uint32_t id, diff --git a/src/xrt/ipc/shared/proto.json b/src/xrt/ipc/shared/proto.json index c4dccbefe..852014025 100644 --- a/src/xrt/ipc/shared/proto.json +++ b/src/xrt/ipc/shared/proto.json @@ -201,17 +201,6 @@ ] }, - "device_get_view_pose": { - "in": [ - {"name": "id", "type": "uint32_t"}, - {"name": "eye_relation", "type": "const struct xrt_vec3"}, - {"name": "view_index", "type": "uint32_t"} - ], - "out": [ - {"name": "pose", "type": "struct xrt_pose"} - ] - }, - "device_get_view_poses_2": { "in": [ {"name": "id", "type": "uint32_t"},