summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-02-21 17:36:20 +0100
committerStanislaw Halik <sthalik@misaki.pl>2017-02-21 17:37:21 +0100
commitb2cbf1b156f20ebb72bd0ff93d041f0bcb8a4ccf (patch)
tree7f19b3a5929fe6fa727020e38ed9c39e495d58de
parent62baceb786bae88910e8a987dcf42ab6492ac445 (diff)
logic/tracker: invert before rotation's used for transformations
-rw-r--r--logic/tracker.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/logic/tracker.cpp b/logic/tracker.cpp
index 6d551a65..eaae0735 100644
--- a/logic/tracker.cpp
+++ b/logic/tracker.cpp
@@ -252,6 +252,13 @@ 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);
@@ -337,10 +344,6 @@ void Tracker::logic()
nanp |= is_nan(value);
- for (int i = 0; i < 6; i++)
- if (m(i).opts.invert)
- value(i) = -value(i);
-
logger.write_pose(value); // "mapped"
if (nanp)