diff options
-rw-r--r-- | cmake/msvc.cmake | 2 | ||||
-rw-r--r-- | filter-accela/accela-settings.hpp | 2 | ||||
-rw-r--r-- | filter-accela/ftnoir_accela_filtercontrols.ui | 2 | ||||
-rw-r--r-- | filter-accela/ftnoir_filter_accela.cpp | 5 | ||||
-rw-r--r-- | gui/options-dialog.cpp | 1 | ||||
-rw-r--r-- | gui/options-dialog.ui | 61 | ||||
-rw-r--r-- | logic/main-settings.cpp | 1 | ||||
-rw-r--r-- | logic/main-settings.hpp | 2 | ||||
-rw-r--r-- | logic/tracker.cpp | 13 | ||||
-rw-r--r-- | logic/tracker.h | 4 |
10 files changed, 20 insertions, 73 deletions
diff --git a/cmake/msvc.cmake b/cmake/msvc.cmake index c0aee783..e5912f46 100644 --- a/cmake/msvc.cmake +++ b/cmake/msvc.cmake @@ -52,7 +52,7 @@ set(_CFLAGS_DEBUG "/GS /sdl /Gs /guard:cf") set(_CXXFLAGS_RELEASE "${cc}") set(_CXXFLAGS_DEBUG "${_CFLAGS_DEBUG}") -set(_LDFLAGS "/WX") +set(_LDFLAGS "") set(_LDFLAGS_RELEASE "/LTCG:INCREMENTAL /OPT:REF /OPT:ICF=10") set(_LDFLAGS_DEBUG "") diff --git a/filter-accela/accela-settings.hpp b/filter-accela/accela-settings.hpp index eaf18325..53ffe7c7 100644 --- a/filter-accela/accela-settings.hpp +++ b/filter-accela/accela-settings.hpp @@ -46,7 +46,7 @@ struct settings_accela : opts value<slider_value> rot_nonlinearity; settings_accela() : opts("accela-sliders"), - rot_sensitivity(b, "rotation-sensitivity", slider_value(1.5, .1, 2)), + rot_sensitivity(b, "rotation-sensitivity", slider_value(1.5, .5, 3)), pos_sensitivity(b, "translation-sensitivity", slider_value(1., .05, 1.5)), rot_deadzone(b, "rotation-deadzone", slider_value(.03, 0, .1)), pos_deadzone(b, "translation-deadzone", slider_value(.1, 0, 1)), diff --git a/filter-accela/ftnoir_accela_filtercontrols.ui b/filter-accela/ftnoir_accela_filtercontrols.ui index 62fe55aa..c4d29772 100644 --- a/filter-accela/ftnoir_accela_filtercontrols.ui +++ b/filter-accela/ftnoir_accela_filtercontrols.ui @@ -278,7 +278,7 @@ <number>0</number> </property> <property name="maximum"> - <number>38</number> + <number>20</number> </property> <property name="pageStep"> <number>5</number> diff --git a/filter-accela/ftnoir_filter_accela.cpp b/filter-accela/ftnoir_filter_accela.cpp index b95de697..c6813b8e 100644 --- a/filter-accela/ftnoir_filter_accela.cpp +++ b/filter-accela/ftnoir_filter_accela.cpp @@ -154,11 +154,6 @@ void accela::filter(const double* input, double *output) output[k] *= dt; output[k] += last_output[k]; - if (signum(last_output[k] - output[k]) >= 0) - output[k] = std::fmax(input[k], output[k]); - else - output[k] = std::fmin(input[k], output[k]); - last_output[k] = output[k]; } } 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<void(bool)> 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..b7f701f8 100644 --- a/gui/options-dialog.ui +++ b/gui/options-dialog.ui @@ -7,7 +7,7 @@ <x>0</x> <y>0</y> <width>588</width> - <height>552</height> + <height>550</height> </rect> </property> <property name="sizePolicy"> @@ -764,12 +764,6 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> - <size> - <width>80</width> - <height>0</height> - </size> - </property> <property name="text"> <string>Bind</string> </property> @@ -2301,42 +2295,23 @@ <property name="spacing"> <number>0</number> </property> - <item row="1" column="0"> - <widget class="QLabel" name="label_31"> + <item row="0" column="0"> + <widget class="QCheckBox" name="neck_enable"> <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Maximum"> - <horstretch>15</horstretch> + <sizepolicy hsizetype="Preferred" vsizetype="Minimum"> + <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> + <property name="styleSheet"> + <string notr="true"/> + </property> <property name="text"> - <string>Height from center of rotation</string> + <string>Enable</string> </property> </widget> </item> <item row="1" column="1"> - <widget class="QSpinBox" name="neck_y"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Maximum"> - <horstretch>4</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="alignment"> - <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> - </property> - <property name="suffix"> - <string> cm</string> - </property> - <property name="minimum"> - <number>-100</number> - </property> - <property name="maximum"> - <number>100</number> - </property> - </widget> - </item> - <item row="2" column="1"> <widget class="QSpinBox" name="neck_z"> <property name="sizePolicy"> <sizepolicy hsizetype="Preferred" vsizetype="Maximum"> @@ -2358,7 +2333,7 @@ </property> </widget> </item> - <item row="2" column="0"> + <item row="1" column="0"> <widget class="QLabel" name="label_32"> <property name="sizePolicy"> <sizepolicy hsizetype="Preferred" vsizetype="Maximum"> @@ -2371,22 +2346,6 @@ </property> </widget> </item> - <item row="0" column="0"> - <widget class="QCheckBox" name="neck_enable"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Minimum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="styleSheet"> - <string notr="true"/> - </property> - <property name="text"> - <string>Enable</string> - </property> - </widget> - </item> </layout> </widget> </item> 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<int> camera_yaw, camera_pitch, camera_roll; value<bool> center_at_startup; value<int> center_method; - value<int> neck_y, neck_z; + value<int> neck_z; value<bool> 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..e09000e2 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; } } @@ -304,9 +304,7 @@ void Tracker::logic() for (int i = 3; i < 6; i++) value(i) = map(value(i), m(i)); - const bool reltrans = !get(f_tcomp_disabled); - - if (s.tcomp_p && reltrans) + if (s.tcomp_p) { const double tcomp_c[] = { @@ -490,6 +488,5 @@ bits::bits() : b(0u) set(f_center, true); set(f_enabled, true); set(f_zero, false); - set(f_tcomp_disabled, false); set(f_should_quit, false); } diff --git a/logic/tracker.h b/logic/tracker.h index 2f29aca7..2e6350d7 100644 --- a/logic/tracker.h +++ b/logic/tracker.h @@ -39,8 +39,7 @@ struct bits f_center = 1 << 0, f_enabled = 1 << 1, f_zero = 1 << 2, - f_tcomp_disabled = 1 << 3, - f_should_quit = 1 << 4, + f_should_quit = 1 << 3, }; std::atomic<unsigned> b; @@ -113,7 +112,6 @@ public: void set_toggle(bool value) { set(f_enabled, value); } void set_zero(bool value) { set(f_zero, value); } - void set_tcomp_disabled(bool x) { set(f_tcomp_disabled, x); } void zero() { negate(f_zero); } void toggle_enabled() { negate(f_enabled); } |