summaryrefslogtreecommitdiffhomepage
path: root/FaceTrackNoIR
diff options
context:
space:
mode:
authorWim Vriend <facetracknoir@gmail.com>2011-02-01 21:00:36 +0000
committerWim Vriend <facetracknoir@gmail.com>2011-02-01 21:00:36 +0000
commit6a168be69e38cbfba522666ced2fb3f6579b0f29 (patch)
tree7db4e8f74e4383e07b733ce2d27c2042d31ed2ef /FaceTrackNoIR
parent51a3eb679889844a0f8c8643034615dc12a7f523 (diff)
Fixing alpha-update 5 issues.
git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@46 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb
Diffstat (limited to 'FaceTrackNoIR')
-rw-r--r--FaceTrackNoIR/FTNoIR_cxx_protocolserver.h23
-rw-r--r--FaceTrackNoIR/tracker.cpp7
2 files changed, 30 insertions, 0 deletions
diff --git a/FaceTrackNoIR/FTNoIR_cxx_protocolserver.h b/FaceTrackNoIR/FTNoIR_cxx_protocolserver.h
index 6548a82f..39e50e44 100644
--- a/FaceTrackNoIR/FTNoIR_cxx_protocolserver.h
+++ b/FaceTrackNoIR/FTNoIR_cxx_protocolserver.h
@@ -60,6 +60,29 @@ namespace v4friend
virtual void setHeadPosY(float y) { headPosY = y; }
virtual void setHeadPosZ(float z) { headPosZ = z; }
+ virtual void resetProperties() {
+ virtPosX = 0.0f;
+ virtPosY = 0.0f;
+ virtPosZ = 0.0f;
+ virtRotX = 0.0f;
+ virtRotY = 0.0f;
+ virtRotZ = 0.0f;
+
+ headPosX = 0.0f;
+ headPosY = 0.0f;
+ headPosZ = 0.0f;
+ headRotX = 0.0f;
+ headRotY = 0.0f;
+ headRotZ = 0.0f;
+
+ prevPosX = 0.0f;
+ prevPosY = 0.0f;
+ prevPosZ = 0.0f;
+ prevRotX = 0.0f;
+ prevRotY = 0.0f;
+ prevRotZ = 0.0f;
+ }
+
protected:
ProtocolServerBase() {};
diff --git a/FaceTrackNoIR/tracker.cpp b/FaceTrackNoIR/tracker.cpp
index f271ee5b..90efc9d6 100644
--- a/FaceTrackNoIR/tracker.cpp
+++ b/FaceTrackNoIR/tracker.cpp
@@ -346,6 +346,13 @@ void Tracker::run() {
}
//
+ // Initialize all internal data of the Game-protocol.
+ //
+ if (server_Game) {
+ server_Game->resetProperties();
+ }
+
+ //
// Setup the DirectInput for keyboard strokes
//
// create the DirectInput interface