summaryrefslogtreecommitdiffhomepage
path: root/facetracknoir/tracker.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-10-16 20:59:40 +0200
committerStanislaw Halik <sthalik@misaki.pl>2013-10-16 20:59:40 +0200
commit33ed4d75801d547572e4d3c55a4f459d28dcf646 (patch)
treec845392790b2eca5556432dfd75db6ddb4390078 /facetracknoir/tracker.cpp
parent8e988b5a8509cf811ababd8e49ce85aa4afe4da0 (diff)
parent015547df5de7dcfaa60bfa6f8ac30b1f9c91385a (diff)
New feature: tracker disablement on keystroke
Requested-by: Patrick Ruoff (c14) Reviewed-by: mm0zct (first commit) Untested on Win32! Not even compile-time-tested... Merge remote-tracking branch 'origin/feature/toggle-tracking-enabled-20131016'
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)