summaryrefslogtreecommitdiffhomepage
path: root/facetracknoir
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-04-27 11:25:41 +0200
committerStanislaw Halik <sthalik@misaki.pl>2013-04-27 11:25:41 +0200
commitbf45260ce8f235e593a22cdbdf9bcd98d508ae7f (patch)
tree1dbd0ef32a64b5d2f54b5a4360e85ac94f42caa5 /facetracknoir
parentaaea5ec0284ed1931c184539b7796adc4d1fd19a (diff)
WIP: rewrite the GL widget in pure software mode
Diffstat (limited to 'facetracknoir')
-rw-r--r--facetracknoir/facetracknoir.cpp22
-rw-r--r--facetracknoir/facetracknoir.h2
-rw-r--r--facetracknoir/facetracknoir.ui93
3 files changed, 70 insertions, 47 deletions
diff --git a/facetracknoir/facetracknoir.cpp b/facetracknoir/facetracknoir.cpp
index 2282efdd..c031f2a8 100644
--- a/facetracknoir/facetracknoir.cpp
+++ b/facetracknoir/facetracknoir.cpp
@@ -225,8 +225,6 @@ FaceTrackNoIR::FaceTrackNoIR(QWidget *parent, Qt::WFlags flags) :
}
//Q_INIT_RESOURCE(PoseWidget);
- _pose_display = new GLWidget(ui.widget4logo, 0);
- _pose_display->rotateBy(0, 0, 0);
ui.lblX->setVisible(false);
ui.lblY->setVisible(false);
@@ -873,7 +871,7 @@ void FaceTrackNoIR::stopTracker( ) {
// Stop displaying the head-pose.
//
timUpdateHeadPose->stop();
- _pose_display->rotateBy(0, 0, 0);
+ ui.pose_display->rotateBy(0, 0, 0);
ui.lblX->setVisible(false);
ui.lblY->setVisible(false);
@@ -987,18 +985,16 @@ void FaceTrackNoIR::showHeadPose() {
//
// Get the output-pose and also display it.
//
- if (_pose_display) {
- tracker->getOutputHeadPose(newdata);
- _pose_display->rotateBy(newdata[RY], newdata[RX], newdata[RZ]);
+ tracker->getOutputHeadPose(newdata);
+ ui.pose_display->rotateBy(newdata[RX], newdata[RZ], newdata[RY]);
- ui.lcdNumOutputPosX->display(QString("%1").arg(newdata[TX], 0, 'f', 1));
- ui.lcdNumOutputPosY->display(QString("%1").arg(newdata[TY], 0, 'f', 1));
- ui.lcdNumOutputPosZ->display(QString("%1").arg(newdata[TZ], 0, 'f', 1));
+ ui.lcdNumOutputPosX->display(QString("%1").arg(newdata[TX], 0, 'f', 1));
+ ui.lcdNumOutputPosY->display(QString("%1").arg(newdata[TY], 0, 'f', 1));
+ ui.lcdNumOutputPosZ->display(QString("%1").arg(newdata[TZ], 0, 'f', 1));
- ui.lcdNumOutputRotX->display(QString("%1").arg(newdata[RX], 0, 'f', 1));
- ui.lcdNumOutputRotY->display(QString("%1").arg(newdata[RY], 0, 'f', 1));
- ui.lcdNumOutputRotZ->display(QString("%1").arg(newdata[RZ], 0, 'f', 1));
- }
+ ui.lcdNumOutputRotX->display(QString("%1").arg(newdata[RX], 0, 'f', 1));
+ ui.lcdNumOutputRotY->display(QString("%1").arg(newdata[RY], 0, 'f', 1));
+ ui.lcdNumOutputRotZ->display(QString("%1").arg(newdata[RZ], 0, 'f', 1));
//
// Update the curves in the curve-configurator. This shows the ball with the red lines.
diff --git a/facetracknoir/facetracknoir.h b/facetracknoir/facetracknoir.h
index 180db87b..8a2b6c49 100644
--- a/facetracknoir/facetracknoir.h
+++ b/facetracknoir/facetracknoir.h
@@ -53,7 +53,6 @@
#include <QDebug>
#include <QElapsedTimer>
-#include "ftnoir_posewidget/glwidget.h"
#include "ui_facetracknoir.h"
#include "ui_ftnoir_keyboardshortcuts.h"
@@ -149,7 +148,6 @@ private:
QWidget *_preferences;
QWidget *_keyboard_shortcuts;
QWidget *_curve_config;
- GLWidget *_pose_display;
/** QT objects **/
QDialog aboutDialog;
diff --git a/facetracknoir/facetracknoir.ui b/facetracknoir/facetracknoir.ui
index 119ea4e2..d91a6a92 100644
--- a/facetracknoir/facetracknoir.ui
+++ b/facetracknoir/facetracknoir.ui
@@ -1703,15 +1703,15 @@ color: rgb(0, 255, 0);</string>
<widget class="QWidget" name="widget4logo" native="true">
<property name="geometry">
<rect>
- <x>1</x>
+ <x>90</x>
<y>0</y>
- <width>250</width>
+ <width>160</width>
<height>90</height>
</rect>
</property>
<property name="minimumSize">
<size>
- <width>250</width>
+ <width>160</width>
<height>90</height>
</size>
</property>
@@ -1724,10 +1724,10 @@ color: rgb(0, 255, 0);</string>
<widget class="QPushButton" name="btnDonate">
<property name="geometry">
<rect>
- <x>100</x>
- <y>1</y>
- <width>145</width>
- <height>34</height>
+ <x>5</x>
+ <y>0</y>
+ <width>151</width>
+ <height>31</height>
</rect>
</property>
<property name="cursor">
@@ -1754,8 +1754,8 @@ Support FaceTrackNoIR!</string>
<widget class="QLCDNumber" name="lcdNumOutputRotX">
<property name="geometry">
<rect>
- <x>196</x>
- <y>34</y>
+ <x>101</x>
+ <y>30</y>
<width>50</width>
<height>21</height>
</rect>
@@ -1782,8 +1782,8 @@ Support FaceTrackNoIR!</string>
<widget class="QLCDNumber" name="lcdNumOutputRotY">
<property name="geometry">
<rect>
- <x>196</x>
- <y>52</y>
+ <x>101</x>
+ <y>48</y>
<width>50</width>
<height>21</height>
</rect>
@@ -1810,8 +1810,8 @@ Support FaceTrackNoIR!</string>
<widget class="QLCDNumber" name="lcdNumOutputRotZ">
<property name="geometry">
<rect>
- <x>196</x>
- <y>70</y>
+ <x>101</x>
+ <y>66</y>
<width>50</width>
<height>21</height>
</rect>
@@ -1838,8 +1838,8 @@ Support FaceTrackNoIR!</string>
<widget class="QLCDNumber" name="lcdNumOutputPosX">
<property name="geometry">
<rect>
- <x>112</x>
- <y>34</y>
+ <x>17</x>
+ <y>30</y>
<width>50</width>
<height>21</height>
</rect>
@@ -1866,8 +1866,8 @@ Support FaceTrackNoIR!</string>
<widget class="QLCDNumber" name="lcdNumOutputPosY">
<property name="geometry">
<rect>
- <x>112</x>
- <y>52</y>
+ <x>17</x>
+ <y>48</y>
<width>50</width>
<height>21</height>
</rect>
@@ -1894,8 +1894,8 @@ Support FaceTrackNoIR!</string>
<widget class="QLCDNumber" name="lcdNumOutputPosZ">
<property name="geometry">
<rect>
- <x>112</x>
- <y>70</y>
+ <x>17</x>
+ <y>66</y>
<width>50</width>
<height>21</height>
</rect>
@@ -1922,8 +1922,8 @@ Support FaceTrackNoIR!</string>
<widget class="QLabel" name="lblX">
<property name="geometry">
<rect>
- <x>104</x>
- <y>35</y>
+ <x>9</x>
+ <y>31</y>
<width>16</width>
<height>16</height>
</rect>
@@ -1938,8 +1938,8 @@ Support FaceTrackNoIR!</string>
<widget class="QLabel" name="lblY">
<property name="geometry">
<rect>
- <x>105</x>
- <y>55</y>
+ <x>10</x>
+ <y>51</y>
<width>16</width>
<height>16</height>
</rect>
@@ -1954,8 +1954,8 @@ Support FaceTrackNoIR!</string>
<widget class="QLabel" name="lblZ">
<property name="geometry">
<rect>
- <x>105</x>
- <y>74</y>
+ <x>10</x>
+ <y>70</y>
<width>16</width>
<height>16</height>
</rect>
@@ -1970,8 +1970,8 @@ Support FaceTrackNoIR!</string>
<widget class="QLabel" name="lblRotZ">
<property name="geometry">
<rect>
- <x>164</x>
- <y>74</y>
+ <x>69</x>
+ <y>70</y>
<width>20</width>
<height>16</height>
</rect>
@@ -1986,8 +1986,8 @@ Support FaceTrackNoIR!</string>
<widget class="QLabel" name="lblRotX">
<property name="geometry">
<rect>
- <x>166</x>
- <y>35</y>
+ <x>71</x>
+ <y>31</y>
<width>20</width>
<height>16</height>
</rect>
@@ -2002,8 +2002,8 @@ Support FaceTrackNoIR!</string>
<widget class="QLabel" name="lblRotY">
<property name="geometry">
<rect>
- <x>164</x>
- <y>55</y>
+ <x>69</x>
+ <y>51</y>
<width>25</width>
<height>16</height>
</rect>
@@ -2016,6 +2016,28 @@ Support FaceTrackNoIR!</string>
</property>
</widget>
</widget>
+ <widget class="GLWidget" name="pose_display" native="true">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>90</width>
+ <height>90</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ </widget>
</widget>
<widget class="QMenuBar" name="menuBar">
<property name="geometry">
@@ -2228,7 +2250,14 @@ Support FaceTrackNoIR!</string>
</property>
</action>
</widget>
- <layoutdefault spacing="6" margin="11"/>
+ <layoutdefault spacing="0" margin="0"/>
+ <customwidgets>
+ <customwidget>
+ <class>GLWidget</class>
+ <extends>QWidget</extends>
+ <header>glwidget.h</header>
+ </customwidget>
+ </customwidgets>
<tabstops>
<tabstop>iconcomboTrackerSource</tabstop>
<tabstop>btnStartTracker</tabstop>