summaryrefslogtreecommitdiffhomepage
path: root/facetracknoir/tracker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'facetracknoir/tracker.cpp')
-rw-r--r--facetracknoir/tracker.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/facetracknoir/tracker.cpp b/facetracknoir/tracker.cpp
index b965140b..53b3ffd3 100644
--- a/facetracknoir/tracker.cpp
+++ b/facetracknoir/tracker.cpp
@@ -31,7 +31,8 @@
/** constructor **/
Tracker::Tracker( FaceTrackNoIR *parent ) :
should_quit(false),
- do_center(false)
+ do_center(false),
+ enabled(true)
{
// Retieve the pointer to the parent
mainApp = parent;
@@ -121,7 +122,7 @@ void Tracker::run() {
Libraries->pFilter->Initialize();
}
- if (confid) {
+ if (confid && enabled) {
// get values
for (int i = 0; i < 6; i++)
target_camera.axes[i] = mainApp->axis(i).headPos;
@@ -145,9 +146,7 @@ void Tracker::run() {
get_curve(new_camera.axes[i], output_camera.axes[i], mainApp->axis(i));
}
- //
// Send the headpose to the game
- //
if (Libraries->pProtocol) {
gameoutput_camera = output_camera;
Libraries->pProtocol->sendHeadposeToGame( gameoutput_camera.axes, newpose ); // degrees & centimeters
@@ -155,7 +154,6 @@ void Tracker::run() {
}
}
- //for lower cpu load
msleep(8);
}
#if defined(_WIN32)