diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-07-22 10:15:17 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-07-23 11:05:33 +0200 |
commit | 81310e18abba8d17289cde6670e62d96f24e9d01 (patch) | |
tree | cee6e1713f84b12a89669eaa1781248e16c3131e /opentrack-logic/tracker.cpp | |
parent | 46f89ce2321909198774a1c1e8b481436540c11a (diff) |
gui/options, logic: add experimental offset from center
This works fine for rotating the translation.
Diffstat (limited to 'opentrack-logic/tracker.cpp')
-rw-r--r-- | opentrack-logic/tracker.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/opentrack-logic/tracker.cpp b/opentrack-logic/tracker.cpp index 3602ad4e..3596eb19 100644 --- a/opentrack-logic/tracker.cpp +++ b/opentrack-logic/tracker.cpp @@ -195,6 +195,13 @@ void Tracker::logic() const euler_t euler = r2d * rmat_to_euler(m_); + euler_t tmp(t(0) - t_b[0], t(1) - t_b[1], t(2) - t_b[2]); + + if (s.use_camera_offset_from_centering) + t_compensate(r_b.t() * cam.t(), tmp, tmp, false); + else + t_compensate(cam.t(), tmp, tmp, false); + for (int i = 0; i < 3; i++) { value(i) = tmp(i); |