diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2017-06-10 15:57:56 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2017-06-10 15:57:56 +0200 |
commit | 39c79af233bb5213701f54e779a3554fa2abe183 (patch) | |
tree | d8eddf023e7ec46595bff37649d8373c3152daf4 /logic | |
parent | 4f61fe1d9f07262426c5c3b431c9a27958f22da5 (diff) |
get rid of camera angle position rotation
It doesn't work well enough anyway
Diffstat (limited to 'logic')
-rw-r--r-- | logic/main-settings.cpp | 3 | ||||
-rw-r--r-- | logic/main-settings.hpp | 1 | ||||
-rw-r--r-- | logic/tracker.cpp | 21 | ||||
-rw-r--r-- | logic/tracker.h | 2 |
4 files changed, 3 insertions, 24 deletions
diff --git a/logic/main-settings.cpp b/logic/main-settings.cpp index a847c920..1b94fbe8 100644 --- a/logic/main-settings.cpp +++ b/logic/main-settings.cpp @@ -18,9 +18,6 @@ main_settings::main_settings() : 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), center_at_startup(b, "center-at-startup", true), center_method(b, "centering-method", 1), neck_z(b, "neck-depth", 0), diff --git a/logic/main-settings.hpp b/logic/main-settings.hpp index 6f7c2c82..18c6f19a 100644 --- a/logic/main-settings.hpp +++ b/logic/main-settings.hpp @@ -76,7 +76,6 @@ struct OTR_LOGIC_EXPORT main_settings final value<bool> tcomp_p, tcomp_disable_tx, tcomp_disable_ty, tcomp_disable_tz; 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> center_at_startup; value<int> center_method; value<int> neck_z; diff --git a/logic/tracker.cpp b/logic/tracker.cpp index 1132affe..08d88c38 100644 --- a/logic/tracker.cpp +++ b/logic/tracker.cpp @@ -52,18 +52,6 @@ Tracker::~Tracker() wait(); } -Tracker::rmat Tracker::camera_offset(double c) -{ - const double off[] = - { - d2r * c * (double)-s.camera_yaw, - d2r * c * (double)-s.camera_pitch, - d2r * c * (double)-s.camera_roll - }; - - return euler::euler_to_rmat(off); -} - double Tracker::map(double pos, Map& axis) { bool altp = (pos < 0) && axis.opts.altp; @@ -182,9 +170,6 @@ void Tracker::logic() real_rotation.rotation = euler_to_rmat(tmp); } - 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); if (!tracking_started) @@ -244,8 +229,8 @@ void Tracker::logic() break; } - euler_t rot = r2d * c_mult * rmat_to_euler(rotation); euler_t pos = euler_t(&value[TX]) - t_center; + euler_t rot = r2d * c_mult * rmat_to_euler(rotation); for (int i = 0; i < 3; i++) { @@ -258,8 +243,6 @@ void Tracker::logic() pos(i) = -pos(i); } - t_compensate(real_rotation.camera.t(), pos, pos, false, false, false); - for (int i = 0; i < 3; i++) { value(i) = pos(i); @@ -381,6 +364,8 @@ void Tracker::logic() void Tracker::run() { setPriority(QThread::HighPriority); + setPriority(QThread::HighestPriority); + setPriority(QThread::TimeCriticalPriority); { static constexpr const char* posechannels[6] = { "TX", "TY", "TZ", "Yaw", "Pitch", "Roll" }; diff --git a/logic/tracker.h b/logic/tracker.h index 79961378..2c4c5610 100644 --- a/logic/tracker.h +++ b/logic/tracker.h @@ -75,7 +75,6 @@ private: struct state { rmat rot_center; - rmat camera; rmat rotation; state() : rot_center(rmat::eye()) @@ -94,7 +93,6 @@ 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.; |