diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2017-02-27 07:35:58 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2017-02-27 07:35:58 +0100 |
commit | a714d9dea7ccb6d745a9859cf96a7f9ae7e97d7c (patch) | |
tree | db707ca4d119f602af541f9956c3ba341df6dcf7 | |
parent | dbea153d81a85c387f9ef41bfeb95e92be11fd44 (diff) |
logic/tracker: invert before applying camera angle
-rw-r--r-- | logic/tracker.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/logic/tracker.cpp b/logic/tracker.cpp index 743c887d..2c052f08 100644 --- a/logic/tracker.cpp +++ b/logic/tracker.cpp @@ -229,6 +229,13 @@ void Tracker::logic() const euler_t rot = r2d * c_mult * rmat_to_euler(rotation); euler_t pos = euler_t(&value[TX]) - t_center; + // don't invert after t_compensate + // inverting here doesn't break centering + + for (int i = 0; i < 6; i++) + if (m(i).opts.invert) + value(i) = -value(i); + t_compensate(real_rotation.camera.t(), pos, pos, false, false, false); for (int i = 0; i < 3; i++) @@ -238,13 +245,6 @@ void Tracker::logic() } } - // don't invert after t_compensate - // inverting here doesn't break centering - - for (int i = 0; i < 6; i++) - if (m(i).opts.invert) - value(i) = -value(i); - logger.write_pose(value); // "corrected" - after various transformations to account for camera position nanp |= is_nan(value); |