summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorWim Vriend <facetracknoir@gmail.com>2012-09-16 11:00:34 +0000
committerWim Vriend <facetracknoir@gmail.com>2012-09-16 11:00:34 +0000
commitf6b15f2481b99d6a48225bb920ccef0519f5025d (patch)
treed81fceee440e328e08605647854a1e152085bca5
parent7fd2f6d1af0624953aa0a9639373e9bb225c054a (diff)
Initialize newpose before getting data from the Tracker.
git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@141 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb
-rw-r--r--FaceTrackNoIR/FaceTrackNoIR.cpp10
-rw-r--r--FaceTrackNoIR/tracker.cpp9
2 files changed, 13 insertions, 6 deletions
diff --git a/FaceTrackNoIR/FaceTrackNoIR.cpp b/FaceTrackNoIR/FaceTrackNoIR.cpp
index 65793ba7..8c97aee3 100644
--- a/FaceTrackNoIR/FaceTrackNoIR.cpp
+++ b/FaceTrackNoIR/FaceTrackNoIR.cpp
@@ -456,7 +456,7 @@ void FaceTrackNoIR::loadSettings() {
// Put the filename in the window-title.
//
QFileInfo pathInfo ( currentFile );
- setWindowTitle ( "FaceTrackNoIR (1.7 alpha 2) - " + pathInfo.fileName() );
+ setWindowTitle ( "FaceTrackNoIR (1.7 alpha 4) - " + pathInfo.fileName() );
//
// Get a List of all the INI-files in the (currently active) Settings-folder.
@@ -937,11 +937,11 @@ QString libName;
if (!libName.isEmpty()) {
trackerLib = new QLibrary(libName);
- qDebug() << "FaceTrackNoIR::showEngineControls Loaded trackerLib." << trackerLib;
+// qDebug() << "FaceTrackNoIR::showEngineControls Loaded trackerLib." << trackerLib;
getIT = (importGetTrackerDialog) trackerLib->resolve("GetTrackerDialog");
- qDebug() << "FaceTrackNoIR::showEngineControls resolved." << getIT;
+// qDebug() << "FaceTrackNoIR::showEngineControls resolved." << getIT;
if (getIT) {
ITrackerDialog *ptrXyz(getIT());
@@ -949,10 +949,10 @@ QString libName;
{
pTrackerDialog = ptrXyz;
pTrackerDialog->Initialize( this );
- qDebug() << "FaceTrackNoIR::showEngineControls GetTrackerDialog Function Resolved!";
+// qDebug() << "FaceTrackNoIR::showEngineControls GetTrackerDialog Function Resolved!";
if (tracker) {
pTrackerDialog->registerTracker( tracker->getTrackerPtr() );
- qDebug() << "FaceTrackNoIR::showEngineControls RegisterTracker Function Executed";
+// qDebug() << "FaceTrackNoIR::showEngineControls RegisterTracker Function Executed";
}
}
}
diff --git a/FaceTrackNoIR/tracker.cpp b/FaceTrackNoIR/tracker.cpp
index b9497fde..3a7eb4f9 100644
--- a/FaceTrackNoIR/tracker.cpp
+++ b/FaceTrackNoIR/tracker.cpp
@@ -95,7 +95,7 @@ T6DOF Tracker::target_camera(0,0,0,0,0,0);
T6DOF Tracker::new_camera(0,0,0,0,0,0);
T6DOF Tracker::output_camera(0,0,0,0,0,0); // Position sent to game protocol
-THeadPoseDOF Tracker::Pitch("PitchUp", "PitchDown", 50, 90); // One structure for each of 6DOF's
+THeadPoseDOF Tracker::Pitch("PitchUp", "PitchDown", 50, 180); // One structure for each of 6DOF's
THeadPoseDOF Tracker::Yaw("Yaw", "", 50, 180);
THeadPoseDOF Tracker::Roll("Roll", "", 50, 180);
THeadPoseDOF Tracker::X("X","", 50, 180);
@@ -463,6 +463,13 @@ T6DOF gameoutput_camera(0,0,0,0,0,0);
if (WaitForSingleObject(Tracker::hTrackMutex, 100) == WAIT_OBJECT_0) {
THeadPoseData newpose;
+ newpose.pitch = 0.0f;
+ newpose.roll = 0.0f;
+ newpose.yaw = 0.0f;
+ newpose.x = 0.0f;
+ newpose.y = 0.0f;
+ newpose.z = 0.0f;
+
Tracker::confid = pTracker->GiveHeadPoseData(&newpose);
if ( Tracker::confid ) {
addHeadPose(newpose);