summaryrefslogtreecommitdiffhomepage
path: root/facetracknoir/tracker.h
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2014-10-19 12:42:48 +0200
committerStanislaw Halik <sthalik@misaki.pl>2014-10-19 13:39:03 +0200
commit0f0d663c6263a59e2cb14f555a00b39b19c134e7 (patch)
treed0dbcb75089b601204c92228e1577077e903ef55 /facetracknoir/tracker.h
parent9dc864f019d66d1b3ef9f46a824b72e416bdd4fc (diff)
main: refactor interlocked parts
Diffstat (limited to 'facetracknoir/tracker.h')
-rw-r--r--facetracknoir/tracker.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/facetracknoir/tracker.h b/facetracknoir/tracker.h
index afb86802..75f54084 100644
--- a/facetracknoir/tracker.h
+++ b/facetracknoir/tracker.h
@@ -15,27 +15,30 @@
#include <QMutex>
#include <QThread>
-class Tracker : protected QThread {
+class Tracker : private QThread {
Q_OBJECT
private:
QMutex mtx;
main_settings& s;
// XXX can be const-cast when functionconfig const-correct -sh 20141004
Mappings& m;
+
Timer t;
Pose output_pose, raw_6dof, raw_center, unstopped_raw;
double newpose[6];
std::atomic<bool> centerp;
std::atomic<bool> enabledp;
std::atomic<bool> should_quit;
-
+ SelectedLibraries const& libs;
+
double map(double pos, Mapping& axis);
void logic();
+
static void t_compensate(const double* input, double* output, bool rz);
protected:
void run() override;
public:
- Tracker(main_settings& s, Mappings& m);
+ Tracker(main_settings& s, Mappings& m, SelectedLibraries& libs);
~Tracker();
void get_raw_and_mapped_poses(double* mapped, double* raw) const;