From 9fb8b48027ac8c03628955da2b186de88745e348 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 18 Nov 2016 22:27:33 +0100 Subject: logic, gui: remove relative translation disable axis Only Z needs this. --- logic/main-settings.hpp | 10 +--------- logic/tracker.cpp | 16 +++++----------- 2 files changed, 6 insertions(+), 20 deletions(-) (limited to 'logic') diff --git a/logic/main-settings.hpp b/logic/main-settings.hpp index 53c5fae1..ecb7cd5c 100644 --- a/logic/main-settings.hpp +++ b/logic/main-settings.hpp @@ -67,11 +67,9 @@ struct main_settings { bundle b, b_map; axis_opts a_x, a_y, a_z, a_yaw, a_pitch, a_roll; - value tcomp_p, tcomp_disable_tx, tcomp_disable_ty, tcomp_disable_tz; - value tcomp_disable_src_yaw, tcomp_disable_src_pitch, tcomp_disable_src_roll; + value tcomp_p, tcomp_disable_tz; value tray_enabled, tray_start; value camera_yaw, camera_pitch, camera_roll; - value use_camera_offset_from_centering; value center_at_startup; value center_method; key_opts key_start_tracking, key_stop_tracking, key_toggle_tracking, key_restart_tracking; @@ -90,18 +88,12 @@ struct main_settings a_pitch(b, b_map, "pitch", Pitch), a_roll(b, b_map, "roll", Roll), tcomp_p(b, "compensate-translation", true), - tcomp_disable_tx(b, "compensate-translation-disable-x-axis", false), - tcomp_disable_ty(b, "compensate-translation-disable-y-axis", false), tcomp_disable_tz(b, "compensate-translation-disable-z-axis", false), - tcomp_disable_src_yaw(b, "compensate-translation-disable-source-yaw", false), - tcomp_disable_src_pitch(b, "compensate-translation-disable-source-pitch", false), - tcomp_disable_src_roll(b, "compensate-translation-disable-source-roll", false), tray_enabled(b, "use-system-tray", false), tray_start(b, "start-in-tray", false), camera_yaw(b, "camera-yaw", 0), camera_pitch(b, "camera-pitch", 0), camera_roll(b, "camera-roll", 0), - use_camera_offset_from_centering(b, "use-camera-offset-from-centering", false), center_at_startup(b, "center-at-startup", true), center_method(b, "centering-method", true), key_start_tracking(b, "start-tracking"), diff --git a/logic/tracker.cpp b/logic/tracker.cpp index a5892dd0..5733166a 100644 --- a/logic/tracker.cpp +++ b/logic/tracker.cpp @@ -300,21 +300,15 @@ void Tracker::logic() if (s.tcomp_p && !get(f_tcomp_disabled)) { - const double tcomp_c[] = - { - double(!s.tcomp_disable_src_yaw), - double(!s.tcomp_disable_src_pitch), - double(!s.tcomp_disable_src_roll), - }; euler_t value_(value(TX), value(TY), value(TZ)); t_compensate(euler_to_rmat( - euler_t(value(Yaw) * d2r * tcomp_c[0], - value(Pitch) * d2r * tcomp_c[1], - value(Roll) * d2r * tcomp_c[2])), + euler_t(value(Yaw) * d2r, + value(Pitch) * d2r, + value(Roll) * d2r)), value_, value_, - s.tcomp_disable_tx, - s.tcomp_disable_ty, + false, + false, s.tcomp_disable_tz); if (is_nan(value_)) nanp = true; -- cgit v1.2.3