diff options
-rw-r--r-- | gui/main-window.cpp | 2 | ||||
-rw-r--r-- | gui/options-dialog.cpp | 1 | ||||
-rw-r--r-- | gui/options-dialog.ui | 10 | ||||
-rw-r--r-- | logic/main-settings.cpp | 1 | ||||
-rw-r--r-- | logic/main-settings.hpp | 1 | ||||
-rw-r--r-- | logic/tracker.cpp | 10 | ||||
-rw-r--r-- | logic/tracker.h | 4 |
7 files changed, 9 insertions, 20 deletions
diff --git a/gui/main-window.cpp b/gui/main-window.cpp index 1fdfcb53..d64858c4 100644 --- a/gui/main-window.cpp +++ b/gui/main-window.cpp @@ -555,7 +555,7 @@ void MainWindow::showHeadPose() { double mapped[6], raw[6]; - work->tracker->get_raw_and_mapped_poses(mapped, raw); + work->tracker->raw_and_mapped_pose(mapped, raw); display_pose(mapped, raw); } diff --git a/gui/options-dialog.cpp b/gui/options-dialog.cpp index 51da498a..4c66eeb2 100644 --- a/gui/options-dialog.cpp +++ b/gui/options-dialog.cpp @@ -86,7 +86,6 @@ OptionsDialog::OptionsDialog(std::function<void(bool)> pause_keybindings) : tie_setting(main.camera_yaw, ui.camera_yaw); tie_setting(main.camera_pitch, ui.camera_pitch); tie_setting(main.camera_roll, ui.camera_roll); - tie_setting(main.use_camera_offset_from_centering, ui.use_center_as_translation_camera_offset); tie_setting(main.center_method, ui.center_method); diff --git a/gui/options-dialog.ui b/gui/options-dialog.ui index f6c04893..0a6e5839 100644 --- a/gui/options-dialog.ui +++ b/gui/options-dialog.ui @@ -987,13 +987,6 @@ </property> <layout class="QGridLayout" name="gridLayout_6"> <item row="4" column="0"> - <widget class="QCheckBox" name="use_center_as_translation_camera_offset"> - <property name="text"> - <string>Use camera center as translation offset</string> - </property> - </widget> - </item> - <item row="5" column="0"> <widget class="QLabel" name="label_17"> <property name="minimumSize"> <size> @@ -1018,7 +1011,7 @@ </property> </widget> </item> - <item row="6" column="0" alignment="Qt::AlignLeft"> + <item row="5" column="0" alignment="Qt::AlignLeft"> <widget class="QGroupBox" name="groupBox_3"> <property name="styleSheet"> <string notr="true">QGroupBox @@ -2506,7 +2499,6 @@ <tabstop>bind_restart_tracking</tabstop> <tabstop>trayp</tabstop> <tabstop>tray_start</tabstop> - <tabstop>use_center_as_translation_camera_offset</tabstop> <tabstop>camera_yaw</tabstop> <tabstop>camera_pitch</tabstop> <tabstop>camera_roll</tabstop> diff --git a/logic/main-settings.cpp b/logic/main-settings.cpp index 987dd250..64bd0010 100644 --- a/logic/main-settings.cpp +++ b/logic/main-settings.cpp @@ -21,7 +21,6 @@ main_settings::main_settings() : 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", 1), neck_y(b, "neck-height", 0), diff --git a/logic/main-settings.hpp b/logic/main-settings.hpp index 51b729e3..6e6f698f 100644 --- a/logic/main-settings.hpp +++ b/logic/main-settings.hpp @@ -77,7 +77,6 @@ struct OTR_LOGIC_EXPORT main_settings final value<bool> tcomp_disable_src_yaw, tcomp_disable_src_pitch, tcomp_disable_src_roll; value<bool> tray_enabled, tray_start; value<int> camera_yaw, camera_pitch, camera_roll; - value<bool> use_camera_offset_from_centering; value<bool> center_at_startup; value<int> center_method; value<int> neck_y, neck_z; diff --git a/logic/tracker.cpp b/logic/tracker.cpp index 2f07304e..3ba81af7 100644 --- a/logic/tracker.cpp +++ b/logic/tracker.cpp @@ -42,7 +42,7 @@ Tracker::~Tracker() wait(); } -Tracker::rmat Tracker::get_camera_offset_matrix(double c) +Tracker::rmat Tracker::camera_offset(double c) { const double off[] = { @@ -174,8 +174,8 @@ void Tracker::logic() real_rotation.rotation = euler_to_rmat(tmp); } - scaled_rotation.camera = get_camera_offset_matrix(c_div); - real_rotation.camera = get_camera_offset_matrix(1); + scaled_rotation.camera = camera_offset(c_div); + real_rotation.camera = camera_offset(1); nanp |= is_nan(value) || is_nan(scaled_rotation.rotation) || is_nan(real_rotation.rotation); @@ -226,11 +226,11 @@ void Tracker::logic() { // inertial case 0: - default: //scaled_rotation.rotation = scaled_rotation rotation = scaled_rotation.rot_center * scaled_rotation.rotation; break; // camera + default: case 1: rotation = scaled_rotation.rotation * scaled_rotation.rot_center; break; @@ -430,7 +430,7 @@ void Tracker::run() } } -void Tracker::get_raw_and_mapped_poses(double* mapped, double* raw) const +void Tracker::raw_and_mapped_pose(double* mapped, double* raw) const { QMutexLocker foo(&const_cast<Tracker&>(*this).mtx); diff --git a/logic/tracker.h b/logic/tracker.h index 754a836c..85bd1ed8 100644 --- a/logic/tracker.h +++ b/logic/tracker.h @@ -94,6 +94,7 @@ private: void t_compensate(const rmat& rmat, const euler_t& ypr, euler_t& output, bool disable_tx, bool disable_ty, bool disable_tz); void run() override; + rmat camera_offset(double c); static constexpr double r2d = 180. / M_PI; static constexpr double d2r = M_PI / 180.; @@ -105,8 +106,7 @@ public: Tracker(Mappings& m, SelectedLibraries& libs, TrackLogger& logger); ~Tracker(); - rmat get_camera_offset_matrix(double c); - void get_raw_and_mapped_poses(double* mapped, double* raw) const; + void raw_and_mapped_pose(double* mapped, double* raw) const; void start() { QThread::start(); } void center() { set(f_center, true); } |