diff options
author | Wim Vriend <facetracknoir@gmail.com> | 2010-06-01 20:12:59 +0000 |
---|---|---|
committer | Wim Vriend <facetracknoir@gmail.com> | 2010-06-01 20:12:59 +0000 |
commit | 49d80a3e2497bdc75fa5d8b24cea7a02e4e2f96e (patch) | |
tree | 333a53c86351012d90689b3e3a6883a003a3c4a3 /FaceTrackNoIR/tracker.h | |
parent | 2625fe5af6bf71a627dcf10ff813574f8a61f994 (diff) |
Added Start/stop/reset, started with anti-jitter-campaign
git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@4 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb
Diffstat (limited to 'FaceTrackNoIR/tracker.h')
-rw-r--r-- | FaceTrackNoIR/tracker.h | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/FaceTrackNoIR/tracker.h b/FaceTrackNoIR/tracker.h index a5126818..0103e8f2 100644 --- a/FaceTrackNoIR/tracker.h +++ b/FaceTrackNoIR/tracker.h @@ -39,8 +39,6 @@ #include "FGServer.h" // FlightGear-server
// include the DirectX Library files
-//#pragma comment (lib, "d3d9.lib")
-//#pragma comment (lib, "d3dx9.lib")
#pragma comment (lib, "dinput8.lib")
#pragma comment (lib, "dxguid.lib")
@@ -75,8 +73,21 @@ private: static float headRotX;
static float headRotY;
static float headRotZ;
+
+ // Offsets, used to center view while tracking
+ static float offset_headPosX;
+ static float offset_headPosY;
+ static float offset_headPosZ; // Distance from camera
+
+ static float offset_headRotX;
+ static float offset_headRotY;
+ static float offset_headRotZ;
+
+ // Flags to start/stop/reset tracking
static bool confid;
static bool set_initial; // initial headpose is set
+ static bool do_tracking; // Start/stop tracking, using MINUS key on keyboard
+ static bool do_center; // Center head-position, using EQUALS key on keyboard
/** static member varables for calculating the virtual head pose **/
static float sensYaw;
@@ -93,6 +104,14 @@ private: static float invertY;
static float invertZ;
+ /** Thresholds to remove jitter **/
+ static float thresYaw;
+ static float thresPitch;
+ static float thresRoll;
+ static float thresX;
+ static float thresY;
+ static float thresZ;
+
static float rotNeutralZone; // Neutral Zone for rotations (rad).
//
@@ -177,6 +196,13 @@ public: static void setInvertY(bool invert) { invertY = invert?-1.0f:+1.0f; }
static void setInvertZ(bool invert) { invertZ = invert?-1.0f:+1.0f; }
+ static void setThresYaw(int x) { thresYaw = x/100.0f; }
+ static void setThresPitch(int x) { thresPitch = x/100.0f; }
+ static void setThresRoll(int x) { thresRoll = x/100.0f; }
+ static void setThresX(int x) { thresX = x/100.0f; }
+ static void setThresY(int x) { thresY = x/100.0f; }
+ static void setThresZ(int x) { thresZ = x/100.0f; }
+
static void setNeutralZone(int x) { rotNeutralZone = (x * 2.0f * 3.14159)/360.0f; }
void addRaw2List ( QList<float> *rawList, float maxIndex, float raw );
|