summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_tracker_rift/ftnoir_tracker_rift.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2014-09-22 11:39:07 +0200
committerStanislaw Halik <sthalik@misaki.pl>2014-09-22 11:39:07 +0200
commitfb0cd9401e26aaf610356ffe899af268012d18c3 (patch)
treed8dde935c2dc989ffa7612d74ace482f8c4e50d1 /ftnoir_tracker_rift/ftnoir_tracker_rift.cpp
parent461cb6e8f2b141a2408a4caf1fab930c24b19516 (diff)
remove obsolete axis selector from trackers
Diffstat (limited to 'ftnoir_tracker_rift/ftnoir_tracker_rift.cpp')
-rw-r--r--ftnoir_tracker_rift/ftnoir_tracker_rift.cpp19
1 files changed, 7 insertions, 12 deletions
diff --git a/ftnoir_tracker_rift/ftnoir_tracker_rift.cpp b/ftnoir_tracker_rift/ftnoir_tracker_rift.cpp
index 33d8f418..46e8c29f 100644
--- a/ftnoir_tracker_rift/ftnoir_tracker_rift.cpp
+++ b/ftnoir_tracker_rift/ftnoir_tracker_rift.cpp
@@ -55,18 +55,13 @@ void Rift_Tracker::GetHeadPoseData(double *data)
yaw += s.constant_drift;
old_yaw=yaw;
}
- if (s.bEnableYaw)
- data[Yaw] = yaw * 57.295781;
- if (s.bEnablePitch)
- data[Pitch] = pitch * -57.295781;
- if (s.bEnableRoll)
- data[Roll] = roll * 57.295781;
- if (s.bEnableX)
- data[TX] = pose.Position.x * -1e2;
- if (s.bEnableY)
- data[TY] = pose.Position.y * 1e2;
- if (s.bEnableX)
- data[TZ] = pose.Position.z * 1e2;
+ constexpr double d2r = 57.295781;
+ data[Yaw] = yaw * d2r;
+ data[Pitch] = pitch * -d2r;
+ data[Roll] = roll * d2r;
+ data[TX] = pose.Position.x * -1e2;
+ data[TY] = pose.Position.y * 1e2;
+ data[TZ] = pose.Position.z * 1e2;
}
}
}