diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2015-07-25 07:27:03 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-07-25 07:49:19 +0200 |
commit | 24538cf3a3a91481851618791b11be81437563e4 (patch) | |
tree | 4bcc9b97721170829038fe778633382c3e8754bc /opentrack/tracker.h | |
parent | 0f445ac2661b5454d491936bb780196b13d1f4ea (diff) |
move portability classes to compat library
Diffstat (limited to 'opentrack/tracker.h')
-rw-r--r-- | opentrack/tracker.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/opentrack/tracker.h b/opentrack/tracker.h index 453357c4..c5c39797 100644 --- a/opentrack/tracker.h +++ b/opentrack/tracker.h @@ -10,10 +10,9 @@ #include <vector> -#include "timer.hpp" +#include "opentrack-compat/timer.hpp" #include "plugin-support.hpp" #include "mappings.hpp" -#include "pose.hpp" #include "simple-mat.hpp" #include "selected-libraries.hpp" @@ -24,6 +23,23 @@ #include <QMutex> #include <QThread> +class Pose { +private: + static constexpr double pi = 3.141592653; + static constexpr double d2r = pi/180.0; + static constexpr double r2d = 180./pi; + + double axes[6]; +public: + 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]; } +}; + class Tracker : private QThread { Q_OBJECT private: |