diff options
author | Wim Vriend <facetracknoir@gmail.com> | 2010-12-18 11:43:47 +0000 |
---|---|---|
committer | Wim Vriend <facetracknoir@gmail.com> | 2010-12-18 11:43:47 +0000 |
commit | 9e0250dcad1ef02dc6cba1315fe37c8c2329769a (patch) | |
tree | 44978da1243d8c4dbc91e35ad6d00f697b1107c3 /FaceTrackNoIR/FTIRServer.h | |
parent | 4c04337f46470180312812634beb0e39a04bcf9f (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/FTIRServer.h')
-rw-r--r-- | FaceTrackNoIR/FTIRServer.h | 37 |
1 files changed, 12 insertions, 25 deletions
diff --git a/FaceTrackNoIR/FTIRServer.h b/FaceTrackNoIR/FTIRServer.h index 2ffc1653..98273bc5 100644 --- a/FaceTrackNoIR/FTIRServer.h +++ b/FaceTrackNoIR/FTIRServer.h @@ -23,6 +23,7 @@ #ifndef INCLUDED_FTIRSERVER_H
#define INCLUDED_FTIRSERVER_H
+#include "FTNoIR_cxx_protocolserver.h"
#include "FTIRTypes.h"
#include <QString>
#include <QMessageBox>
@@ -42,8 +43,9 @@ typedef void (WINAPI *importTIRViewsStop)(void); #include "ui_FTNoIR_FTIRcontrols.h"
using namespace std;
+using namespace v4friend::ftnoir;
-class FTIRServer : public QThread {
+class FTIRServer : public ProtocolServerBase {
Q_OBJECT
public:
@@ -52,18 +54,14 @@ public: FTIRServer();
~FTIRServer();
- bool FTIRCreateMapping(HANDLE handle);
- void FTIRDestroyMapping();
- bool FTIRCheckClientDLL();
-
// protected member methods
protected:
void run();
+ bool checkServerInstallationOK( HANDLE handle );
private:
- // Handles to neatly terminate thread...
- HANDLE m_StopThread;
- HANDLE m_WaitThread;
+ bool FTIRCreateMapping(HANDLE handle);
+ void FTIRDestroyMapping();
HANDLE hFTIRMemMap;
FTIRMemMap *pMemData;
@@ -80,24 +78,13 @@ private: void loadSettings();
public:
+ void setVirtRotX(float rot) { virtRotX = scale2AnalogLimits (rot, -180.0f, 180.0f); }
+ void setVirtRotY(float rot) { virtRotY = scale2AnalogLimits (rot, -180.0f, 180.0f); }
+ void setVirtRotZ(float rot) { virtRotZ = scale2AnalogLimits (rot, -180.0f, 180.0f); }
- // Settings for calculating the Virtual Pose
- static float virtPosX;
- static float virtPosY;
- static float virtPosZ;
-
- static float virtRotX;
- static float virtRotY;
- static float virtRotZ;
-
- static void setVirtRotX(float rot) { virtRotX = scale2AnalogLimits (rot, -180.0f, 180.0f); }
- static void setVirtRotY(float rot) { virtRotY = scale2AnalogLimits (rot, -180.0f, 180.0f); }
- static void setVirtRotZ(float rot) { virtRotZ = scale2AnalogLimits (rot, -180.0f, 180.0f); }
-
- static void setVirtPosX(float pos) { virtPosX = scale2AnalogLimits (pos * 10.0f, -500.0f, 500.0f); }
- static void setVirtPosY(float pos) { virtPosY = scale2AnalogLimits (pos * 10.0f, -500.0f, 500.0f); }
- static void setVirtPosZ(float pos) { virtPosZ = scale2AnalogLimits (pos * 10.0f, -500.0f, 500.0f); }
-
+ void setVirtPosX(float pos) { virtPosX = scale2AnalogLimits (pos * 10.0f, -500.0f, 500.0f); }
+ void setVirtPosY(float pos) { virtPosY = scale2AnalogLimits (pos * 10.0f, -500.0f, 500.0f); }
+ void setVirtPosZ(float pos) { virtPosZ = scale2AnalogLimits (pos * 10.0f, -500.0f, 500.0f); }
};
// Widget that has controls for FTIR server-settings.
|