summaryrefslogtreecommitdiffhomepage
path: root/FaceTrackNoIR
diff options
context:
space:
mode:
authorWim Vriend <facetracknoir@gmail.com>2013-03-08 11:20:59 +0100
committerWim Vriend <facetracknoir@gmail.com>2013-03-08 11:20:59 +0100
commite21a35e8a518e0dae488ec6c2a0655aa4d07fe1f (patch)
treed28745a539401890017a050edc80c4c1b3ad1c84 /FaceTrackNoIR
parent990116bf8ac838fce808316e0d5886b531318cff (diff)
Add some files that were meant to be in the repo.
Diffstat (limited to 'FaceTrackNoIR')
-rw-r--r--FaceTrackNoIR/FaceTrackNoIR.cpp83
1 files changed, 44 insertions, 39 deletions
diff --git a/FaceTrackNoIR/FaceTrackNoIR.cpp b/FaceTrackNoIR/FaceTrackNoIR.cpp
index 0fe22052..cd4e0a4d 100644
--- a/FaceTrackNoIR/FaceTrackNoIR.cpp
+++ b/FaceTrackNoIR/FaceTrackNoIR.cpp
@@ -902,54 +902,59 @@ THeadPoseData newdata;
ui.lcdNumOutputRotY->setVisible(true);
ui.lcdNumOutputRotZ->setVisible(true);
- //
- // Get the pose and also display it.
- // Updating the pose from within the Tracker-class caused crashes...
- //
- Tracker::getHeadPose(&newdata);
- ui.lcdNumX->display(QString("%1").arg(newdata.x, 0, 'f', 1));
- ui.lcdNumY->display(QString("%1").arg(newdata.y, 0, 'f', 1));
- ui.lcdNumZ->display(QString("%1").arg(newdata.z, 0, 'f', 1));
+ if (!isMinimized()) {
- ui.lcdNumRotX->display(QString("%1").arg(newdata.yaw, 0, 'f', 1));
- ui.lcdNumRotY->display(QString("%1").arg(newdata.pitch, 0, 'f', 1));
- ui.lcdNumRotZ->display(QString("%1").arg(newdata.roll, 0, 'f', 1));
+ //
+ // Get the pose and also display it.
+ // Updating the pose from within the Tracker-class caused crashes...
+ //
+ Tracker::getHeadPose(&newdata);
+ ui.lcdNumX->display(QString("%1").arg(newdata.x, 0, 'f', 1));
+ ui.lcdNumY->display(QString("%1").arg(newdata.y, 0, 'f', 1));
+ ui.lcdNumZ->display(QString("%1").arg(newdata.z, 0, 'f', 1));
- ui.txtTracking->setVisible(Tracker::getTrackingActive());
- ui.txtAxisReverse->setVisible(Tracker::getAxisReverse());
+ ui.lcdNumRotX->display(QString("%1").arg(newdata.yaw, 0, 'f', 1));
+ ui.lcdNumRotY->display(QString("%1").arg(newdata.pitch, 0, 'f', 1));
+ ui.lcdNumRotZ->display(QString("%1").arg(newdata.roll, 0, 'f', 1));
- //
- // Get the output-pose and also display it.
- //
- if (_pose_display) {
- Tracker::getOutputHeadPose(&newdata);
- _pose_display->rotateBy(newdata.pitch, newdata.yaw, newdata.roll);
+ ui.txtTracking->setVisible(Tracker::getTrackingActive());
+ ui.txtAxisReverse->setVisible(Tracker::getAxisReverse());
- ui.lcdNumOutputPosX->display(QString("%1").arg(newdata.x, 0, 'f', 1));
- ui.lcdNumOutputPosY->display(QString("%1").arg(newdata.y, 0, 'f', 1));
- ui.lcdNumOutputPosZ->display(QString("%1").arg(newdata.z, 0, 'f', 1));
+ //
+ // Get the output-pose and also display it.
+ //
+ if (_pose_display) {
+ Tracker::getOutputHeadPose(&newdata);
+ _pose_display->rotateBy(newdata.pitch, newdata.yaw, newdata.roll);
- ui.lcdNumOutputRotX->display(QString("%1").arg(newdata.yaw, 0, 'f', 1));
- ui.lcdNumOutputRotY->display(QString("%1").arg(newdata.pitch, 0, 'f', 1));
- ui.lcdNumOutputRotZ->display(QString("%1").arg(newdata.roll, 0, 'f', 1));
- }
+ ui.lcdNumOutputPosX->display(QString("%1").arg(newdata.x, 0, 'f', 1));
+ ui.lcdNumOutputPosY->display(QString("%1").arg(newdata.y, 0, 'f', 1));
+ ui.lcdNumOutputPosZ->display(QString("%1").arg(newdata.z, 0, 'f', 1));
- //
- // Update the video-widget.
- // Requested by Stanislaw
- //
- if (tracker) {
- ITracker * theTracker = tracker->getTrackerPtr();
- if (theTracker) {
- theTracker->refreshVideo();
+ ui.lcdNumOutputRotX->display(QString("%1").arg(newdata.yaw, 0, 'f', 1));
+ ui.lcdNumOutputRotY->display(QString("%1").arg(newdata.pitch, 0, 'f', 1));
+ ui.lcdNumOutputRotZ->display(QString("%1").arg(newdata.roll, 0, 'f', 1));
}
- }
-// Tracker::doRefreshVideo();
- if (_curve_config) {
- _curve_config->update();
- }
+ //
+ // Update the video-widget.
+ // Requested by Stanislaw
+ //
+ if (tracker) {
+ ITracker * theTracker = tracker->getTrackerPtr();
+ if (theTracker) {
+ theTracker->refreshVideo();
+ }
+ }
+ // Tracker::doRefreshVideo();
+ if (_curve_config) {
+ _curve_config->update();
+ }
+ }
+ //else {
+ // qDebug() << "FaceTrackNoIR::showHeadPose status: window = minimized.";
+ //}
}
/** set the smoothing from the slider **/