summaryrefslogtreecommitdiffhomepage
path: root/FaceTrackNoIR/FTServer.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/FTServer.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/FTServer.h')
-rw-r--r--FaceTrackNoIR/FTServer.h39
1 files changed, 10 insertions, 29 deletions
diff --git a/FaceTrackNoIR/FTServer.h b/FaceTrackNoIR/FTServer.h
index 72642785..1d7907ed 100644
--- a/FaceTrackNoIR/FTServer.h
+++ b/FaceTrackNoIR/FTServer.h
@@ -29,7 +29,7 @@
#ifndef INCLUDED_FTSERVER_H
#define INCLUDED_FTSERVER_H
-//#include "Windows.h"
+#include "FTNoIR_cxx_protocolserver.h"
#include "FTTypes.h"
#include <QString>
#include <QMessageBox>
@@ -47,8 +47,9 @@ typedef bool (WINAPI *importGetData)(TFreeTrackData * data);
typedef HANDLE (WINAPI *importGetMapHandle)(void);
using namespace std;
+using namespace v4friend::ftnoir;
-class FTServer : public QThread {
+class FTServer : public ProtocolServerBase {
Q_OBJECT
public:
@@ -57,55 +58,35 @@ public:
FTServer();
~FTServer();
- bool FTCreateMapping(HANDLE handle);
- void FTDestroyMapping();
- bool FTCheckClientDLL();
- QString FTGetProgramName();
+ QString GetProgramName();
// protected member methods
protected:
void run();
+ bool checkServerInstallationOK( HANDLE handle );
private:
- // Handles to neatly terminate thread...
- HANDLE m_StopThread;
- HANDLE m_WaitThread;
+ bool FTCreateMapping(HANDLE handle);
+ void FTDestroyMapping();
HANDLE hFTMemMap;
FTMemMap *pMemData;
HANDLE hFTMutex;
/** member varables for saving the head pose **/
- float headPosX;
- float headPosY;
- float headPosZ;
-
- float headRotX;
- float headRotY;
- float headRotZ;
bool confid;
- // Settings for calculating the Virtual Pose
- float virtPosX;
- float virtPosY;
- float virtPosZ;
-
- float virtRotX;
- float virtRotY;
- float virtRotZ;
-
// Private properties
QString ProgramName;
QLibrary FTClientLib;
public:
- void setHeadPosX(float x) { headPosX = x * 10; }
- void setHeadPosY(float y) { headPosY = y * 10; }
- void setHeadPosZ(float z) { headPosZ = z * 10; }
-
void setHeadRotX(float x) { headRotX = getRadsFromDegrees(x); }
void setHeadRotY(float y) { headRotY = getRadsFromDegrees(y); }
void setHeadRotZ(float z) { headRotZ = getRadsFromDegrees(z); }
+ void setHeadPosX(float x) { headPosX = x * 10; }
+ void setHeadPosY(float y) { headPosY = y * 10; }
+ void setHeadPosZ(float z) { headPosZ = z * 10; }
void setVirtRotX(float rot) { virtRotX = getRadsFromDegrees(rot); }
void setVirtRotY(float rot) { virtRotY = getRadsFromDegrees(rot); }