summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_tracker_udp/ftnoir_tracker_udp.h
diff options
context:
space:
mode:
authorDonovan Baarda <abo@minkirri.apana.org.au>2014-10-15 14:07:20 +1100
committerDonovan Baarda <abo@minkirri.apana.org.au>2014-10-15 14:07:20 +1100
commitdbd04e283082ab869a22abf03c4c6280b03935bb (patch)
tree3951c6f91f76047e655f35e04db4eecd576c49df /ftnoir_tracker_udp/ftnoir_tracker_udp.h
parentd880464fbe9180aefde94594330126e115066dc3 (diff)
parent051a2e4392bc75b246cc5cb897ae0bbb1f92042e (diff)
Merge branch 'unstable' of https://github.com/opentrack/opentrack into dev/kalman
Conflicts: ftnoir_filter_kalman/ftnoir_filter_kalman.h
Diffstat (limited to 'ftnoir_tracker_udp/ftnoir_tracker_udp.h')
-rw-r--r--ftnoir_tracker_udp/ftnoir_tracker_udp.h41
1 files changed, 11 insertions, 30 deletions
diff --git a/ftnoir_tracker_udp/ftnoir_tracker_udp.h b/ftnoir_tracker_udp/ftnoir_tracker_udp.h
index 62eb67df..a6f2e6d3 100644
--- a/ftnoir_tracker_udp/ftnoir_tracker_udp.h
+++ b/ftnoir_tracker_udp/ftnoir_tracker_udp.h
@@ -1,58 +1,43 @@
-#include "ftnoir_tracker_base/ftnoir_tracker_base.h"
+#pragma once
#include "ui_ftnoir_ftnclientcontrols.h"
-#include <QThread>
#include <QUdpSocket>
-#include <QMessageBox>
-#include <QMutex>
-#include <QWaitCondition>
-#include <math.h>
-#include "facetracknoir/global-settings.h"
+#include <QThread>
+#include <cmath>
+#include "facetracknoir/plugin-api.hpp"
#include "facetracknoir/options.h"
using namespace options;
struct settings {
pbundle b;
value<int> port;
- value<bool> enable_roll, enable_pitch, enable_yaw,
- enable_x, enable_y, enable_z;
settings() :
b(bundle("udp-tracker")),
- port(b, "port", 4242),
- enable_roll(b, "enable-roll", true),
- enable_pitch(b, "enable-pitch", true),
- enable_yaw(b, "enable-yaw", true),
- enable_x(b, "enable-x", true),
- enable_y(b, "enable-y", true),
- enable_z(b, "enable-y", true)
+ port(b, "port", 4242)
{}
};
-class FTNoIR_Tracker : public ITracker, public QThread
+class FTNoIR_Tracker : public ITracker, protected QThread
{
public:
FTNoIR_Tracker();
~FTNoIR_Tracker();
void StartTracker(QFrame *);
void GetHeadPoseData(double *data);
- volatile bool should_quit;
protected:
- void run(); // qthread override run method
+ void run() override;
private:
- QUdpSocket inSocket;
- QHostAddress destIP;
- QHostAddress srcIP;
- double newHeadPose[6];
+ QUdpSocket sock;
+ double last_recv_pose[6];
QMutex mutex;
settings s;
+ volatile bool should_quit;
};
-// Widget that has controls for FTNoIR protocol client-settings.
class TrackerControls: public QWidget, public ITrackerDialog
{
Q_OBJECT
public:
-
- explicit TrackerControls();
+ TrackerControls();
void registerTracker(ITracker *) {}
void unRegisterTracker() {}
private:
@@ -63,9 +48,6 @@ private slots:
void doCancel();
};
-//*******************************************************************************************************
-// FaceTrackNoIR Tracker DLL. Functions used to get general info on the Tracker
-//*******************************************************************************************************
class FTNoIR_TrackerDll : public Metadata
{
public:
@@ -74,4 +56,3 @@ public:
void getDescription(QString *strToBeFilled);
void getIcon(QIcon *icon);
};
-