summaryrefslogtreecommitdiffhomepage
path: root/FaceTrackNoIR/tracker.cpp
diff options
context:
space:
mode:
authorWim Vriend <facetracknoir@gmail.com>2012-08-27 13:40:13 +0000
committerWim Vriend <facetracknoir@gmail.com>2012-08-27 13:40:13 +0000
commit863efe5f6f51fb0fd9dedec38527a11e8510e0f2 (patch)
treeeafb0a4e99cc0a66466b80693ddad753e32fa47d /FaceTrackNoIR/tracker.cpp
parent429be5148cbeacbbb84469ac59a22e9cb8322440 (diff)
For update v170 alpha 2
git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@121 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb
Diffstat (limited to 'FaceTrackNoIR/tracker.cpp')
-rw-r--r--FaceTrackNoIR/tracker.cpp27
1 files changed, 21 insertions, 6 deletions
diff --git a/FaceTrackNoIR/tracker.cpp b/FaceTrackNoIR/tracker.cpp
index 31fcff04..74fa2df5 100644
--- a/FaceTrackNoIR/tracker.cpp
+++ b/FaceTrackNoIR/tracker.cpp
@@ -23,6 +23,7 @@
*********************************************************************************/
/*
Modifications (last one on top):
+ 20120827 - WVR: Signal tracking = false to Curve-widget(s) when quitting run(). Also when Alternative Pitch curve is used.
20120805 - WVR: The FunctionConfig-widget is used to configure the Curves. It was tweaked some more, because the Accela filter now also
uses the Curve(s). ToDo: make the ranges configurable by the user. Development on the Toradex IMU makes us realize, that
a fixed input-range may not be so handy after all..
@@ -359,7 +360,15 @@ T6DOF gameoutput_camera(0,0,0,0,0,0);
// Set event
::SetEvent(m_WaitThread);
- qDebug() << "Tracker::run terminated run()";
+ qDebug() << "Tracker::run terminated run()";
+ X.curvePtr->setTrackingActive( false );
+ Y.curvePtr->setTrackingActive( false );
+ Z.curvePtr->setTrackingActive( false );
+ Yaw.curvePtr->setTrackingActive( false );
+ Pitch.curvePtr->setTrackingActive( false );
+ Pitch.curvePtrAlt->setTrackingActive( false );
+ Roll.curvePtr->setTrackingActive( false );
+
return;
}
@@ -507,9 +516,17 @@ T6DOF gameoutput_camera(0,0,0,0,0,0);
output_camera.position.x = X.invert * X.curvePtr->getValue(new_camera.position.x);
output_camera.position.y = Y.invert * Y.curvePtr->getValue(new_camera.position.y);
output_camera.position.z = Z.invert * Z.curvePtr->getValue(new_camera.position.z);
- int altp = new_camera.position.pitch < 0;
- output_camera.position.pitch = Pitch.invert * (altp ? Pitch.curvePtrAlt : Pitch.curvePtr)->getValue(new_camera.position.pitch);
- ///output_camera.position.pitch = Pitch.invert * Pitch.curvePtr->getValue(new_camera.position.pitch);
+ bool altp = new_camera.position.pitch < 0;
+ if (altp) {
+ output_camera.position.pitch = Pitch.invert * Pitch.curvePtrAlt->getValue(new_camera.position.pitch);
+ Pitch.curvePtr->setTrackingActive( false );
+ Pitch.curvePtrAlt->setTrackingActive( true );
+ }
+ else {
+ output_camera.position.pitch = Pitch.invert * Pitch.curvePtr->getValue(new_camera.position.pitch);
+ Pitch.curvePtr->setTrackingActive( true );
+ Pitch.curvePtrAlt->setTrackingActive( false );
+ }
output_camera.position.yaw = Yaw.invert * Yaw.curvePtr->getValue(new_camera.position.yaw);
output_camera.position.roll = Roll.invert * Roll.curvePtr->getValue(new_camera.position.roll);
@@ -518,8 +535,6 @@ T6DOF gameoutput_camera(0,0,0,0,0,0);
Y.curvePtr->setTrackingActive( true );
Z.curvePtr->setTrackingActive( true );
Yaw.curvePtr->setTrackingActive( true );
- Pitch.curvePtr->setTrackingActive( true );
- Pitch.curvePtrAlt->setTrackingActive( true );
Roll.curvePtr->setTrackingActive( true );
//