From d7e1d8165a4d8c7bb559cb00b79f9567d0c4ab6e Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 16 May 2017 10:51:48 +0200 Subject: logic: remove height in "dynamic neck" It doesn't help any. Leave the depth only. --- gui/options-dialog.cpp | 1 - gui/options-dialog.ui | 57 ++++++++++--------------------------------------- logic/main-settings.cpp | 1 - logic/main-settings.hpp | 2 +- logic/tracker.cpp | 8 +++---- 5 files changed, 16 insertions(+), 53 deletions(-) diff --git a/gui/options-dialog.cpp b/gui/options-dialog.cpp index 4c66eeb2..9eb8fc12 100644 --- a/gui/options-dialog.cpp +++ b/gui/options-dialog.cpp @@ -59,7 +59,6 @@ OptionsDialog::OptionsDialog(std::function pause_keybindings) : tie_setting(main.tcomp_disable_src_pitch, ui.tcomp_src_pitch_disable); tie_setting(main.tcomp_disable_src_roll, ui.tcomp_src_roll_disable); - tie_setting(main.neck_y, ui.neck_y); tie_setting(main.neck_z, ui.neck_z); tie_setting(main.a_x.zero, ui.pos_tx); diff --git a/gui/options-dialog.ui b/gui/options-dialog.ui index 0a6e5839..46ffd074 100644 --- a/gui/options-dialog.ui +++ b/gui/options-dialog.ui @@ -7,7 +7,7 @@ 0 0 588 - 552 + 550 @@ -42,7 +42,7 @@ - 0 + 3 false @@ -2301,42 +2301,23 @@ 0 - - + + - - 15 + + 0 0 + + + - Height from center of rotation + Enable - - - - 4 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - cm - - - -100 - - - 100 - - - - @@ -2358,7 +2339,7 @@ - + @@ -2371,22 +2352,6 @@ - - - - - 0 - 0 - - - - - - - Enable - - - diff --git a/logic/main-settings.cpp b/logic/main-settings.cpp index 64bd0010..a847c920 100644 --- a/logic/main-settings.cpp +++ b/logic/main-settings.cpp @@ -23,7 +23,6 @@ main_settings::main_settings() : camera_roll(b, "camera-roll", 0), center_at_startup(b, "center-at-startup", true), center_method(b, "centering-method", 1), - neck_y(b, "neck-height", 0), neck_z(b, "neck-depth", 0), neck_enable(b, "neck-enable", false), key_start_tracking1(b, "start-tracking"), diff --git a/logic/main-settings.hpp b/logic/main-settings.hpp index 6e6f698f..6f7c2c82 100644 --- a/logic/main-settings.hpp +++ b/logic/main-settings.hpp @@ -79,7 +79,7 @@ struct OTR_LOGIC_EXPORT main_settings final value camera_yaw, camera_pitch, camera_roll; value center_at_startup; value center_method; - value neck_y, neck_z; + value neck_z; value neck_enable; key_opts key_start_tracking1, key_start_tracking2; key_opts key_stop_tracking1, key_stop_tracking2; diff --git a/logic/tracker.cpp b/logic/tracker.cpp index 48a50d80..1002932f 100644 --- a/logic/tracker.cpp +++ b/logic/tracker.cpp @@ -284,18 +284,18 @@ void Tracker::logic() if (s.neck_enable) { - double ny = s.neck_y, nz = -s.neck_z; + double nz = -s.neck_z; - if (ny != 0 || nz != 0) + if (nz != 0) { const rmat R = euler_to_rmat( euler_t(value(Yaw) * d2r, value(Pitch) * d2r, value(Roll) * d2r)); - euler_t xyz(0, ny, nz); + euler_t xyz(0, 0, nz); t_compensate(R, xyz, xyz, false, false, false); neck(TX) = xyz(TX); - neck(TY) = xyz(TY) - ny; + neck(TY) = xyz(TY); neck(TZ) = xyz(TZ) - nz; } } -- cgit v1.2.3