diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-08-09 11:39:46 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-08-09 11:39:46 +0200 |
commit | 40a00851315e193f19ab71e516fbb4c135f44f03 (patch) | |
tree | 132cbe200a185712b8c0af8f717c073e729b941f /opentrack-logic/tracker.h | |
parent | e52f4f6e9df4634c9f01b84c73e30c06ad5e6dc6 (diff) |
logic/tracker: simplify
- no need to declare "inverts" as an array. it's used in only one place
- class Pose is redundant, use an alias for Mat<...>
- declare static constexpr const for logger stuff
Diffstat (limited to 'opentrack-logic/tracker.h')
-rw-r--r-- | opentrack-logic/tracker.h | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/opentrack-logic/tracker.h b/opentrack-logic/tracker.h index 09aca424..58b478bb 100644 --- a/opentrack-logic/tracker.h +++ b/opentrack-logic/tracker.h @@ -27,24 +27,7 @@ #include "export.hpp" -class Pose -{ -private: - static constexpr double pi = OPENTRACK_PI; - 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} {} - Pose(double x, double y, double z, double yaw, double pitch, double roll) : axes { x, y, z, yaw, pitch, roll } {} - - 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]; } -}; +using Pose = Mat<double, 6, 1>; class OPENTRACK_LOGIC_EXPORT Tracker : private QThread { |