summaryrefslogtreecommitdiffhomepage
path: root/FaceTrackNoIR/FGServer.h
diff options
context:
space:
mode:
authorWim Vriend <facetracknoir@gmail.com>2010-12-18 11:43:47 +0000
committerWim Vriend <facetracknoir@gmail.com>2010-12-18 11:43:47 +0000
commit9e0250dcad1ef02dc6cba1315fe37c8c2329769a (patch)
tree44978da1243d8c4dbc91e35ad6d00f697b1107c3 /FaceTrackNoIR/FGServer.h
parent4c04337f46470180312812634beb0e39a04bcf9f (diff)
Base Class for Game protocol
git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@30 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb
Diffstat (limited to 'FaceTrackNoIR/FGServer.h')
-rw-r--r--FaceTrackNoIR/FGServer.h26
1 files changed, 3 insertions, 23 deletions
diff --git a/FaceTrackNoIR/FGServer.h b/FaceTrackNoIR/FGServer.h
index c4d8d516..8b61f920 100644
--- a/FaceTrackNoIR/FGServer.h
+++ b/FaceTrackNoIR/FGServer.h
@@ -29,6 +29,7 @@
#ifndef INCLUDED_FGSERVER_H
#define INCLUDED_FGSERVER_H
+#include "FTNoIR_cxx_protocolserver.h"
#include "FGTypes.h"
#include <QString>
#include <QMessageBox>
@@ -42,12 +43,13 @@
#include <QUdpSocket>
using namespace std;
+using namespace v4friend::ftnoir;
#include "ui_FTNoIR_FGcontrols.h"
class Tracker; // pre-define parent-class to avoid circular includes
-class FGServer : public QThread {
+class FGServer : public ProtocolServerBase {
Q_OBJECT
public:
@@ -65,10 +67,6 @@ private slots:
void readPendingDatagrams();
private:
- // Handles to neatly terminate thread...
- HANDLE m_StopThread;
- HANDLE m_WaitThread;
-
Tracker *headTracker; // For upstream messages...
TFlightGearData TestData;
QUdpSocket *inSocket; // Receive from FligthGear
@@ -77,25 +75,7 @@ private:
QHostAddress destIP; // Destination IP-address
int destPort; // Destination port-number
- /** member variables for saving the head pose **/
- float virtPosX;
- float virtPosY;
- float virtPosZ;
-
- float virtRotX;
- float virtRotY;
- float virtRotZ;
-
void loadSettings();
-
-public:
- void setVirtRotX(float rot) { virtRotX = rot; }
- void setVirtRotY(float rot) { virtRotY = rot; }
- void setVirtRotZ(float rot) { virtRotZ = rot; }
- void setVirtPosX(float pos) { virtPosX = pos / 100.0f; }
- void setVirtPosY(float pos) { virtPosY = pos / 100.0f; }
- void setVirtPosZ(float pos) { virtPosZ = pos / 100.0f; }
-
};
// Widget that has controls for FG server-settings.