summaryrefslogtreecommitdiffhomepage
path: root/opentrack/pose.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'opentrack/pose.hpp')
-rw-r--r--opentrack/pose.hpp24
1 files changed, 1 insertions, 23 deletions
diff --git a/opentrack/pose.hpp b/opentrack/pose.hpp
index 41e984f5..93d467a9 100644
--- a/opentrack/pose.hpp
+++ b/opentrack/pose.hpp
@@ -2,7 +2,6 @@
#include <utility>
#include <algorithm>
-#include "./quat.hpp"
#include "./plugin-api.hpp"
class Pose {
@@ -13,32 +12,11 @@ private:
double axes[6];
public:
- Pose() : axes {0,0,0, 0,0,0 } {}
+ Pose() : axes {0,0,0, 0,0,0} {}
inline operator double*() { return axes; }
inline operator const double*() const { return axes; }
inline double& operator()(int i) { return axes[i]; }
inline double operator()(int i) const { return axes[i]; }
-
- Quat quat() const
- {
- return Quat(axes[Yaw]*d2r, axes[Pitch]*d2r, axes[Roll]*d2r);
- }
-
- static Pose fromQuat(const Quat& q)
- {
- Pose ret;
- q.to_euler_degrees(ret(Yaw), ret(Pitch), ret(Roll));
- return ret;
- }
-
- Pose operator&(const Pose& B) const
- {
- const Quat q = quat() * B.quat().inv();
- Pose ret = fromQuat(q);
- for (int i = TX; i < TX + 3; i++)
- ret(i) = axes[i] - B.axes[i];
- return ret;
- }
};