summaryrefslogtreecommitdiffhomepage
path: root/facetracknoir
diff options
context:
space:
mode:
Diffstat (limited to 'facetracknoir')
-rw-r--r--facetracknoir/ClientFiles/CFS3/Readme.txt27
-rw-r--r--facetracknoir/ClientFiles/CFS3/TIRViews.dllbin0 -> 109568 bytes
-rw-r--r--facetracknoir/ClientFiles/FS2002 and FS2004/FSUIPC.dllbin0 -> 210880 bytes
-rw-r--r--facetracknoir/ClientFiles/FlightGear/Nasal/headtracker.xml83
-rw-r--r--facetracknoir/ClientFiles/FlightGear/Protocol/headtracker.xml67
-rw-r--r--facetracknoir/ClientFiles/FlightGear/Readme.txt19
-rw-r--r--facetracknoir/ClientFiles/FlightGear/Win32/start_fg.bat1
-rw-r--r--facetracknoir/ClientFiles/FreeTrackTest/FreeTrackTest.exebin0 -> 398848 bytes
-rw-r--r--facetracknoir/ClientFiles/FreeTrackTest/Readme.txt20
-rw-r--r--facetracknoir/ClientFiles/GlovePIE/FaceTrackNoIR2TrackIR.PIE16
-rw-r--r--facetracknoir/ClientFiles/GlovePIE/Readme.txt24
-rw-r--r--facetracknoir/ClientFiles/PPJoy/PPJoy mapping for FaceTrackNoIR.jpgbin0 -> 155205 bytes
-rw-r--r--facetracknoir/ClientFiles/PPJoy/Readme.txt24
-rw-r--r--facetracknoir/ClientFiles/Tir4Fun/NPClient.dllbin0 -> 53248 bytes
-rw-r--r--facetracknoir/ClientFiles/Tir4Fun/readme.txt9
-rw-r--r--facetracknoir/ClientFiles/Tir4Fun/tir4fun.exebin0 -> 36864 bytes
-rw-r--r--facetracknoir/FSUIPCServer.cpp308
-rw-r--r--facetracknoir/FSUIPCServer.h121
-rw-r--r--facetracknoir/FTNServer.cpp294
-rw-r--r--facetracknoir/FTNServer.h107
-rw-r--r--facetracknoir/FTNoIR_Curves.ui608
-rw-r--r--facetracknoir/FTNoIR_FSUIPCcontrols.ui228
-rw-r--r--facetracknoir/FTNoIR_FTNServerControls.ui261
-rw-r--r--facetracknoir/FTNoIR_KeyboardShortcuts.ui1018
-rw-r--r--facetracknoir/FTNoIR_Preferences.ui240
-rw-r--r--facetracknoir/FaceApp.cpp60
-rw-r--r--facetracknoir/FaceApp.h27
-rw-r--r--facetracknoir/FaceTrackNoIR.cpp2220
-rw-r--r--facetracknoir/FaceTrackNoIR.h249
-rw-r--r--facetracknoir/FaceTrackNoIR.icobin0 -> 23558 bytes
-rw-r--r--facetracknoir/FaceTrackNoIR.qrc14
-rw-r--r--facetracknoir/FaceTrackNoIR.rc84
-rw-r--r--facetracknoir/FaceTrackNoIR.ui2375
-rw-r--r--facetracknoir/FaceTrackNoIR_vc8.vcproj892
-rw-r--r--facetracknoir/FaceTrackNoIR_vc9.vcproj886
-rw-r--r--facetracknoir/Readme.txt31
-rw-r--r--facetracknoir/Readme_Update_20100615.txt51
-rw-r--r--facetracknoir/Readme_Update_20100716.txt35
-rw-r--r--facetracknoir/Readme_Update_20100822.txt32
-rw-r--r--facetracknoir/UIElements/ButtonIcoBlack.bmpbin0 -> 6966 bytes
-rw-r--r--facetracknoir/UIElements/Curves.pngbin0 -> 2850 bytes
-rw-r--r--facetracknoir/UIElements/Donate.pngbin0 -> 778 bytes
-rw-r--r--facetracknoir/UIElements/FaceTrackNoIR.icobin0 -> 23558 bytes
-rw-r--r--facetracknoir/UIElements/Logo_FaceTrackNoIR_32px.jpgbin0 -> 1082 bytes
-rw-r--r--facetracknoir/UIElements/Logo_FaceTrackNoIR_32px.pngbin0 -> 2822 bytes
-rw-r--r--facetracknoir/UIElements/Logo_NoIR.pngbin0 -> 26173 bytes
-rw-r--r--facetracknoir/UIElements/Logo_NoIR_small.pngbin0 -> 6384 bytes
-rw-r--r--facetracknoir/UIElements/Logo_NoIR_small_target.pngbin0 -> 5971 bytes
-rw-r--r--facetracknoir/UIElements/Logo_NoIR_small_target90px.pngbin0 -> 5582 bytes
-rw-r--r--facetracknoir/UIElements/Tools.pngbin0 -> 3053 bytes
-rw-r--r--facetracknoir/UIElements/aboutFaceTrackNoIR.pngbin0 -> 30557 bytes
-rw-r--r--facetracknoir/UIElements/bubble_1_small.pngbin0 -> 5849 bytes
-rw-r--r--facetracknoir/UIElements/bubble_2_big.pngbin0 -> 6480 bytes
-rw-r--r--facetracknoir/UIElements/logoFaceTrackNoIR.pngbin0 -> 5437 bytes
-rw-r--r--facetracknoir/UIElements/logoFaceTrackNoIR60px.pngbin0 -> 3369 bytes
-rw-r--r--facetracknoir/images/330px-6DOF_en.pngbin0 -> 34182 bytes
-rw-r--r--facetracknoir/images/FaceTrackNoIR.icobin0 -> 23558 bytes
-rw-r--r--facetracknoir/images/Settings16.pngbin0 -> 711 bytes
-rw-r--r--facetracknoir/images/SettingsOpen16.pngbin0 -> 686 bytes
-rw-r--r--facetracknoir/images/rotation_DOFs.pngbin0 -> 21601 bytes
-rw-r--r--facetracknoir/images/translation_DOFs.pngbin0 -> 23237 bytes
-rw-r--r--facetracknoir/main.cpp59
-rw-r--r--facetracknoir/paintwidget.h0
-rw-r--r--facetracknoir/postbuild.bat27
-rw-r--r--facetracknoir/resource.h16
-rw-r--r--facetracknoir/rotation.cpp48
-rw-r--r--facetracknoir/rotation.h31
-rw-r--r--facetracknoir/spot.h27
-rw-r--r--facetracknoir/tracker.cpp1081
-rw-r--r--facetracknoir/tracker.h282
-rw-r--r--facetracknoir/tracker_types.cpp44
-rw-r--r--facetracknoir/tracker_types.h45
72 files changed, 12091 insertions, 0 deletions
diff --git a/facetracknoir/ClientFiles/CFS3/Readme.txt b/facetracknoir/ClientFiles/CFS3/Readme.txt
new file mode 100644
index 00000000..141daa27
--- /dev/null
+++ b/facetracknoir/ClientFiles/CFS3/Readme.txt
@@ -0,0 +1,27 @@
+FaceTrackNoIR for
+
+ * Combat Flight Simulator 3 (also works for Over Flanders Fields)
+ * Wings of War
+ * NASCAR Racing Season 2003
+ * Colin McRae Rally 4
+ * Race Driver 2
+ * F1 Challenge
+ * Richard Burns Rally
+
+FaceTrackNoIR was made compatible with these programs with the help of the functions TrackIR provides in the dll TIRViews.dll.
+This dll can be downloaded from the TrackIR website: http://www.naturalpoint.com/trackir/06-support/support-download-software-and-manuals.html
+
+To make the functions work, copy the dll in the FaceTrackNoIR installation folder. Then tick the 'use TIRViews.dll' checkbox for the 'fake TrackIR' game protocol.
+
+Please let us know if you like the program, if you have ideas for improvements or any questions you might have.
+
+
+
+The FaceTrackNoIR team:
+
+Wim Vriend
+Ron Hendriks
+
+
+
+Disclaimer: For usage of 3rd party software like FlightGear, the FaceTrackNoIR team is not responsible. Use it at your own risk. \ No newline at end of file
diff --git a/facetracknoir/ClientFiles/CFS3/TIRViews.dll b/facetracknoir/ClientFiles/CFS3/TIRViews.dll
new file mode 100644
index 00000000..a1fb306f
--- /dev/null
+++ b/facetracknoir/ClientFiles/CFS3/TIRViews.dll
Binary files differ
diff --git a/facetracknoir/ClientFiles/FS2002 and FS2004/FSUIPC.dll b/facetracknoir/ClientFiles/FS2002 and FS2004/FSUIPC.dll
new file mode 100644
index 00000000..264d14c5
--- /dev/null
+++ b/facetracknoir/ClientFiles/FS2002 and FS2004/FSUIPC.dll
Binary files differ
diff --git a/facetracknoir/ClientFiles/FlightGear/Nasal/headtracker.xml b/facetracknoir/ClientFiles/FlightGear/Nasal/headtracker.xml
new file mode 100644
index 00000000..d8bd1d0a
--- /dev/null
+++ b/facetracknoir/ClientFiles/FlightGear/Nasal/headtracker.xml
@@ -0,0 +1,83 @@
+<?xml version="1.0"?>
+
+<PropertyList>
+ <nasal>
+ <headtracker>
+ <script>
+ var Value = {
+ new: func(prop) {
+ var m = { parents: [Value] };
+ m.prop = props.globals.getNode(prop, 1);
+ m.value = 0;
+ return m;
+ },
+ apply: func(value) {
+ me.prop.setDoubleValue(me.prop.getValue() - me.value + value);
+ me.value = value;
+ },
+ };
+
+
+ var x = Value.new("/sim/current-view/x-offset-m");
+ var y = Value.new("/sim/current-view/y-offset-m");
+ var z = Value.new("/sim/current-view/z-offset-m");
+ var h = Value.new("/sim/current-view/heading-offset-deg");
+ var p = Value.new("/sim/current-view/pitch-offset-deg");
+ var r = Value.new("/sim/current-view/roll-offset-deg");
+
+
+ var resetting = 0;
+ var status = nil;
+
+ var reset = func {
+ if (status != 1) {
+ setprop("/sim/headtracker/control", 1);
+ resetting = 1;
+ view.resetViewPos();
+ view.resetViewDir();
+ x.value = y.value = z.value = h.value = p.value = r.value = 0;
+ }
+ }
+
+ setlistener("/sim/headtracker/status", func(n) {
+ var s = n.getValue();
+ if (!status and s) {
+ setprop("/sim/headtracker/control", 0);
+ resetting = 0;
+ }
+ status = s;
+ }, 1, 0);
+
+
+ var loop = func {
+ if (!view.index and !resetting) {
+ x.apply(getprop("/sim/headtracker/x-m"));
+ y.apply(getprop("/sim/headtracker/y-m"));
+ z.apply(getprop("/sim/headtracker/z-m"));
+
+ h.apply(getprop("/sim/headtracker/heading-deg"));
+ p.apply(getprop("/sim/headtracker/pitch-deg"));
+ r.apply(-1 * getprop("/sim/headtracker/roll-deg"));
+ }
+ settimer(loop, 0);
+ }
+
+ loop();
+
+ </script>
+ </headtracker>
+ </nasal>
+
+ <sim>
+ <headtracker>
+ <x-m type="double">0</x-m>
+ <y-m type="double">0</y-m>
+ <z-m type="double">0</z-m>
+ <heading-deg type="double">0</heading-deg>
+ <pitch-deg type="double">0</pitch-deg>
+ <roll-deg type="double">0</roll-deg>
+ <status type="int">0</status>
+ <control type="int">0</control>
+ </headtracker>
+ </sim>
+</PropertyList>
diff --git a/facetracknoir/ClientFiles/FlightGear/Protocol/headtracker.xml b/facetracknoir/ClientFiles/FlightGear/Protocol/headtracker.xml
new file mode 100644
index 00000000..cd1d0dad
--- /dev/null
+++ b/facetracknoir/ClientFiles/FlightGear/Protocol/headtracker.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0"?>
+
+<PropertyList>
+ <generic>
+ <input>
+ <binary_mode>true</binary_mode>
+ <binary_footer>none</binary_footer>
+ <byte_order>host</byte_order>
+ <record_length>52</record_length>
+
+ <chunk>
+ <name>x</name>
+ <type>double</type>
+ <node>/sim/headtracker/x-m</node>
+ </chunk>
+
+ <chunk>
+ <name>y</name>
+ <type>double</type>
+ <node>/sim/headtracker/y-m</node>
+ </chunk>
+
+ <chunk>
+ <name>z</name>
+ <type>double</type>
+ <node>/sim/headtracker/z-m</node>
+ </chunk>
+
+ <chunk>
+ <name>heading</name>
+ <type>double</type>
+ <node>/sim/headtracker/heading-deg</node>
+ </chunk>
+
+ <chunk>
+ <name>pitch</name>
+ <type>double</type>
+ <node>/sim/headtracker/pitch-deg</node>
+ </chunk>
+
+ <chunk>
+ <name>roll</name>
+ <type>double</type>
+ <node>/sim/headtracker/roll-deg</node>
+ </chunk>
+
+ <chunk>
+ <name>status</name>
+ <type>int</type>
+ <node>/sim/headtracker/status</node>
+ </chunk>
+ </input>
+
+ <output>
+ <binary_mode>true</binary_mode>
+ <binary_footer>none</binary_footer>
+ <byte_order>host</byte_order>
+ <record_length>4</record_length>
+
+ <chunk>
+ <name>control</name>
+ <type>int</type>
+ <node>/sim/headtracker/control</node>
+ </chunk>
+ </output>
+ </generic>
+</PropertyList>
diff --git a/facetracknoir/ClientFiles/FlightGear/Readme.txt b/facetracknoir/ClientFiles/FlightGear/Readme.txt
new file mode 100644
index 00000000..c86ffffe
--- /dev/null
+++ b/facetracknoir/ClientFiles/FlightGear/Readme.txt
@@ -0,0 +1,19 @@
+FaceTrackNoIR for FlightGear.
+
+FaceTrackNoIR was made compatible with FlightGear with the help of Melchior Franz, who initially made a Linux headtracker. FaceTrackNoIR sends UDP-packets to FlightGear which contain 6DOF-data. The script and protocol provided by Melchior take care of receiving the data and moving 'the head' in-game.
+
+To make the FlightGear script work, copy the files in the subfolders to the corresponding folders in the FlightGear installation folder. Start FlightGear with the batch-file 'start_fg.bat'.
+
+
+Please let us know if you like the program, if you have ideas for improvements or any questions you might have.
+
+
+
+The FaceTrackNoIR team:
+
+Wim Vriend
+Ron Hendriks
+
+
+
+Disclaimer: For usage of 3rd party software like FlightGear, the FaceTrackNoIR team is not responsible. Use it at your own risk. \ No newline at end of file
diff --git a/facetracknoir/ClientFiles/FlightGear/Win32/start_fg.bat b/facetracknoir/ClientFiles/FlightGear/Win32/start_fg.bat
new file mode 100644
index 00000000..cd9829b5
--- /dev/null
+++ b/facetracknoir/ClientFiles/FlightGear/Win32/start_fg.bat
@@ -0,0 +1 @@
+fgfs --generic=socket,in,25,localhost,5550,udp,headtracker --generic=socket,out,10,localhost,5551,udp,headtracker --prop:browser=/sim/headtracker "c:\Program Files\FlightGear\data\Nasal\headtracker.xml" \ No newline at end of file
diff --git a/facetracknoir/ClientFiles/FreeTrackTest/FreeTrackTest.exe b/facetracknoir/ClientFiles/FreeTrackTest/FreeTrackTest.exe
new file mode 100644
index 00000000..2965a07f
--- /dev/null
+++ b/facetracknoir/ClientFiles/FreeTrackTest/FreeTrackTest.exe
Binary files differ
diff --git a/facetracknoir/ClientFiles/FreeTrackTest/Readme.txt b/facetracknoir/ClientFiles/FreeTrackTest/Readme.txt
new file mode 100644
index 00000000..54f3ccd1
--- /dev/null
+++ b/facetracknoir/ClientFiles/FreeTrackTest/Readme.txt
@@ -0,0 +1,20 @@
+FaceTrackNoIR for Free-track 'enabled' games.
+
+FaceTrackNoIR was made compatible with the Free-track protocol, for which the Free-track source (a well, part of it) was
+translated from Delphi Pascal to C++ (Visual Studio C++, with Qt).
+
+To start the Free-track protocol-server in FaceTrackNoIR, select Free-track in the 'game-protocol' listbox. The program
+'FreeTrackTest.exe' is provided to check, if the protocol-server is running.
+
+FreeTrackTest.exe was created by the Free-track team.
+
+
+
+The FaceTrackNoIR team:
+
+Wim Vriend
+Ron Hendriks
+
+
+
+Disclaimer: For usage of 3rd party software like FreeTrackTest, the FaceTrackNoIR team is not responsible. Use it at your own risk. \ No newline at end of file
diff --git a/facetracknoir/ClientFiles/GlovePIE/FaceTrackNoIR2TrackIR.PIE b/facetracknoir/ClientFiles/GlovePIE/FaceTrackNoIR2TrackIR.PIE
new file mode 100644
index 00000000..745da7c6
--- /dev/null
+++ b/facetracknoir/ClientFiles/GlovePIE/FaceTrackNoIR2TrackIR.PIE
@@ -0,0 +1,16 @@
+//
+// 6 Degrees of Freedom Headtracking with FaceTrackNoIR
+// 2010 by Wim Vriend
+//
+pie.FrameRate = 120Hz
+var.multiply = 1.5
+var.R2D = 57.295781
+FakeTrackIR.pitch=(Joystick.pitch - 0.10) * var.R2D * var.multiply
+FakeTrackIR.yaw=(Joystick.yaw - 0.10) * var.R2D * var.multiply
+FakeTrackIR.roll=(Joystick.roll - 0.10) * var.R2D * var.multiply
+FakeTrackIR.x=(Joystick.x - 0.10) * var.R2D * var.multiply
+FakeTrackIR.y=(Joystick.y - 0.10) * var.R2D * var.multiply
+FakeTrackIR.z=(Joystick.z - 0.10) * var.R2D * var.multiply
+debug = 'pitch='+FakeTrackIR.pitch+' roll='+FakeTrackIR.roll+' yaw='+FakeTrackIR.yaw+' xyz=('+FakeTrackIR.x+','+FakeTrackIR.y+','+FakeTrackIR.z+')'
+//debug = FakeTrackIR.active
+
diff --git a/facetracknoir/ClientFiles/GlovePIE/Readme.txt b/facetracknoir/ClientFiles/GlovePIE/Readme.txt
new file mode 100644
index 00000000..db88fdc8
--- /dev/null
+++ b/facetracknoir/ClientFiles/GlovePIE/Readme.txt
@@ -0,0 +1,24 @@
+FaceTrackNoIR for PPJoy 'enabled' games/programs.
+
+FaceTrackNoIR was made compatible with the PPJoy virtual joystick(s), that can be used by various other programs as input. GlovePIE is one of the most powerfull we know (we have also tried tir4fun, but that is quite limited).
+
+To start the PPJoy protocol-server in FaceTrackNoIR, select Virtual Joystick in the 'game-protocol' listbox. The
+settings, necessary to configure PPJoy for FaceTrackNoIR as included in the PPJoy folder.
+
+GlovePIE was made by Carl Kenner and may NOT be used for military purposes. You can download it from the website
+http://glovepie.org/glovepie.php
+
+The script FaceTrackNoIR2TrackIR.PIE, which was included in this folder, surves as an example for GlovePIE. If anyone
+want to use, change or improve it: feel free to do so. In fact, if you do, we would like to receive a copy :-)
+
+Regards,
+
+
+The FaceTrackNoIR team:
+
+Wim Vriend
+Ron Hendriks
+
+
+
+Disclaimer: For usage of 3rd party software like GlovePIE, the FaceTrackNoIR team is not responsible. Use it at your own risk. \ No newline at end of file
diff --git a/facetracknoir/ClientFiles/PPJoy/PPJoy mapping for FaceTrackNoIR.jpg b/facetracknoir/ClientFiles/PPJoy/PPJoy mapping for FaceTrackNoIR.jpg
new file mode 100644
index 00000000..052c6899
--- /dev/null
+++ b/facetracknoir/ClientFiles/PPJoy/PPJoy mapping for FaceTrackNoIR.jpg
Binary files differ
diff --git a/facetracknoir/ClientFiles/PPJoy/Readme.txt b/facetracknoir/ClientFiles/PPJoy/Readme.txt
new file mode 100644
index 00000000..3000ece6
--- /dev/null
+++ b/facetracknoir/ClientFiles/PPJoy/Readme.txt
@@ -0,0 +1,24 @@
+FaceTrackNoIR for PPJoy 'enabled' games/programs.
+
+FaceTrackNoIR was made compatible with the PPJoy virtual joystick(s), that can be used by various other programs as input.
+
+To start the PPJoy protocol-server in FaceTrackNoIR, select Virtual Joystick in the 'game-protocol' listbox. The
+settings, necessary to configure PPJoy for FaceTrackNoIR as included in the PPJoy folder, in the file
+PPJoy mapping for FaceTrackNoIR.jpg.
+
+PPJoy was made by Deon van der Westhuysen and is unfortunately not updated anymore. You can download it from the website
+http://shareware.pcmag.com/free/Miscellaneous-Utilities/PPJoy/75176.html, but possibly from others as well...
+
+
+Regards,
+
+
+The FaceTrackNoIR team:
+
+Wim Vriend
+Ron Hendriks
+
+
+
+
+Disclaimer: For usage of 3rd party software like PPJoy, the FaceTrackNoIR team is not responsible. Use it at your own risk. \ No newline at end of file
diff --git a/facetracknoir/ClientFiles/Tir4Fun/NPClient.dll b/facetracknoir/ClientFiles/Tir4Fun/NPClient.dll
new file mode 100644
index 00000000..e392442e
--- /dev/null
+++ b/facetracknoir/ClientFiles/Tir4Fun/NPClient.dll
Binary files differ
diff --git a/facetracknoir/ClientFiles/Tir4Fun/readme.txt b/facetracknoir/ClientFiles/Tir4Fun/readme.txt
new file mode 100644
index 00000000..010510db
--- /dev/null
+++ b/facetracknoir/ClientFiles/Tir4Fun/readme.txt
@@ -0,0 +1,9 @@
+What is TIR4FUN?
+
+TIR4FUN is a free utility for dedicated gamers. It enables 6DOF POV control with mouse and joystick axes.
+
+Software is provided as it is. Configuration is straightforward. GUI says it all!
+
+Installation:
+
+Copy all files to a directory. Launch tir4fun.exe to bring up the GUI.
diff --git a/facetracknoir/ClientFiles/Tir4Fun/tir4fun.exe b/facetracknoir/ClientFiles/Tir4Fun/tir4fun.exe
new file mode 100644
index 00000000..a51eced0
--- /dev/null
+++ b/facetracknoir/ClientFiles/Tir4Fun/tir4fun.exe
Binary files differ
diff --git a/facetracknoir/FSUIPCServer.cpp b/facetracknoir/FSUIPCServer.cpp
new file mode 100644
index 00000000..3006b430
--- /dev/null
+++ b/facetracknoir/FSUIPCServer.cpp
@@ -0,0 +1,308 @@
+/********************************************************************************
+* FSUIPCServer FSUIPCServer is the Class, that communicates headpose-data *
+* to games, using the FSUIPC.dll. *
+* *
+* Copyright (C) 2010 Wim Vriend (Developing) *
+* Ron Hendriks (Testing and Research) *
+* *
+* This program is free software; you can redistribute it and/or modify it *
+* under the terms of the GNU General Public License as published by the *
+* Free Software Foundation; either version 3 of the License, or (at your *
+* option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, but *
+* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
+* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for *
+* more details. *
+* *
+* You should have received a copy of the GNU General Public License along *
+* with this program; if not, see <http://www.gnu.org/licenses/>. *
+* *
+********************************************************************************/
+/*
+ Modifications (last one on top):
+ 20101224 - WVR: Base class is no longer inheriting QThread. sendHeadposeToGame
+ is called from run() of Tracker.cpp
+*/
+#include "FSUIPCServer.h"
+#include <QFileDialog>
+
+/** constructor **/
+FSUIPCServer::FSUIPCServer() {
+
+ loadSettings();
+ ProgramName = "Microsoft FS2004";
+
+ prevPosX = 0.0f;
+ prevPosY = 0.0f;
+ prevPosZ = 0.0f;
+ prevRotX = 0.0f;
+ prevRotY = 0.0f;
+ prevRotZ = 0.0f;
+
+}
+
+/** destructor **/
+FSUIPCServer::~FSUIPCServer() {
+
+ //
+ // Free the DLL
+ //
+ FSUIPCLib.unload();
+}
+
+//
+// Update Headpose in Game.
+//
+void FSUIPCServer::sendHeadposeToGame() {
+DWORD result;
+TFSState pitch;
+TFSState yaw;
+TFSState roll;
+WORD FSZoom;
+
+ qDebug() << "FSUIPCServer::run() says: started!";
+
+ //
+ // Init. the FSUIPC offsets (derived from Free-track...)
+ //
+ pitch.Control = 66503;
+ yaw.Control = 66504;
+ roll.Control = 66505;
+
+ //
+ // Only do this when the data has changed. This way, the HAT-switch can be used when tracking is OFF.
+ //
+ if ((prevPosX != virtPosX) || (prevPosY != virtPosY) || (prevPosZ != virtPosZ) ||
+ (prevRotX != virtRotX) || (prevRotY != virtRotY) || (prevRotZ != virtRotZ)) {
+ //
+ // Open the connection
+ //
+ FSUIPC_Open(SIM_ANY, &result);
+
+ //
+ // Check the FS-version
+ //
+ if (((result == FSUIPC_ERR_OK) || (result == FSUIPC_ERR_OPEN)) &&
+ ((FSUIPC_FS_Version == SIM_FS2K2) || (FSUIPC_FS_Version == SIM_FS2K4))) {
+// qDebug() << "FSUIPCServer::run() says: FSUIPC opened succesfully";
+ //
+ // Write the 4! DOF-data to FS. Only rotations and zoom are possible.
+ //
+ pitch.Value = scale2AnalogLimits(virtRotX, -180, 180);
+ FSUIPC_Write(0x3110, 8, &pitch, &result);
+
+ yaw.Value = scale2AnalogLimits(virtRotY, -180, 180);
+ FSUIPC_Write(0x3110, 8, &yaw, &result);
+
+ roll.Value = scale2AnalogLimits(virtRotZ, -180, 180);
+ FSUIPC_Write(0x3110, 8, &roll, &result);
+
+ FSZoom = (WORD) (64/50) * virtPosZ + 64;
+ FSUIPC_Write(0x832E, 2, &FSZoom, &result);
+
+ //
+ // Write the data, in one go!
+ //
+ FSUIPC_Process(&result);
+ if (result == FSUIPC_ERR_SENDMSG) {
+ FSUIPC_Close(); //timeout (1 second) so assume FS closed
+ }
+ }
+ }
+
+ prevPosX = virtPosX;
+ prevPosY = virtPosY;
+ prevPosZ = virtPosZ;
+ prevRotX = virtRotX;
+ prevRotY = virtRotY;
+ prevRotZ = virtRotZ;
+
+}
+
+//
+// Check if the Client DLL exists and load it (to test it), if so.
+// Returns 'true' if all seems OK.
+//
+bool FSUIPCServer::checkServerInstallationOK()
+{
+ qDebug() << "FSUIPCCheckClientDLL says: Starting Function";
+
+ //
+ // Load the DLL.
+ //
+ FSUIPCLib.setFileName( LocationOfDLL );
+ if (FSUIPCLib.load() != true) {
+ qDebug() << "FSUIPCCheckClientDLL says: Error loading FSUIPC DLL";
+ return false;
+ }
+
+ return true;
+}
+
+//
+// Scale the measured value to the Joystick values
+//
+int FSUIPCServer::scale2AnalogLimits( float x, float min_x, float max_x ) {
+double y;
+double local_x;
+
+ local_x = x;
+ if (local_x > max_x) {
+ local_x = max_x;
+ }
+ if (local_x < min_x) {
+ local_x = min_x;
+ }
+ y = ( 16383 * local_x ) / max_x;
+
+ return (int) y;
+}
+
+//
+// Load the current Settings from the currently 'active' INI-file.
+//
+void FSUIPCServer::loadSettings() {
+
+ QSettings settings("Abbequerque Inc.", "FaceTrackNoIR"); // Registry settings (in HK_USER)
+
+ QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/Settings/default.ini" ).toString();
+ QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file)
+
+ iniFile.beginGroup ( "FSUIPC" );
+ LocationOfDLL = iniFile.value ( "LocationOfDLL", FSUIPC_FILENAME ).toString();
+ iniFile.endGroup ();
+}
+
+//
+// Constructor for server-settings-dialog
+//
+FSUIPCControls::FSUIPCControls( QWidget *parent, Qt::WindowFlags f ) :
+QWidget( parent , f)
+{
+ ui.setupUi( this );
+
+ QPoint offsetpos(100, 100);
+ this->move(parent->pos() + offsetpos);
+
+ // Connect Qt signals to member-functions
+ connect(ui.btnOK, SIGNAL(clicked()), this, SLOT(doOK()));
+ connect(ui.btnCancel, SIGNAL(clicked()), this, SLOT(doCancel()));
+ connect(ui.btnFindDLL, SIGNAL(clicked()), this, SLOT(getLocationOfDLL()));
+
+ // Load the settings from the current .INI-file
+ loadSettings();
+}
+
+//
+// Destructor for server-dialog
+//
+FSUIPCControls::~FSUIPCControls() {
+ qDebug() << "~FSUIPCControls() says: started";
+}
+
+//
+// OK clicked on server-dialog
+//
+void FSUIPCControls::doOK() {
+ save();
+ this->close();
+}
+
+// override show event
+void FSUIPCControls::showEvent ( QShowEvent * event ) {
+ loadSettings();
+}
+
+//
+// Cancel clicked on server-dialog
+//
+void FSUIPCControls::doCancel() {
+ //
+ // Ask if changed Settings should be saved
+ //
+ if (settingsDirty) {
+ int ret = QMessageBox::question ( this, "Settings have changed", "Do you want to save the settings?", QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel, QMessageBox::Discard );
+
+ qDebug() << "doCancel says: answer =" << ret;
+
+ switch (ret) {
+ case QMessageBox::Save:
+ save();
+ this->close();
+ break;
+ case QMessageBox::Discard:
+ this->close();
+ break;
+ case QMessageBox::Cancel:
+ // Cancel was clicked
+ break;
+ default:
+ // should never be reached
+ break;
+ }
+ }
+ else {
+ this->close();
+ }
+}
+
+//
+// Load the current Settings from the currently 'active' INI-file.
+//
+void FSUIPCControls::loadSettings() {
+
+ qDebug() << "loadSettings says: Starting ";
+ QSettings settings("Abbequerque Inc.", "FaceTrackNoIR"); // Registry settings (in HK_USER)
+
+ QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/Settings/default.ini" ).toString();
+ QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file)
+
+ qDebug() << "loadSettings says: iniFile = " << currentFile;
+
+ iniFile.beginGroup ( "FSUIPC" );
+ ui.txtLocationOfDLL->setText(iniFile.value ( "LocationOfDLL", FSUIPC_FILENAME ).toString() );
+ iniFile.endGroup ();
+
+ settingsDirty = false;
+
+}
+
+//
+// Save the current Settings to the currently 'active' INI-file.
+//
+void FSUIPCControls::save() {
+
+ qDebug() << "save() says: started";
+
+ QSettings settings("Abbequerque Inc.", "FaceTrackNoIR"); // Registry settings (in HK_USER)
+
+ QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/Settings/default.ini" ).toString();
+ QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file)
+
+ iniFile.beginGroup ( "FSUIPC" );
+ iniFile.setValue ( "LocationOfDLL", ui.txtLocationOfDLL->text() );
+ iniFile.endGroup ();
+
+ settingsDirty = false;
+}
+
+//
+// Show the Dialog to set the DLL's location
+//
+void FSUIPCControls::getLocationOfDLL()
+{
+ //
+ // Get the new filename of the INI-file.
+ //
+ QString fileName = QFileDialog::getOpenFileName(this, tr("Locate file"),
+ ui.txtLocationOfDLL->text(),
+ tr("FSUIPC DLL file (FSUIPC*.dll);;All Files (*)"));
+ if (!fileName.isEmpty()) {
+ ui.txtLocationOfDLL->setText( fileName );
+ settingsDirty = true;
+ }
+}
+
+
+//END
diff --git a/facetracknoir/FSUIPCServer.h b/facetracknoir/FSUIPCServer.h
new file mode 100644
index 00000000..caba2f33
--- /dev/null
+++ b/facetracknoir/FSUIPCServer.h
@@ -0,0 +1,121 @@
+/********************************************************************************
+* FSUIPCServer FSUIPCServer is the Class, that communicates headpose-data *
+* to games, using the FSUIPC.dll. *
+* *
+* Copyright (C) 2010 Wim Vriend (Developing) *
+* Ron Hendriks (Testing and Research) *
+* *
+* This program is free software; you can redistribute it and/or modify it *
+* under the terms of the GNU General Public License as published by the *
+* Free Software Foundation; either version 3 of the License, or (at your *
+* option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, but *
+* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
+* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for *
+* more details. *
+* *
+* You should have received a copy of the GNU General Public License along *
+* with this program; if not, see <http://www.gnu.org/licenses/>. *
+* *
+********************************************************************************/
+#pragma once
+#ifndef INCLUDED_FSUIPCSERVER_H
+#define INCLUDED_FSUIPCSERVER_H
+
+#include "Windows.h"
+#include <stdlib.h>
+#include "FTNoIR_cxx_protocolserver.h"
+#include "FSUIPC_User.h"
+#include <QString>
+#include <QMessageBox>
+#include <QSettings>
+#include <QFile>
+#include <QApplication>
+#include <QDebug>
+#include <QThread>
+#include <QMutex>
+#include <QLibrary>
+
+#include "ui_FTNoIR_FSUIPCcontrols.h"
+
+using namespace std;
+using namespace v4friend::ftnoir;
+
+static const char* FSUIPC_FILENAME = "C:\\Program Files\\Microsoft Games\\Flight Simulator 9\\Modules\\FSUIPC.dll";
+
+//
+// Define the structures necessary for the FSUIPC_Write calls
+//
+#pragma pack(push,1) // All fields in structure must be byte aligned.
+typedef struct
+{
+ int Control; // Control identifier
+ int Value; // Value of DOF
+} TFSState;
+#pragma pack(pop)
+
+class FSUIPCServer : public ProtocolServerBase {
+ Q_OBJECT
+
+public:
+
+ // public member methods
+ FSUIPCServer();
+ ~FSUIPCServer();
+
+ // protected member methods
+protected:
+ bool checkServerInstallationOK();
+ void sendHeadposeToGame();
+
+private:
+ // Private properties
+ QString ProgramName;
+ QLibrary FSUIPCLib;
+ QString LocationOfDLL;
+ void loadSettings();
+ float prevPosX, prevPosY, prevPosZ, prevRotX, prevRotY, prevRotZ;
+
+public:
+
+ // Settings for calculating the Virtual Pose
+ void setVirtRotX(float rot) { virtRotX = -1.0f * rot; } // degrees
+ void setVirtRotY(float rot) { virtRotY = rot; }
+ void setVirtRotZ(float rot) { virtRotZ = rot; }
+
+ void setVirtPosX(float pos) { virtPosX = 0.0f; } // cm, X and Y are not working for FS2002/2004!
+ void setVirtPosY(float pos) { virtPosY = 0.0f; }
+ void setVirtPosZ(float pos) { virtPosZ = -1.0f * pos; }
+
+ static int scale2AnalogLimits( float x, float min_x, float max_x );
+};
+
+// Widget that has controls for FSUIPC server-settings.
+class FSUIPCControls: public QWidget, public Ui::UICFSUIPCControls
+{
+ Q_OBJECT
+public:
+
+ explicit FSUIPCControls( QWidget *parent=0, Qt::WindowFlags f=0 );
+ virtual ~FSUIPCControls();
+ void showEvent ( QShowEvent * event );
+
+private:
+ Ui::UICFSUIPCControls ui;
+ void loadSettings();
+ void save();
+
+ /** helper **/
+ bool settingsDirty;
+
+private slots:
+ void doOK();
+ void doCancel();
+ void getLocationOfDLL();
+
+};
+
+
+#endif//INCLUDED_FSUIPCSERVER_H
+//END
diff --git a/facetracknoir/FTNServer.cpp b/facetracknoir/FTNServer.cpp
new file mode 100644
index 00000000..101d06a5
--- /dev/null
+++ b/facetracknoir/FTNServer.cpp
@@ -0,0 +1,294 @@
+/********************************************************************************
+* FaceTrackNoIR This program is a private project of the some enthusiastic *
+* gamers from Holland, who don't like to pay much for *
+* head-tracking. *
+* *
+* Copyright (C) 2010 Wim Vriend (Developing) *
+* Ron Hendriks (Researching and Testing) *
+* *
+* Homepage *
+* *
+* This program is free software; you can redistribute it and/or modify it *
+* under the terms of the GNU General Public License as published by the *
+* Free Software Foundation; either version 3 of the License, or (at your *
+* option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, but *
+* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
+* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for *
+* more details. *
+* *
+* You should have received a copy of the GNU General Public License along *
+* with this program; if not, see <http://www.gnu.org/licenses/>. *
+* *
+* FTNServer FTNServer is the Class, that communicates headpose-data *
+* to another FaceTrackNoIR program, using UDP. *
+* It is based on the (Linux) example made by Melchior FRANZ. *
+********************************************************************************/
+/*
+ Modifications (last one on top):
+ 20101224 - WVR: Base class is no longer inheriting QThread. sendHeadposeToGame
+ is called from run() of Tracker.cpp
+*/
+#include <QtGui>
+#include <QtNetwork>
+#include "FTNServer.h"
+#include "Tracker.h"
+#include <Winsock.h>
+
+/** constructor **/
+FTNServer::FTNServer( Tracker *parent ) {
+
+ // Save the parent
+ headTracker = parent;
+ loadSettings();
+}
+
+/** destructor **/
+FTNServer::~FTNServer() {
+ if (inSocket != 0) {
+ inSocket->close();
+ delete inSocket;
+ }
+
+ if (outSocket != 0) {
+ outSocket->close();
+ delete outSocket;
+ }
+}
+
+//
+// Update Headpose in Game.
+//
+void FTNServer::sendHeadposeToGame() {
+int no_bytes;
+QHostAddress sender;
+quint16 senderPort;
+
+ //
+ // Create UDP-sockets if they don't exist already.
+ // They must be created here, because they must be in the Tracker thread (Tracker::run())
+ //
+ if (inSocket == 0) {
+ qDebug() << "FTNServer::sendHeadposeToGame creating sockets";
+ inSocket = new QUdpSocket();
+ // Connect the inSocket to the port, to receive messages
+ if (!inSocket->bind(QHostAddress::Any, destPort+1)) {
+ qDebug() << "FTNServer::writePendingDatagrams says: unable to bind inSocket!";
+ delete inSocket;
+ inSocket = 0;
+ }
+ }
+
+ if (outSocket == 0) {
+ outSocket = new QUdpSocket();
+ }
+
+ //
+ // Copy the Raw measurements directly to the client.
+ //
+ TestData.x = virtPosX;
+ TestData.y = virtPosY;
+ TestData.z = virtPosZ;
+ TestData.pitch = virtRotX;
+ TestData.yaw = virtRotY;
+ TestData.roll = virtRotZ;
+
+ //
+ // Try to send an UDP-message to the receiver
+ //
+
+ //! [1]
+ no_bytes = outSocket->writeDatagram((const char *) &TestData, sizeof( TestData ), destIP, destPort);
+ if ( no_bytes > 0) {
+// qDebug() << "FTNServer::writePendingDatagrams says: bytes send =" << no_bytes << sizeof( double );
+ }
+ else {
+ qDebug() << "FTNServer::writePendingDatagrams says: nothing sent!";
+ }
+
+ //
+ // Receiver may send data, so we must read that here.
+ //
+ if (inSocket != 0) {
+ while (inSocket->hasPendingDatagrams()) {
+
+ QByteArray datagram;
+ datagram.resize(inSocket->pendingDatagramSize());
+
+ inSocket->readDatagram( (char * ) &cmd, sizeof(cmd), &sender, &senderPort);
+
+ fg_cmd = cmd; // Let's just accept that command for now...
+ if ( cmd > 0 ) {
+ qDebug() << "FTNServer::sendHeadposeToGame hasPendingDatagrams, cmd = " << cmd;
+ headTracker->handleGameCommand ( cmd ); // Send it upstream, for the Tracker to handle
+ }
+ }
+ }
+}
+
+//
+// Check if the Client DLL exists and load it (to test it), if so.
+// Returns 'true' if all seems OK.
+//
+bool FTNServer::checkServerInstallationOK( HANDLE handle )
+{
+ // Init. the data
+ TestData.x = 0.0f;
+ TestData.y = 0.0f;
+ TestData.z = 0.0f;
+ TestData.yaw = 0.0f;
+ TestData.pitch = 0.0f;
+ TestData.roll = 0.0f;
+// TestData.status = 0;
+ fg_cmd = 1;
+
+ inSocket = 0;
+ outSocket = 0;
+
+ return true;
+}
+
+//
+// Load the current Settings from the currently 'active' INI-file.
+//
+void FTNServer::loadSettings() {
+
+ QSettings settings("Abbequerque Inc.", "FaceTrackNoIR"); // Registry settings (in HK_USER)
+
+ QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/Settings/default.ini" ).toString();
+ QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file)
+
+ iniFile.beginGroup ( "FTN" );
+
+ QString destAddr = iniFile.value ( "IP-1", 192 ).toString() + "." + iniFile.value ( "IP-2", 168 ).toString() + "." + iniFile.value ( "IP-3", 2 ).toString() + "." + iniFile.value ( "IP-4", 1 ).toString();
+ destIP = QHostAddress( destAddr );
+ destPort = iniFile.value ( "PortNumber", 5550 ).toInt();
+
+ iniFile.endGroup ();
+}
+
+//
+// Constructor for server-settings-dialog
+//
+FTNServerControls::FTNServerControls( QWidget *parent, Qt::WindowFlags f ) :
+QWidget( parent , f)
+{
+ ui.setupUi( this );
+
+ QPoint offsetpos(100, 100);
+ this->move(parent->pos() + offsetpos);
+
+ // Connect Qt signals to member-functions
+ connect(ui.btnOK, SIGNAL(clicked()), this, SLOT(doOK()));
+ connect(ui.btnCancel, SIGNAL(clicked()), this, SLOT(doCancel()));
+ connect(ui.spinIPFirstNibble, SIGNAL(valueChanged(int)), this, SLOT(settingChanged()));
+ connect(ui.spinIPSecondNibble, SIGNAL(valueChanged(int)), this, SLOT(settingChanged()));
+ connect(ui.spinIPThirdNibble, SIGNAL(valueChanged(int)), this, SLOT(settingChanged()));
+ connect(ui.spinIPFourthNibble, SIGNAL(valueChanged(int)), this, SLOT(settingChanged()));
+ connect(ui.spinPortNumber, SIGNAL(valueChanged(int)), this, SLOT(settingChanged()));
+
+ // Load the settings from the current .INI-file
+ loadSettings();
+}
+
+//
+// Destructor for server-dialog
+//
+FTNServerControls::~FTNServerControls() {
+ qDebug() << "~FTNServerControls() says: started";
+}
+
+//
+// OK clicked on server-dialog
+//
+void FTNServerControls::doOK() {
+ save();
+ this->close();
+}
+
+// override show event
+void FTNServerControls::showEvent ( QShowEvent * event ) {
+ loadSettings();
+}
+
+//
+// Cancel clicked on server-dialog
+//
+void FTNServerControls::doCancel() {
+ //
+ // Ask if changed Settings should be saved
+ //
+ if (settingsDirty) {
+ int ret = QMessageBox::question ( this, "Settings have changed", "Do you want to save the settings?", QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel, QMessageBox::Discard );
+
+ qDebug() << "doCancel says: answer =" << ret;
+
+ switch (ret) {
+ case QMessageBox::Save:
+ save();
+ this->close();
+ break;
+ case QMessageBox::Discard:
+ this->close();
+ break;
+ case QMessageBox::Cancel:
+ // Cancel was clicked
+ break;
+ default:
+ // should never be reached
+ break;
+ }
+ }
+ else {
+ this->close();
+ }
+}
+
+//
+// Load the current Settings from the currently 'active' INI-file.
+//
+void FTNServerControls::loadSettings() {
+
+// qDebug() << "loadSettings says: Starting ";
+ QSettings settings("Abbequerque Inc.", "FaceTrackNoIR"); // Registry settings (in HK_USER)
+
+ QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/Settings/default.ini" ).toString();
+ QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file)
+
+// qDebug() << "loadSettings says: iniFile = " << currentFile;
+
+ iniFile.beginGroup ( "FTN" );
+ ui.spinIPFirstNibble->setValue( iniFile.value ( "IP-1", 192 ).toInt() );
+ ui.spinIPSecondNibble->setValue( iniFile.value ( "IP-2", 168 ).toInt() );
+ ui.spinIPThirdNibble->setValue( iniFile.value ( "IP-3", 2 ).toInt() );
+ ui.spinIPFourthNibble->setValue( iniFile.value ( "IP-4", 1 ).toInt() );
+
+ ui.spinPortNumber->setValue( iniFile.value ( "PortNumber", 5550 ).toInt() );
+ iniFile.endGroup ();
+
+ settingsDirty = false;
+}
+
+//
+// Save the current Settings to the currently 'active' INI-file.
+//
+void FTNServerControls::save() {
+
+ QSettings settings("Abbequerque Inc.", "FaceTrackNoIR"); // Registry settings (in HK_USER)
+
+ QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/Settings/default.ini" ).toString();
+ QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file)
+
+ iniFile.beginGroup ( "FTN" );
+ iniFile.setValue ( "IP-1", ui.spinIPFirstNibble->value() );
+ iniFile.setValue ( "IP-2", ui.spinIPSecondNibble->value() );
+ iniFile.setValue ( "IP-3", ui.spinIPThirdNibble->value() );
+ iniFile.setValue ( "IP-4", ui.spinIPFourthNibble->value() );
+ iniFile.setValue ( "PortNumber", ui.spinPortNumber->value() );
+ iniFile.endGroup ();
+
+ settingsDirty = false;
+}
+
+//END
diff --git a/facetracknoir/FTNServer.h b/facetracknoir/FTNServer.h
new file mode 100644
index 00000000..f392e708
--- /dev/null
+++ b/facetracknoir/FTNServer.h
@@ -0,0 +1,107 @@
+/********************************************************************************
+* FaceTrackNoIR This program is a private project of the some enthusiastic *
+* gamers from Holland, who don't like to pay much for *
+* head-tracking. *
+* *
+* Copyright (C) 2010 Wim Vriend (Developing) *
+* Ron Hendriks (Researching and Testing) *
+* *
+* Homepage *
+* *
+* This program is free software; you can redistribute it and/or modify it *
+* under the terms of the GNU General Public License as published by the *
+* Free Software Foundation; either version 3 of the License, or (at your *
+* option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, but *
+* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
+* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for *
+* more details. *
+* *
+* You should have received a copy of the GNU General Public License along *
+* with this program; if not, see <http://www.gnu.org/licenses/>. *
+* *
+* FTNServer FTNServer is the Class, that communicates headpose-data *
+* to FlightGear, using UDP. *
+* It is based on the (Linux) example made by Melchior FRANZ. *
+********************************************************************************/
+#pragma once
+#ifndef INCLUDED_FTNSERVER_H
+#define INCLUDED_FTNSERVER_H
+
+#include "FTNoIR_cxx_protocolserver.h"
+#include "..\ftnoir_tracker_base\ftnoir_tracker_base.h"
+#include <QString>
+#include <QMessageBox>
+#include <QSettings>
+#include <QFile>
+#include <QApplication>
+#include <QDebug>
+#include <QMutex>
+#include <QLibrary>
+#include <QUdpSocket>
+
+using namespace std;
+using namespace v4friend::ftnoir;
+
+#include "ui_FTNoIR_FTNServercontrols.h"
+
+class Tracker; // pre-define parent-class to avoid circular includes
+
+class FTNServer : public ProtocolServerBase {
+ Q_OBJECT
+
+public:
+
+ // public member methods
+ FTNServer( Tracker *parent );
+ ~FTNServer();
+
+ // protected member methods
+protected:
+ bool checkServerInstallationOK( HANDLE handle );
+ void sendHeadposeToGame();
+ void setVirtPosX(float pos) { virtPosX = pos; }
+ void setVirtPosY(float pos) { virtPosY = pos; }
+ void setVirtPosZ(float pos) { virtPosZ = pos; }
+
+private:
+ Tracker *headTracker; // For upstream messages...
+ THeadPoseData TestData;
+ QUdpSocket *inSocket; // Receive from FligthGear
+ QUdpSocket *outSocket; // Send to FligthGear
+ qint32 cmd;
+ qint32 fg_cmd; // Command from FlightGear
+ QHostAddress destIP; // Destination IP-address
+ int destPort; // Destination port-number
+ void loadSettings();
+};
+
+// Widget that has controls for FTNoIR protocol server-settings.
+class FTNServerControls: public QWidget, public Ui::UICFTNServerControls
+{
+ Q_OBJECT
+public:
+
+ explicit FTNServerControls( QWidget *parent=0, Qt::WindowFlags f=0 );
+ virtual ~FTNServerControls();
+ void showEvent ( QShowEvent * event );
+
+private:
+ Ui::UICFTNServerControls ui;
+ void loadSettings();
+ void save();
+
+ /** helper **/
+ bool settingsDirty;
+
+private slots:
+ void doOK();
+ void doCancel();
+ void settingChanged() { settingsDirty = true; };
+};
+
+
+
+#endif//INCLUDED_FTNSERVER_H
+//END
diff --git a/facetracknoir/FTNoIR_Curves.ui b/facetracknoir/FTNoIR_Curves.ui
new file mode 100644
index 00000000..19c68cf0
--- /dev/null
+++ b/facetracknoir/FTNoIR_Curves.ui
@@ -0,0 +1,608 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>UICCurveConfigurationDialog</class>
+ <widget class="QWidget" name="UICCurveConfigurationDialog">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>901</width>
+ <height>661</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>FaceTrackNoIR tracking curves</string>
+ </property>
+ <property name="windowIcon">
+ <iconset>
+ <normaloff>images/FaceTrackNoIR.ico</normaloff>images/FaceTrackNoIR.ico</iconset>
+ </property>
+ <property name="layoutDirection">
+ <enum>Qt::LeftToRight</enum>
+ </property>
+ <property name="autoFillBackground">
+ <bool>false</bool>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">/* Customize any plain widget that is a child of a QMainWindow. */
+QMainWindow &gt; .QWidget {
+background-color: rgb(100, 100, 100);
+}
+
+/* Set the selection colors for all widgets. */
+QWidget {
+selection-color: black;
+selection-background-color: Silver;
+color: black;
+}
+
+/* Specials for individual widget(s) */
+QWidget#UICCurveConfigurationDialog {
+background-color: #484848;
+}
+
+QWidget#tabWidget {
+background-color: #595959;
+}
+
+/*
+QWidget#widgetTop {
+background-color: #595959;
+border-bottom: 1px solid #000;
+}
+*/
+
+/* Make text in message boxes selectable. */
+QMessageBox {
+/* LinksAccessibleByMouse | TextSelectableByMouse */
+messagebox-text-interaction-flags: 5;
+}
+/* Make the entire row selected in item views. */
+QAbstractItemView {
+show-decoration-selected: 1;
+}
+
+/* Nice WindowsXP-style password character for password line edits. */
+QLineEdit[echoMode=&quot;2&quot;] {
+lineedit-password-character: 9679;
+}
+
+/* Customize tooltips. */
+QToolTip {
+background-color: rgb(170, 255, 127);
+opacity: 200;
+}
+
+/* Customize push buttons and comboboxes. Our read-only combobox
+is very similar to a push button, so they share the same border image. */
+
+QPushButton {
+min-width: 4em;
+}
+
+QPushButton:disabled {
+color: rgb(128, 128, 128);
+}
+
+QGroupBox {
+color: rgb(255, 255, 255);
+}</string>
+ </property>
+ <layout class="QVBoxLayout" name="_vertical_layout">
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_3">
+ <item>
+ <widget class="QTabWidget" name="tabWidget">
+ <property name="styleSheet">
+ <string notr="true"/>
+ </property>
+ <property name="currentIndex">
+ <number>0</number>
+ </property>
+ <widget class="QWidget" name="rotation_tab">
+ <attribute name="icon">
+ <iconset resource="FaceTrackNoIR.qrc">
+ <normaloff>:/images/rotation_DOFs.png</normaloff>:/images/rotation_DOFs.png</iconset>
+ </attribute>
+ <attribute name="title">
+ <string>Rotations</string>
+ </attribute>
+ <widget class="QWidget" name="verticalLayoutWidget">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>10</y>
+ <width>794</width>
+ <height>548</height>
+ </rect>
+ </property>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="1">
+ <widget class="QFunctionConfigurator" name="qFunctionPitch">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>260</width>
+ <height>240</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>260</width>
+ <height>500</height>
+ </size>
+ </property>
+ <property name="maxOutputEGU" stdset="0">
+ <number>180</number>
+ </property>
+ <property name="pixPerEGU_Output" stdset="0">
+ <number>1</number>
+ </property>
+ <property name="colorBezier">
+ <color>
+ <red>0</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ </property>
+ <property name="colorBackground">
+ <color>
+ <red>192</red>
+ <green>192</green>
+ <blue>192</blue>
+ </color>
+ </property>
+ <property name="stringInputEGU" stdset="0">
+ <string>Input Pitch Up (degr.)</string>
+ </property>
+ <property name="stringOutputEGU" stdset="0">
+ <string>Output Pitch Up (degr.)</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2">
+ <widget class="QFunctionConfigurator" name="qFunctionRoll">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>260</width>
+ <height>240</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>260</width>
+ <height>500</height>
+ </size>
+ </property>
+ <property name="pixPerEGU_Output" stdset="0">
+ <number>1</number>
+ </property>
+ <property name="colorBezier">
+ <color>
+ <red>0</red>
+ <green>255</green>
+ <blue>0</blue>
+ </color>
+ </property>
+ <property name="colorBackground">
+ <color>
+ <red>192</red>
+ <green>192</green>
+ <blue>192</blue>
+ </color>
+ </property>
+ <property name="stringInputEGU" stdset="0">
+ <string>Input Roll (degr.)</string>
+ </property>
+ <property name="stringOutputEGU" stdset="0">
+ <string>Output Roll (degr.)</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0">
+ <widget class="QFunctionConfigurator" name="qFunctionYaw">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>260</width>
+ <height>240</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>400</width>
+ <height>500</height>
+ </size>
+ </property>
+ <property name="pixPerEGU_Output" stdset="0">
+ <number>1</number>
+ </property>
+ <property name="colorBezier">
+ <color>
+ <red>255</red>
+ <green>170</green>
+ <blue>0</blue>
+ </color>
+ </property>
+ <property name="colorBackground">
+ <color>
+ <red>192</red>
+ <green>192</green>
+ <blue>192</blue>
+ </color>
+ </property>
+ <property name="stringInputEGU" stdset="0">
+ <string>Input Yaw (degr.)</string>
+ </property>
+ <property name="stringOutputEGU" stdset="0">
+ <string>Output Yaw (degr.)</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QFunctionConfigurator" name="qFunctionPitchDown">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>260</width>
+ <height>240</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>260</width>
+ <height>500</height>
+ </size>
+ </property>
+ <property name="maxOutputEGU" stdset="0">
+ <number>90</number>
+ </property>
+ <property name="pixPerEGU_Output" stdset="0">
+ <number>2</number>
+ </property>
+ <property name="colorBezier">
+ <color>
+ <red>0</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ </property>
+ <property name="colorBackground">
+ <color>
+ <red>192</red>
+ <green>192</green>
+ <blue>192</blue>
+ </color>
+ </property>
+ <property name="stringInputEGU" stdset="0">
+ <string>Input Pitch Down (degr.)</string>
+ </property>
+ <property name="stringOutputEGU" stdset="0">
+ <string>Output Pitch Down (degr.)</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_9">
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>25</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Left-click the graph to place a new point, right-click a point to remove. Left-click and drag to move a point.</string>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2">
+ <widget class="QWidget" name="widget_3" native="true">
+ <property name="minimumSize">
+ <size>
+ <width>170</width>
+ <height>140</height>
+ </size>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">image: url(:/images/rotation_DOFs.png);</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ <widget class="QWidget" name="translation_tab">
+ <attribute name="icon">
+ <iconset resource="FaceTrackNoIR.qrc">
+ <normaloff>:/images/translation_DOFs.png</normaloff>:/images/translation_DOFs.png</iconset>
+ </attribute>
+ <attribute name="title">
+ <string>Translations</string>
+ </attribute>
+ <widget class="QWidget" name="verticalLayoutWidget_2">
+ <property name="geometry">
+ <rect>
+ <x>30</x>
+ <y>10</y>
+ <width>794</width>
+ <height>390</height>
+ </rect>
+ </property>
+ <layout class="QGridLayout" name="gridLayout_3">
+ <item row="0" column="0">
+ <widget class="QFunctionConfigurator" name="qFunctionX">
+ <property name="minimumSize">
+ <size>
+ <width>260</width>
+ <height>240</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>260</width>
+ <height>240</height>
+ </size>
+ </property>
+ <property name="colorBezier">
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>0</blue>
+ </color>
+ </property>
+ <property name="colorBackground">
+ <color>
+ <red>192</red>
+ <green>192</green>
+ <blue>192</blue>
+ </color>
+ </property>
+ <property name="stringInputEGU" stdset="0">
+ <string>Left/Right Input X (cm.)</string>
+ </property>
+ <property name="stringOutputEGU" stdset="0">
+ <string>Output X (cm.)</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QFunctionConfigurator" name="qFunctionY">
+ <property name="minimumSize">
+ <size>
+ <width>260</width>
+ <height>240</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>260</width>
+ <height>240</height>
+ </size>
+ </property>
+ <property name="colorBezier">
+ <color>
+ <red>85</red>
+ <green>0</green>
+ <blue>255</blue>
+ </color>
+ </property>
+ <property name="colorBackground">
+ <color>
+ <red>192</red>
+ <green>192</green>
+ <blue>192</blue>
+ </color>
+ </property>
+ <property name="stringInputEGU" stdset="0">
+ <string>Up/Down Input Y (cm.)</string>
+ </property>
+ <property name="stringOutputEGU" stdset="0">
+ <string>Output Y (cm.)</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2">
+ <widget class="QFunctionConfigurator" name="qFunctionZ">
+ <property name="minimumSize">
+ <size>
+ <width>260</width>
+ <height>240</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>260</width>
+ <height>240</height>
+ </size>
+ </property>
+ <property name="colorBezier">
+ <color>
+ <red>255</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ </property>
+ <property name="colorBackground">
+ <color>
+ <red>192</red>
+ <green>192</green>
+ <blue>192</blue>
+ </color>
+ </property>
+ <property name="stringInputEGU" stdset="0">
+ <string>Forward/Backward Input Z (cm.)</string>
+ </property>
+ <property name="stringOutputEGU" stdset="0">
+ <string>Output Z (cm.)</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_10">
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>25</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Left-click the graph to place a new point, right-click a point to remove. Left-click and drag to move a point.</string>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2">
+ <widget class="QWidget" name="widget_2" native="true">
+ <property name="minimumSize">
+ <size>
+ <width>170</width>
+ <height>140</height>
+ </size>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">image: url(:/images/translation_DOFs.png);</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QGridLayout" name="gridLayout_2">
+ <item row="0" column="1">
+ <spacer name="horizontalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="0" column="2">
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <property name="sizeConstraint">
+ <enum>QLayout::SetDefaultConstraint</enum>
+ </property>
+ <item>
+ <widget class="QPushButton" name="btnOK">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>52</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>OK</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="btnCancel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>52</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Cancel</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="0" column="3">
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>10</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <customwidgets>
+ <customwidget>
+ <class>QFunctionConfigurator</class>
+ <extends>QWidget</extends>
+ <header>qfunctionconfigurator.h</header>
+ </customwidget>
+ </customwidgets>
+ <resources>
+ <include location="FaceTrackNoIR.qrc"/>
+ </resources>
+ <connections/>
+ <slots>
+ <slot>startEngineClicked()</slot>
+ <slot>stopEngineClicked()</slot>
+ <slot>cameraSettingsClicked()</slot>
+ </slots>
+</ui>
diff --git a/facetracknoir/FTNoIR_FSUIPCcontrols.ui b/facetracknoir/FTNoIR_FSUIPCcontrols.ui
new file mode 100644
index 00000000..b6120378
--- /dev/null
+++ b/facetracknoir/FTNoIR_FSUIPCcontrols.ui
@@ -0,0 +1,228 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>UICFSUIPCControls</class>
+ <widget class="QWidget" name="UICFSUIPCControls">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>541</width>
+ <height>127</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>FSUIPC settings FaceTrackNoIR</string>
+ </property>
+ <property name="windowIcon">
+ <iconset>
+ <normaloff>images/FaceTrackNoIR.ico</normaloff>images/FaceTrackNoIR.ico</iconset>
+ </property>
+ <property name="layoutDirection">
+ <enum>Qt::LeftToRight</enum>
+ </property>
+ <property name="autoFillBackground">
+ <bool>false</bool>
+ </property>
+ <layout class="QVBoxLayout" name="_vertical_layout">
+ <item>
+ <layout class="QHBoxLayout">
+ <item>
+ <widget class="QLabel" name="textLabel2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Location of FSUIPC.dll:</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_3">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_3">
+ <item>
+ <widget class="QLabel" name="txtLocationOfDLL">
+ <property name="minimumSize">
+ <size>
+ <width>230</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string>Location of FSUIPC.dll</string>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth">
+ <number>1</number>
+ </property>
+ <property name="text">
+ <string>Location of FSUIPC.dll</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="btnFindDLL">
+ <property name="maximumSize">
+ <size>
+ <width>35</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>...</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>The DLL should be placed in the Modules folder of MS Flight Simulator</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <spacer name="horizontalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <property name="sizeConstraint">
+ <enum>QLayout::SetDefaultConstraint</enum>
+ </property>
+ <item>
+ <widget class="QPushButton" name="btnOK">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>OK</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="btnCancel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Cancel</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>10</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+ <slots>
+ <slot>startEngineClicked()</slot>
+ <slot>stopEngineClicked()</slot>
+ <slot>cameraSettingsClicked()</slot>
+ </slots>
+</ui>
diff --git a/facetracknoir/FTNoIR_FTNServerControls.ui b/facetracknoir/FTNoIR_FTNServerControls.ui
new file mode 100644
index 00000000..44c7e99f
--- /dev/null
+++ b/facetracknoir/FTNoIR_FTNServerControls.ui
@@ -0,0 +1,261 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>UICFTNServerControls</class>
+ <widget class="QWidget" name="UICFTNServerControls">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>411</width>
+ <height>156</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>FTNoIR protocol settings FaceTrackNoIR</string>
+ </property>
+ <property name="windowIcon">
+ <iconset>
+ <normaloff>images/FaceTrackNoIR.ico</normaloff>images/FaceTrackNoIR.ico</iconset>
+ </property>
+ <property name="layoutDirection">
+ <enum>Qt::LeftToRight</enum>
+ </property>
+ <property name="autoFillBackground">
+ <bool>false</bool>
+ </property>
+ <layout class="QVBoxLayout" name="_vertical_layout">
+ <item>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="1" column="4">
+ <widget class="QSpinBox" name="spinIPFourthNibble">
+ <property name="maximumSize">
+ <size>
+ <width>60</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="maximum">
+ <number>255</number>
+ </property>
+ <property name="singleStep">
+ <number>1</number>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QSpinBox" name="spinIPFirstNibble">
+ <property name="maximumSize">
+ <size>
+ <width>60</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="maximum">
+ <number>255</number>
+ </property>
+ <property name="singleStep">
+ <number>1</number>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2">
+ <widget class="QSpinBox" name="spinIPSecondNibble">
+ <property name="maximumSize">
+ <size>
+ <width>60</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="maximum">
+ <number>255</number>
+ </property>
+ <property name="singleStep">
+ <number>1</number>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="3">
+ <widget class="QSpinBox" name="spinIPThirdNibble">
+ <property name="maximumSize">
+ <size>
+ <width>60</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="maximum">
+ <number>255</number>
+ </property>
+ <property name="singleStep">
+ <number>1</number>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_4">
+ <property name="text">
+ <string>IP-address remote PC</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="label_5">
+ <property name="text">
+ <string>Port-number</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QSpinBox" name="spinPortNumber">
+ <property name="minimum">
+ <number>5550</number>
+ </property>
+ <property name="maximum">
+ <number>10000</number>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Enter IP-address and port-number for the remote PC.</string>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_3">
+ <property name="text">
+ <string>Remember: you may have to change firewall-settings too!</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <spacer name="horizontalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <property name="sizeConstraint">
+ <enum>QLayout::SetDefaultConstraint</enum>
+ </property>
+ <item>
+ <widget class="QPushButton" name="btnOK">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>OK</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="btnCancel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Cancel</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>10</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <tabstops>
+ <tabstop>spinIPFirstNibble</tabstop>
+ <tabstop>spinIPSecondNibble</tabstop>
+ <tabstop>spinIPThirdNibble</tabstop>
+ <tabstop>spinIPFourthNibble</tabstop>
+ <tabstop>spinPortNumber</tabstop>
+ <tabstop>btnOK</tabstop>
+ <tabstop>btnCancel</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+ <slots>
+ <slot>startEngineClicked()</slot>
+ <slot>stopEngineClicked()</slot>
+ <slot>cameraSettingsClicked()</slot>
+ </slots>
+</ui>
diff --git a/facetracknoir/FTNoIR_KeyboardShortcuts.ui b/facetracknoir/FTNoIR_KeyboardShortcuts.ui
new file mode 100644
index 00000000..2a5ad691
--- /dev/null
+++ b/facetracknoir/FTNoIR_KeyboardShortcuts.ui
@@ -0,0 +1,1018 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>UICKeyboardShortcutDialog</class>
+ <widget class="QWidget" name="UICKeyboardShortcutDialog">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>687</width>
+ <height>438</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>FaceTrackNoIR Keyboard and Mouse shortcuts</string>
+ </property>
+ <property name="windowIcon">
+ <iconset>
+ <normaloff>images/FaceTrackNoIR.ico</normaloff>images/FaceTrackNoIR.ico</iconset>
+ </property>
+ <property name="layoutDirection">
+ <enum>Qt::LeftToRight</enum>
+ </property>
+ <property name="autoFillBackground">
+ <bool>false</bool>
+ </property>
+ <layout class="QVBoxLayout" name="_vertical_layout">
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_3">
+ <item>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="5" column="8">
+ <widget class="QLabel" name="label_3">
+ <property name="text">
+ <string>Disables:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="8">
+ <widget class="QLabel" name="label_5">
+ <property name="text">
+ <string>When OFF:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="textLabel2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Center</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="0">
+ <widget class="QLabel" name="label_2">
+ <property name="text">
+ <string>Axis Inhibitor</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QCheckBox" name="chkCenterShift">
+ <property name="maximumSize">
+ <size>
+ <width>50</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Shift</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1">
+ <widget class="QCheckBox" name="chkStartStopShift">
+ <property name="maximumSize">
+ <size>
+ <width>50</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Shift</string>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="1">
+ <widget class="QCheckBox" name="chkInhibitShift">
+ <property name="maximumSize">
+ <size>
+ <width>50</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Shift</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2">
+ <widget class="QCheckBox" name="chkCenterCtrl">
+ <property name="maximumSize">
+ <size>
+ <width>50</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Ctrl</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="2">
+ <widget class="QCheckBox" name="chkStartStopCtrl">
+ <property name="maximumSize">
+ <size>
+ <width>50</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Ctrl</string>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="2">
+ <widget class="QCheckBox" name="chkInhibitCtrl">
+ <property name="maximumSize">
+ <size>
+ <width>50</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Ctrl</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="3">
+ <widget class="QCheckBox" name="chkStartStopAlt">
+ <property name="maximumSize">
+ <size>
+ <width>50</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Alt</string>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="3">
+ <widget class="QCheckBox" name="chkInhibitAlt">
+ <property name="maximumSize">
+ <size>
+ <width>50</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Alt</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="4">
+ <widget class="QComboBox" name="cbxCenterKey">
+ <property name="minimumSize">
+ <size>
+ <width>90</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string>Select Number</string>
+ </property>
+ <property name="insertPolicy">
+ <enum>QComboBox::InsertAlphabetically</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="4">
+ <widget class="QComboBox" name="cbxStartStopKey">
+ <property name="minimumSize">
+ <size>
+ <width>90</width>
+ <height>0</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="4">
+ <widget class="QComboBox" name="cbxInhibitKey">
+ <property name="minimumSize">
+ <size>
+ <width>90</width>
+ <height>0</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="9">
+ <widget class="QGroupBox" name="groupBox">
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>80</height>
+ </size>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">color: rgb(0, 0, 0);</string>
+ </property>
+ <property name="title">
+ <string>Rotations</string>
+ </property>
+ <widget class="QCheckBox" name="chkInhibitYaw">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>20</y>
+ <width>50</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>50</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Yaw</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" name="chkInhibitPitch">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>40</y>
+ <width>46</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>50</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Pitch</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" name="chkInhibitRoll">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>60</y>
+ <width>50</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>50</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Roll</string>
+ </property>
+ </widget>
+ </widget>
+ </item>
+ <item row="3" column="9">
+ <widget class="QGroupBox" name="groupBox_2">
+ <property name="minimumSize">
+ <size>
+ <width>60</width>
+ <height>60</height>
+ </size>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">color: rgb(0, 0, 0);</string>
+ </property>
+ <property name="title">
+ <string>View</string>
+ </property>
+ <widget class="QRadioButton" name="radioSetZero">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>20</y>
+ <width>46</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Zero</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton" name="radioSetFreeze">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>40</y>
+ <width>45</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Stay</string>
+ </property>
+ </widget>
+ </widget>
+ </item>
+ <item row="3" column="0">
+ <widget class="QLabel" name="label_6">
+ <property name="text">
+ <string>Start/stop</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="10">
+ <widget class="QGroupBox" name="groupBox_3">
+ <property name="styleSheet">
+ <string notr="true">color: rgb(0, 0, 0);</string>
+ </property>
+ <property name="title">
+ <string>Translations</string>
+ </property>
+ <widget class="QCheckBox" name="chkInhibitX">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>20</y>
+ <width>30</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>30</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>X</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" name="chkInhibitY">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>40</y>
+ <width>30</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>30</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Y</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" name="chkInhibitZ">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>60</y>
+ <width>30</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>30</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Z</string>
+ </property>
+ </widget>
+ </widget>
+ </item>
+ <item row="3" column="10">
+ <widget class="QGroupBox" name="groupBox_4">
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">color: rgb(0, 0, 0);</string>
+ </property>
+ <property name="title">
+ <string>Engine tracker</string>
+ </property>
+ <widget class="QRadioButton" name="radioSetEngineStop">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>20</y>
+ <width>81</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Stop Engine</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton" name="radioSetKeepTracking">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>40</y>
+ <width>91</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Keep tracking</string>
+ </property>
+ </widget>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="textLabel2_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Game Zero</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QCheckBox" name="chkGameZeroShift">
+ <property name="maximumSize">
+ <size>
+ <width>50</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Shift</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="2">
+ <widget class="QCheckBox" name="chkGameZeroCtrl">
+ <property name="maximumSize">
+ <size>
+ <width>50</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Ctrl</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="3">
+ <widget class="QCheckBox" name="chkCenterAlt">
+ <property name="maximumSize">
+ <size>
+ <width>50</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Alt</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="3">
+ <widget class="QCheckBox" name="chkGameZeroAlt">
+ <property name="maximumSize">
+ <size>
+ <width>50</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Alt</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="4">
+ <widget class="QComboBox" name="cbxGameZeroKey">
+ <property name="minimumSize">
+ <size>
+ <width>90</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string>Select Number</string>
+ </property>
+ <property name="insertPolicy">
+ <enum>QComboBox::InsertAlphabetically</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="4">
+ <widget class="QLabel" name="textLabel2_3">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Keyboard</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="6">
+ <widget class="QLabel" name="textLabel2_4">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Mouse</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="6">
+ <widget class="QComboBox" name="cbxCenterMouseKey">
+ <property name="minimumSize">
+ <size>
+ <width>90</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string>Select Number</string>
+ </property>
+ <property name="insertPolicy">
+ <enum>QComboBox::InsertAlphabetically</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="6">
+ <widget class="QComboBox" name="cbxGameZeroMouseKey">
+ <property name="minimumSize">
+ <size>
+ <width>90</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string>Select Number</string>
+ </property>
+ <property name="insertPolicy">
+ <enum>QComboBox::InsertAlphabetically</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="6">
+ <widget class="QComboBox" name="cbxStartStopMouseKey">
+ <property name="minimumSize">
+ <size>
+ <width>90</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string>Select Number</string>
+ </property>
+ <property name="insertPolicy">
+ <enum>QComboBox::InsertAlphabetically</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="6">
+ <widget class="QComboBox" name="cbxInhibitMouseKey">
+ <property name="minimumSize">
+ <size>
+ <width>90</width>
+ <height>0</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="5">
+ <widget class="Line" name="line_2">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="5">
+ <widget class="Line" name="line_3">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="5">
+ <widget class="Line" name="line_6">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="5">
+ <widget class="Line" name="line_7">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="7">
+ <widget class="Line" name="line_9">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="7">
+ <widget class="Line" name="line_8">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="7">
+ <widget class="Line" name="line_10">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="7">
+ <widget class="Line" name="line_11">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="0">
+ <widget class="Line" name="line_12">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="9">
+ <widget class="QCheckBox" name="chkDisableBeep">
+ <property name="maximumSize">
+ <size>
+ <width>85</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Disable Beep</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_4">
+ <item>
+ <spacer name="horizontalSpacer_3">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_4">
+ <property name="text">
+ <string>The axis inhibitor shortkey toggles the selected axis Off/On</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="Line" name="line">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_5">
+ <item>
+ <layout class="QGridLayout" name="gridLayout_2">
+ <item row="2" column="1">
+ <widget class="QLabel" name="lblYawAngle4ReverseAxis">
+ <property name="text">
+ <string>Yaw angle for Reverse Axis</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="2">
+ <widget class="QSpinBox" name="spinYawAngle4ReverseAxis">
+ <property name="minimumSize">
+ <size>
+ <width>50</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>60</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="maximum">
+ <number>90</number>
+ </property>
+ <property name="value">
+ <number>45</number>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="7">
+ <spacer name="horizontalSpacer_4">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="2" column="3">
+ <widget class="QLabel" name="lblYawAngle4ReverseAxisEgu">
+ <property name="text">
+ <string>degrees</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1">
+ <widget class="QLabel" name="lblZ_Pos4ReverseAxis">
+ <property name="text">
+ <string>Z-position for Reverse Axis</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="2">
+ <widget class="QSpinBox" name="spinZ_Pos4ReverseAxis">
+ <property name="minimumSize">
+ <size>
+ <width>50</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>60</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="minimum">
+ <number>-50</number>
+ </property>
+ <property name="maximum">
+ <number>150</number>
+ </property>
+ <property name="value">
+ <number>50</number>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="3">
+ <widget class="QLabel" name="lblZ_Pos4ReverseAxisEgu">
+ <property name="text">
+ <string>cm</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="4">
+ <widget class="QLabel" name="label_7">
+ <property name="text">
+ <string>When Reverse:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="5">
+ <widget class="QSpinBox" name="spinZ_PosWhenReverseAxis">
+ <property name="minimumSize">
+ <size>
+ <width>50</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>60</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="minimum">
+ <number>-50</number>
+ </property>
+ <property name="maximum">
+ <number>150</number>
+ </property>
+ <property name="value">
+ <number>-20</number>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="6">
+ <widget class="QLabel" name="lblZ_PosWhenReverseAxisEgu">
+ <property name="text">
+ <string>cm</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QLabel" name="lblZ_Pos4ReverseAxis_2">
+ <property name="text">
+ <string>Enable Revers Axis</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2">
+ <widget class="QCheckBox" name="chkEnableReverseAxis">
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_6">
+ <item>
+ <spacer name="horizontalSpacer_5">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_8">
+ <property name="text">
+ <string>These settings are saved 'per game' (INI-file)</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <spacer name="horizontalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <property name="sizeConstraint">
+ <enum>QLayout::SetDefaultConstraint</enum>
+ </property>
+ <item>
+ <widget class="QPushButton" name="btnOK">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>OK</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="btnCancel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Cancel</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>10</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+ <slots>
+ <slot>startEngineClicked()</slot>
+ <slot>stopEngineClicked()</slot>
+ <slot>cameraSettingsClicked()</slot>
+ </slots>
+</ui>
diff --git a/facetracknoir/FTNoIR_Preferences.ui b/facetracknoir/FTNoIR_Preferences.ui
new file mode 100644
index 00000000..bb440fc6
--- /dev/null
+++ b/facetracknoir/FTNoIR_Preferences.ui
@@ -0,0 +1,240 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>UICPreferencesDialog</class>
+ <widget class="QWidget" name="UICPreferencesDialog">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>485</width>
+ <height>151</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>FaceTrackNoIR Preferences</string>
+ </property>
+ <property name="windowIcon">
+ <iconset>
+ <normaloff>images/FaceTrackNoIR.ico</normaloff>images/FaceTrackNoIR.ico</iconset>
+ </property>
+ <property name="layoutDirection">
+ <enum>Qt::LeftToRight</enum>
+ </property>
+ <property name="autoFillBackground">
+ <bool>false</bool>
+ </property>
+ <layout class="QVBoxLayout" name="_vertical_layout">
+ <item>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="0">
+ <widget class="QLabel" name="textLabel2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Auto Minimize FaceTrackNoIR (0 = disable):</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QSpinBox" name="spinAutoMinimizeTime">
+ <property name="toolTip">
+ <string extracomment="Time after Start Tracker"/>
+ </property>
+ <property name="maximum">
+ <number>1000</number>
+ </property>
+ <property name="singleStep">
+ <number>5</number>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2">
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>sec. (after 'Start')</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_2">
+ <property name="text">
+ <string>Automatically Start tracking on Startup</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="3">
+ <widget class="QRadioButton" name="radioMinimize">
+ <property name="text">
+ <string>Taskbar</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="4">
+ <widget class="QRadioButton" name="radioTray">
+ <property name="text">
+ <string>Tray</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QCheckBox" name="chkAutoStartTracking">
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_3">
+ <item>
+ <spacer name="horizontalSpacer_3">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QLabel" name="textLabel2_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>These settings are saved globally (Registry)</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <spacer name="horizontalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <property name="sizeConstraint">
+ <enum>QLayout::SetDefaultConstraint</enum>
+ </property>
+ <item>
+ <widget class="QPushButton" name="btnOK">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>OK</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="btnCancel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Cancel</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>10</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+ <slots>
+ <slot>startEngineClicked()</slot>
+ <slot>stopEngineClicked()</slot>
+ <slot>cameraSettingsClicked()</slot>
+ </slots>
+</ui>
diff --git a/facetracknoir/FaceApp.cpp b/facetracknoir/FaceApp.cpp
new file mode 100644
index 00000000..2811974c
--- /dev/null
+++ b/facetracknoir/FaceApp.cpp
@@ -0,0 +1,60 @@
+#include "FaceApp.h"
+#include "windows.h"
+#include "..\FTNoIR_Protocol_FT\FTTypes.h"
+#include "..\FTNoIR_Protocol_FTIR\FTIRTypes.h"
+#include <QDebug>
+
+//
+// Override the Application MessageFilter, to receive messages from the game(s)
+//
+bool FaceApp::winEventFilter( MSG * msg, long * result )
+{
+ int msgType = msg->message; // test line
+
+ if (msgType == msgID_FTClient) {
+ qDebug() << "FaceApp::winEventFilter says: game tickles me =" << msgType << "hwnd =" << msg->hwnd;
+ if (mainWindow != NULL) {
+ mainWindow->getGameProgramName();
+ }
+ }
+
+ ////if (msgType == WM_HOTKEY) {
+ //// switch ( msg->wParam ) {
+ //// case 777:
+ //// qDebug() << "FaceApp::winEventFilter says: HOME pressed";
+ //// break;
+ //// case 778:
+ //// qDebug() << "FaceApp::winEventFilter says: END pressed";
+ //// break;
+ //// default:
+ //// qDebug() << "FaceApp::winEventFilter says: unknown HotKey pressed";
+ //// break;
+ //// }
+ ////}
+ return( false );
+}
+
+//
+// Setup the EventFilter
+//
+void FaceApp::SetupEventFilter( FaceTrackNoIR *window ) {
+
+ mainWindow = window;
+ msgID_FTClient = RegisterWindowMessageA ( FT_PROGRAMID );
+ qDebug() << "FaceApp::SetupEventFilter says: Message ID =" << msgID_FTClient;
+ msgID_FTIR_Register = RegisterWindowMessageA ( FTIR_REGISTER_PROGRAMHANDLE );
+ msgID_FTIR_UnRegister = RegisterWindowMessageA ( FTIR_UNREGISTER_PROGRAMHANDLE );
+
+ ////if ( RegisterHotKey( window->winId(), 777, MOD_WIN, VK_HOME ) ) {
+ //// qDebug() << "FaceApp::SetupEventFilter says: RegisterHotKey HOME =" << VK_HOME;
+ ////}
+ ////if ( RegisterHotKey( window->winId(), 778, MOD_WIN, VK_END ) ) {
+ //// qDebug() << "FaceApp::SetupEventFilter says: RegisterHotKey END =" << VK_END;
+ ////}
+ ////
+ ////QAbstractEventDispatcher *evtdis = QAbstractEventDispatcher::instance();
+ ////if (evtdis != NULL) {
+ //// qDebug() << "FaceApp::SetupEventFilter says: EventDispatcher found!";
+ ////}
+
+} \ No newline at end of file
diff --git a/facetracknoir/FaceApp.h b/facetracknoir/FaceApp.h
new file mode 100644
index 00000000..39fd4b2f
--- /dev/null
+++ b/facetracknoir/FaceApp.h
@@ -0,0 +1,27 @@
+#ifndef FACEAPP_H
+#define FACEAPP_H
+
+#include <QApplication>
+#include "FaceTrackNoIR.h"
+
+class FaceApp : public QApplication
+{
+ Q_OBJECT
+public:
+ FaceApp( int &argc, char **argv ) : QApplication( argc, argv ) {}
+ ~FaceApp() {}
+
+ void SetupEventFilter( FaceTrackNoIR *window );
+
+protected:
+ bool winEventFilter( MSG * msg, long * result );
+
+private:
+ FaceTrackNoIR *mainWindow;
+ int msgID_FTClient;
+ int msgID_FTIR_Register;
+ int msgID_FTIR_UnRegister;
+ int msgID_FilterSettingChanged;
+};
+
+#endif // FACEAPP_H
diff --git a/facetracknoir/FaceTrackNoIR.cpp b/facetracknoir/FaceTrackNoIR.cpp
new file mode 100644
index 00000000..cd4e0a4d
--- /dev/null
+++ b/facetracknoir/FaceTrackNoIR.cpp
@@ -0,0 +1,2220 @@
+/********************************************************************************
+* FaceTrackNoIR This program is a private project of the some enthusiastic *
+* gamers from Holland, who don't like to pay much for *
+* head-tracking. *
+* *
+* Copyright (C) 2011 Wim Vriend (Developing) *
+* Ron Hendriks (Researching and Testing) *
+* *
+* Homepage *
+* *
+* This program is free software; you can redistribute it and/or modify it *
+* under the terms of the GNU General Public License as published by the *
+* Free Software Foundation; either version 3 of the License, or (at your *
+* option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, but *
+* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
+* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for *
+* more details. *
+* *
+* You should have received a copy of the GNU General Public License along *
+* with this program; if not, see <http://www.gnu.org/licenses/>. *
+*********************************************************************************/
+/*
+ Modifications (last one on top):
+ 20130201 - WVR: Load FreeTrack 2.0 protocol instead of fake TrackIR (which is now obsolete).
+ 20130101 - WVR: Added "None" to filter-listbox to remove "use advanced filtering".
+ 20121209 - WVR: Pre-v170 DLLs will not be added to the Listbox. Initial selection was changed (made case-insensitive).
+ 20121014 - WVR: Added second Tracker Source for Arduino solution. The two will be mutually exclusive.
+ 20120929 - WVR: Disable button Filter-settings when StartTracker.
+ 20120918 - WVR: When AutoStart is TRUE, the program is not directly minimized any more.
+ This now depends on the AutoMinimize time. Fixed the 'not showing' of the MIB.
+ Also disable combo and buttons after 'Start'.
+ 20120917 - WVR: Added Mouse-buttons to ShortKeys.
+ 20120717 - WVR: FunctionConfig is now used for the Curves, instead of BezierConfig.
+ 20120427 - WVR: The Protocol-code was already in separate DLLs, but the ListBox was still filled ´statically´. Now, a Dir() of the
+ EXE-folder is done, to locate Protocol-DLLs. The Icons were also moved to the DLLs
+ 20120317 - WVR: The Filter and Tracker-code was moved to separate DLLs. The calling-method
+ was changed accordingly. The save() and LoadSettings() functions were adapted.
+ The face-tracker member-functions NotifyZeroed and refreshVideo were added, as
+ requested by Stanislaw.
+ 20110813 - WVR: Changed the presentation of the raw inputs: now a decimal digit will even show when '0'.
+ 20110404 - WVR: Migrated the FlightGear protocol to a separate DLL. The rest must follow...
+ 20110401 - WVR: The about-dialog was shown 'misplaced'. It was corrected.
+ 20110328 - WVR: Added the display for output-pose.
+ 20110207 - WVR: RadioButtons for 'Stop engine' added. It is now possible to choose Stop or Keep tracking.
+ 20110109 - WVR: Added minimizeTaskBar option added. It is now possible to choose minimized or tray.
+*/
+#include "FaceTrackNoIR.h"
+#include "tracker.h"
+
+//#define USE_VISAGE
+
+//
+// Setup the Main Dialog
+//
+FaceTrackNoIR::FaceTrackNoIR(QWidget *parent, Qt::WFlags flags) :
+QMainWindow(parent, flags),
+pTrackerDialog(NULL),
+pSecondTrackerDialog(NULL),
+pProtocolDialog(NULL),
+pFilterDialog(NULL)
+{
+ cameraDetected = false;
+
+ //
+ // Initialize Widget handles, to prevent memory-access errors.
+ //
+ _keyboard_shortcuts = 0;
+ _preferences = 0;
+ _keyboard_shortcuts = 0;
+ _curve_config = 0;
+
+ tracker = 0;
+// _display = 0;
+ l = 0;
+ trayIcon = 0;
+
+ setupFaceTrackNoIR();
+
+ //
+ // Read the AutoStartTracking value from the registry. If it is '1', start the Tracker and Minimize...
+ //
+ QSettings settings("Abbequerque Inc.", "FaceTrackNoIR"); // Registry settings (in HK_USER)
+ if (settings.value ( "AutoStartTracking", 0 ).toBool()) {
+ startTracker();
+ }
+
+ 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);
+ ui.lblZ->setVisible(false);
+ ui.lblRotX->setVisible(false);
+ ui.lblRotY->setVisible(false);
+ ui.lblRotZ->setVisible(false);
+
+ ui.lcdNumOutputPosX->setVisible(false);
+ ui.lcdNumOutputPosY->setVisible(false);
+ ui.lcdNumOutputPosZ->setVisible(false);
+ ui.lcdNumOutputRotX->setVisible(false);
+ ui.lcdNumOutputRotY->setVisible(false);
+ ui.lcdNumOutputRotZ->setVisible(false);
+}
+
+/** sets up all objects and connections to buttons */
+void FaceTrackNoIR::setupFaceTrackNoIR() {
+
+ ui.setupUi(this);
+
+ ui.headPoseWidget->show();
+ ui.video_frame->hide();
+
+ // menu objects will be connected with the functions in FaceTrackNoIR class
+ connect(ui.actionOpen, SIGNAL(triggered()), this, SLOT(open()));
+ connect(ui.btnLoad, SIGNAL(clicked()), this, SLOT(open()));
+ connect(ui.actionSave, SIGNAL(triggered()), this, SLOT(save()));
+ connect(ui.btnSave, SIGNAL(clicked()), this, SLOT(save()));
+ connect(ui.actionSave_As, SIGNAL(triggered()), this, SLOT(saveAs()));
+ connect(ui.btnSaveAs, SIGNAL(clicked()), this, SLOT(saveAs()));
+ connect(ui.actionExit, SIGNAL(triggered()), this, SLOT(exit()));
+
+ connect(ui.actionPreferences, SIGNAL(triggered()), this, SLOT(showPreferences()));
+ connect(ui.actionKeyboard_Shortcuts, SIGNAL(triggered()), this, SLOT(showKeyboardShortcuts()));
+ connect(ui.actionCurve_Configuration, SIGNAL(triggered()), this, SLOT(showCurveConfiguration()));
+ connect(ui.btnEditCurves, SIGNAL(clicked()), this, SLOT(showCurveConfiguration()));
+ connect(ui.btnShortcuts, SIGNAL(clicked()), this, SLOT(showKeyboardShortcuts()));
+
+ connect(ui.actionSupport, SIGNAL(triggered()), this, SLOT(openurl_support()));
+ connect(ui.actionYour_Support, SIGNAL(triggered()), this, SLOT(openurl_donation()));
+ connect(ui.btnDonate, SIGNAL(clicked()), this, SLOT(openurl_donation()));
+ connect(ui.actionAbout, SIGNAL(triggered()), this, SLOT(about()));
+
+ connect(ui.actionVideoWidget, SIGNAL(triggered()), this, SLOT(showVideoWidget()));
+ connect(ui.actionHeadPoseWidget, SIGNAL(triggered()), this, SLOT(showHeadPoseWidget()));
+ connect(ui.btnShowEngineControls, SIGNAL(clicked()), this, SLOT(showTrackerSettings()));
+ connect(ui.btnShowSecondTrackerSettings, SIGNAL(clicked()), this, SLOT(showSecondTrackerSettings()));
+ connect(ui.btnShowServerControls, SIGNAL(clicked()), this, SLOT(showServerControls()));
+ connect(ui.btnShowFilterControls, SIGNAL(clicked()), this, SLOT(showFilterControls()));
+
+ // Connect checkboxes
+ connect(ui.chkInvertYaw, SIGNAL(stateChanged(int)), this, SLOT(setInvertYaw(int)));
+ connect(ui.chkInvertRoll, SIGNAL(stateChanged(int)), this, SLOT(setInvertRoll(int)));
+ connect(ui.chkInvertPitch, SIGNAL(stateChanged(int)), this, SLOT(setInvertPitch(int)));
+ connect(ui.chkInvertX, SIGNAL(stateChanged(int)), this, SLOT(setInvertX(int)));
+ connect(ui.chkInvertY, SIGNAL(stateChanged(int)), this, SLOT(setInvertY(int)));
+ connect(ui.chkInvertZ, SIGNAL(stateChanged(int)), this, SLOT(setInvertZ(int)));
+
+ // button methods connect with methods in this class
+ connect(ui.btnStartTracker, SIGNAL(clicked()), this, SLOT(startTracker()));
+ connect(ui.btnStopTracker, SIGNAL(clicked()), this, SLOT(stopTracker()));
+
+ // Connect slider for smoothing
+ connect(ui.slideSmoothing, SIGNAL(valueChanged(int)), this, SLOT(setSmoothing(int)));
+
+ //read the camera-name, using DirectShow
+ GetCameraNameDX();
+
+ //Create the system-tray and connect the events for that.
+ createIconGroupBox();
+ createActions();
+ createTrayIcon();
+
+ connect(trayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(iconActivated(QSystemTrayIcon::ActivationReason)));
+
+ //Load the tracker-settings, from the INI-file
+ loadSettings();
+ trayIcon->show();
+
+ connect(ui.iconcomboProtocol, SIGNAL(currentIndexChanged(int)), this, SLOT(protocolSelected(int)));
+ connect(ui.iconcomboProfile, SIGNAL(currentIndexChanged(int)), this, SLOT(profileSelected(int)));
+ connect(ui.iconcomboTrackerSource, SIGNAL(currentIndexChanged(int)), this, SLOT(trackingSourceSelected(int)));
+ connect(ui.iconcomboFilter, SIGNAL(currentIndexChanged(int)), this, SLOT(filterSelected(int)));
+
+ //Setup the timer for automatically minimizing after StartTracker.
+ timMinimizeFTN = new QTimer(this);
+ connect(timMinimizeFTN, SIGNAL(timeout()), this, SLOT(showMinimized()));
+
+ //Setup the timer for showing the headpose.
+ timUpdateHeadPose = new QTimer(this);
+ connect(timUpdateHeadPose, SIGNAL(timeout()), this, SLOT(showHeadPose()));
+ ui.txtTracking->setVisible(false);
+ ui.txtAxisReverse->setVisible(false);
+ ui.gameName->setText("");
+}
+
+/** destructor stops the engine and quits the faceapi **/
+FaceTrackNoIR::~FaceTrackNoIR() {
+
+ //
+ // Stop the tracker, by simulating a button-push
+ //
+ stopTracker();
+
+ //
+ // Ask if changed Settings should be saved
+ //
+ if (settingsDirty) {
+ int ret = QMessageBox::question ( this, "Settings have changed", "Do you want to save the settings?", QMessageBox::Save | QMessageBox::Discard, QMessageBox::Discard );
+
+ switch (ret) {
+ case QMessageBox::Save:
+ saveAs();
+ break;
+ case QMessageBox::Discard:
+ // Don't Save was clicked
+ break;
+ case QMessageBox::Cancel:
+ // Cancel was clicked
+ break;
+ default:
+ // should never be reached
+ break;
+ }
+ }
+}
+
+//
+// Get the ProgramName from a connected game and display it.
+//
+void FaceTrackNoIR::getGameProgramName() {
+ if ( tracker != NULL ) {
+ ui.gameName->setText( tracker->getGameProgramName() );
+ }
+}
+
+//
+// Update the Settings, after a value has changed. This way, the Tracker does not have to re-start.
+//
+void FaceTrackNoIR::updateSettings() {
+ if ( tracker != NULL ) {
+ tracker->loadSettings();
+ }
+}
+
+//
+// Get a pointer to the video-widget, to use in the DLL
+//
+QFrame *FaceTrackNoIR::getVideoWidget() {
+ return ui.video_frame;
+}
+
+//
+// Return the name of the Protocol-DLL
+//
+QString FaceTrackNoIR::getCurrentProtocolName()
+{
+ if (ui.iconcomboProtocol->currentIndex() < 0) {
+ return QString("");
+ }
+ else {
+ return protocolFileList.at(ui.iconcomboProtocol->currentIndex());
+ }
+}
+
+//
+// Return the name of the Filter-DLL
+//
+QString FaceTrackNoIR::getCurrentFilterName()
+{
+ qDebug() << "getCurrentFilterName says: " << ui.iconcomboFilter->currentIndex();
+ if (ui.iconcomboFilter->currentIndex() <= 0) {
+ return QString("None");
+ }
+ else {
+ return filterFileList.at(ui.iconcomboFilter->currentIndex() - 1 );
+ }
+}
+
+//
+// Return the name of the Tracker-DLL
+//
+QString FaceTrackNoIR::getCurrentTrackerName()
+{
+ if (ui.iconcomboTrackerSource->currentIndex() < 0) {
+ return QString("");
+ }
+ else {
+ qDebug() << "FaceTrackNoIR::getCurrentTrackerName libName = " << trackerFileList.at(ui.iconcomboTrackerSource->currentIndex());
+ return trackerFileList.at(ui.iconcomboTrackerSource->currentIndex());
+ }
+}
+
+//
+// Return the name of the second Tracker-DLL
+//
+QString FaceTrackNoIR::getSecondTrackerName()
+{
+ if (ui.cbxSecondTrackerSource->currentIndex() <= 0) {
+ return QString("None");
+ }
+ else {
+ return trackerFileList.at(ui.cbxSecondTrackerSource->currentIndex() - 1 );
+ }
+}
+
+/** read the name of the first video-capturing device at start up **/
+/** FaceAPI can only use this first one... **/
+void FaceTrackNoIR::GetCameraNameDX() {
+
+//// ui.widget->setCameraName("No video-capturing device was found in your system: check if it's connected!");
+
+ ui.cameraName->setText("No video-capturing device was found in your system: check if it's connected!");
+
+ // Create the System Device Enumerator.
+ HRESULT hr;
+ ICreateDevEnum *pSysDevEnum = NULL;
+ hr = CoCreateInstance(CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC_SERVER, IID_ICreateDevEnum, (void **)&pSysDevEnum);
+ if (FAILED(hr))
+ {
+ qDebug() << "GetWDM says: CoCreateInstance Failed!";
+ return;
+ }
+
+ qDebug() << "GetWDM says: CoCreateInstance succeeded!";
+
+ // Obtain a class enumerator for the video compressor category.
+ IEnumMoniker *pEnumCat = NULL;
+ hr = pSysDevEnum->CreateClassEnumerator(CLSID_VideoInputDeviceCategory, &pEnumCat, 0);
+
+ if (hr == S_OK) {
+ qDebug() << "GetWDM says: CreateClassEnumerator succeeded!";
+
+ // Enumerate the monikers.
+ IMoniker *pMoniker = NULL;
+ ULONG cFetched;
+ if (pEnumCat->Next(1, &pMoniker, &cFetched) == S_OK) {
+ IPropertyBag *pPropBag;
+ hr = pMoniker->BindToStorage(0, 0, IID_IPropertyBag, (void **)&pPropBag);
+ if (SUCCEEDED(hr)) {
+ // To retrieve the filter's friendly name, do the following:
+ VARIANT varName;
+ VariantInit(&varName);
+ hr = pPropBag->Read(L"FriendlyName", &varName, 0);
+ if (SUCCEEDED(hr))
+ {
+ // Display the name in your UI somehow.
+ QString str((QChar*)varName.bstrVal, wcslen(varName.bstrVal));
+ qDebug() << "GetWDM says: Moniker found:" << str;
+ ui.cameraName->setText(str);
+ }
+ VariantClear(&varName);
+
+ ////// To create an instance of the filter, do the following:
+ ////IBaseFilter *pFilter;
+ ////hr = pMoniker->BindToObject(NULL, NULL, IID_IBaseFilter,
+ //// (void**)&pFilter);
+ // Now add the filter to the graph.
+ //Remember to release pFilter later.
+ pPropBag->Release();
+ }
+ pMoniker->Release();
+ }
+ pEnumCat->Release();
+ }
+ pSysDevEnum->Release();
+
+}
+
+//
+// Open an INI-file with the QFileDialog
+// If succesfull, the settings in it will be read
+//
+void FaceTrackNoIR::open() {
+ QFileDialog::Options options;
+ QFileDialog::FileMode mode;
+
+ options |= QFileDialog::DontUseNativeDialog;
+ mode = QFileDialog::ExistingFile;
+ QString selectedFilter;
+ QStringList fileNames = QFileDialog::getOpenFileNames(
+ this,
+ tr("Select one FTNoir settings file"),
+ QCoreApplication::applicationDirPath() + "/Settings",
+ tr("Settings file (*.ini);;All Files (*)"));
+
+ //
+ // If a file was selected, save it's name and read it's contents.
+ //
+ if (! fileNames.isEmpty() ) {
+ QSettings settings("Abbequerque Inc.", "FaceTrackNoIR"); // Registry settings (in HK_USER)
+ settings.setValue ("SettingsFile", fileNames.at(0));
+ loadSettings();
+ }
+}
+
+//
+// Save the current Settings to the currently 'active' INI-file.
+//
+void FaceTrackNoIR::save() {
+
+ QSettings settings("Abbequerque Inc.", "FaceTrackNoIR"); // Registry settings (in HK_USER)
+
+ QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/Settings/default.ini" ).toString();
+ QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file)
+
+ iniFile.beginGroup ( "Tracking" );
+ iniFile.setValue ( "Smooth", ui.slideSmoothing->value() );
+ iniFile.setValue ( "invertYaw", ui.chkInvertYaw->isChecked() );
+ iniFile.setValue ( "invertPitch", ui.chkInvertPitch->isChecked() );
+ iniFile.setValue ( "invertRoll", ui.chkInvertRoll->isChecked() );
+ iniFile.setValue ( "invertX", ui.chkInvertX->isChecked() );
+ iniFile.setValue ( "invertY", ui.chkInvertY->isChecked() );
+ iniFile.setValue ( "invertZ", ui.chkInvertZ->isChecked() );
+ iniFile.endGroup ();
+
+ iniFile.beginGroup ( "GameProtocol" );
+ iniFile.setValue ( "Selection", ui.iconcomboProtocol->currentIndex() );
+ iniFile.setValue ( "DLL", getCurrentProtocolName() );
+ iniFile.endGroup ();
+
+ iniFile.beginGroup ( "TrackerSource" );
+ iniFile.setValue ( "Selection", ui.iconcomboTrackerSource->currentIndex() );
+ iniFile.setValue ( "DLL", getCurrentTrackerName() );
+ iniFile.setValue ( "2ndDLL", getSecondTrackerName() );
+ iniFile.endGroup ();
+
+ //
+ // Save the name of the filter in the INI-file.
+ //
+ iniFile.beginGroup ( "Filter" );
+ iniFile.setValue ( "DLL", getCurrentFilterName() );
+ iniFile.endGroup ();
+
+ settingsDirty = false;
+}
+
+//
+// Get the new name of the INI-file and save the settings to it.
+//
+// The user may choose to overwrite an existing file. This will be deleted, before copying the current file to it.
+//
+void FaceTrackNoIR::saveAs()
+{
+ //
+ // Get the current filename of the INI-file.
+ //
+ QSettings settings("Abbequerque Inc.", "FaceTrackNoIR"); // Registry settings (in HK_USER)
+ QString oldFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/Settings/default.ini" ).toString();
+
+ //
+ // Get the new filename of the INI-file.
+ //
+ QString fileName = QFileDialog::getSaveFileName(this, tr("Save file"),
+ oldFile,
+// QCoreApplication::applicationDirPath() + "/Settings",
+ tr("Settings file (*.ini);;All Files (*)"));
+ if (!fileName.isEmpty()) {
+
+ //
+ // Remove the file, if it already exists.
+ //
+ QFileInfo newFileInfo ( fileName );
+ if ((newFileInfo.exists()) && (oldFile != fileName)) {
+ QFile newFileFile ( fileName );
+ newFileFile.remove();
+ }
+
+ //
+ // Copy the current INI-file to the new name.
+ //
+ QFileInfo oldFileInfo ( oldFile );
+ if (oldFileInfo.exists()) {
+ QFile oldFileFile ( oldFile );
+ oldFileFile.copy( fileName );
+ }
+
+ //
+ // Write the new name to the Registry and save the other INI-values.
+ //
+ settings.setValue ("SettingsFile", fileName);
+ save();
+
+ //
+ // Reload the settings, to get the GUI right again...
+ //
+ loadSettings();
+ }
+}
+
+//
+// Load the current Settings from the currently 'active' INI-file.
+//
+void FaceTrackNoIR::loadSettings() {
+
+ qDebug() << "loadSettings says: Starting ";
+ QSettings settings("Abbequerque Inc.", "FaceTrackNoIR"); // Registry settings (in HK_USER)
+
+ QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/Settings/default.ini" ).toString();
+ QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file)
+
+ //
+ // Put the filename in the window-title.
+ //
+ QFileInfo pathInfo ( currentFile );
+ setWindowTitle ( "FaceTrackNoIR (1.7) - " + pathInfo.fileName() );
+
+ //
+ // Get a List of all the INI-files in the (currently active) Settings-folder.
+ //
+ QDir settingsDir( pathInfo.dir() );
+ QStringList filters;
+ filters << "*.ini";
+ iniFileList.clear();
+ iniFileList = settingsDir.entryList( filters, QDir::Files, QDir::Name );
+
+ //
+ // Add strings to the Listbox.
+ //
+ disconnect(ui.iconcomboProfile, SIGNAL(currentIndexChanged(int)), this, SLOT(profileSelected(int)));
+ ui.iconcomboProfile->clear();
+ for ( int i = 0; i < iniFileList.size(); i++) {
+ ui.iconcomboProfile->addItem(QIcon(":/images/Settings16.png"), iniFileList.at(i));
+ if (iniFileList.at(i) == pathInfo.fileName()) {
+ ui.iconcomboProfile->setItemIcon(i, QIcon(":/images/SettingsOpen16.png"));
+ ui.iconcomboProfile->setCurrentIndex( i );
+ }
+ }
+ connect(ui.iconcomboProfile, SIGNAL(currentIndexChanged(int)), this, SLOT(profileSelected(int)));
+
+ qDebug() << "loadSettings says: iniFile = " << currentFile;
+
+ iniFile.beginGroup ( "Tracking" );
+ ui.slideSmoothing->setValue (iniFile.value ( "Smooth", 10 ).toInt());
+ ui.chkInvertYaw->setChecked (iniFile.value ( "invertYaw", 0 ).toBool());
+ ui.chkInvertPitch->setChecked (iniFile.value ( "invertPitch", 0 ).toBool());
+ ui.chkInvertRoll->setChecked (iniFile.value ( "invertRoll", 0 ).toBool());
+ ui.chkInvertX->setChecked (iniFile.value ( "invertX", 0 ).toBool());
+ ui.chkInvertY->setChecked (iniFile.value ( "invertY", 0 ).toBool());
+ ui.chkInvertZ->setChecked (iniFile.value ( "invertZ", 0 ).toBool());
+ iniFile.endGroup ();
+
+ //
+ // Read the currently selected Protocol from the INI-file.
+ // If the setting "DLL" isn't found (pre-1.7 version of INI), then the setting 'Selection' is evaluated.
+ //
+ iniFile.beginGroup ( "GameProtocol" );
+
+ QString selectedProtocolName = iniFile.value ( "DLL", "" ).toString();
+ qDebug() << "loadSettings says: selectedProtocolName = " << selectedProtocolName;
+
+ if (selectedProtocolName.length() == 0) {
+ int index = iniFile.value ( "Selection", 0 ).toInt();
+ switch ( index ) {
+ case TRACKIR:
+ case FREE_TRACK:
+ selectedProtocolName = QString("FTNoIR_Protocol_FT.dll");
+ break;
+
+ case SIMCONNECT:
+ selectedProtocolName = QString("FTNoIR_Protocol_SC.dll");
+ break;
+
+ case PPJOY:
+ selectedProtocolName = QString("FTNoIR_Protocol_PPJOY.dll");
+ break;
+
+ case FSUIPC:
+ selectedProtocolName = QString("FTNoIR_Protocol_FSUIPC.dll");
+ break;
+
+ case FLIGHTGEAR:
+ selectedProtocolName = QString("FTNoIR_Protocol_FG.dll");
+ break;
+
+ case FTNOIR:
+ selectedProtocolName = QString("FTNoIR_Protocol_FTN.dll");
+ break;
+
+ case MOUSE:
+ selectedProtocolName = QString("FTNoIR_Protocol_MOUSE.dll");
+ break;
+
+ default:
+ selectedProtocolName = QString("FTNoIR_Protocol_MOUSE.dll");
+ break;
+ }
+ }
+ iniFile.endGroup ();
+
+ //
+ // Find the Index of the DLL and set the selection.
+ //
+ for ( int i = 0; i < protocolFileList.size(); i++) {
+ if (protocolFileList.at(i).compare( selectedProtocolName, Qt::CaseInsensitive ) == 0) {
+ ui.iconcomboProtocol->setCurrentIndex( i );
+ break;
+ }
+ }
+
+ //
+ // Read the currently selected Tracker from the INI-file.
+ // If the setting "DLL" isn't found (pre-1.7 version), then the setting 'Selection' is evaluated.
+ //
+ iniFile.beginGroup ( "TrackerSource" );
+ QString selectedTrackerName = iniFile.value ( "DLL", "" ).toString();
+ qDebug() << "loadSettings says: selectedTrackerName = " << selectedTrackerName;
+ if (selectedTrackerName.length() == 0) {
+ int index = iniFile.value ( "Selection", 0 ).toInt();
+ switch ( index ) {
+ case 0: // Face API
+ selectedTrackerName = "FTNoIR_Tracker_SM.dll";
+ break;
+ case 1: // FTNoir server
+ selectedTrackerName = "FTNoIR_Tracker_UDP.dll";
+ break;
+ default:
+ selectedTrackerName = "FTNoIR_Tracker_SM.dll";
+ break;
+ }
+ }
+ QString secondTrackerName = iniFile.value ( "2ndDLL", "None" ).toString();
+ qDebug() << "loadSettings says: secondTrackerName = " << secondTrackerName;
+
+ iniFile.endGroup ();
+
+ disconnect(ui.iconcomboTrackerSource, SIGNAL(currentIndexChanged(int)), this, SLOT(trackingSourceSelected(int)));
+ disconnect(ui.cbxSecondTrackerSource, SIGNAL(currentIndexChanged(int)), this, SLOT(trackingSourceSelected(int)));
+ for ( int i = 0; i < trackerFileList.size(); i++) {
+ if (trackerFileList.at(i).compare( selectedTrackerName, Qt::CaseInsensitive ) == 0) {
+ ui.iconcomboTrackerSource->setCurrentIndex( i );
+ }
+ if (trackerFileList.at(i).compare( secondTrackerName, Qt::CaseInsensitive ) == 0) {
+ ui.cbxSecondTrackerSource->setCurrentIndex( i + 1 ); // The first value = "None", so add 1
+ }
+ }
+ connect(ui.iconcomboTrackerSource, SIGNAL(currentIndexChanged(int)), this, SLOT(trackingSourceSelected(int)));
+ connect(ui.cbxSecondTrackerSource, SIGNAL(currentIndexChanged(int)), this, SLOT(trackingSourceSelected(int)));
+
+ //
+ // Read the currently selected Filter from the INI-file.
+ //
+ iniFile.beginGroup ( "Filter" );
+ QString selectedFilterName = iniFile.value ( "DLL", "FTNoIR_Filter_EWMA2.dll" ).toString();
+ qDebug() << "createIconGroupBox says: selectedFilterName = " << selectedFilterName;
+ iniFile.endGroup ();
+
+ //
+ // Find the Index of the DLL and set the selection.
+ //
+ for ( int i = 0; i < filterFileList.size(); i++) {
+ if (filterFileList.at(i).compare( selectedFilterName, Qt::CaseInsensitive ) == 0) {
+ ui.iconcomboFilter->setCurrentIndex( i + 1 ); // The first value = "None", so add 1
+ break;
+ }
+ }
+
+ settingsDirty = false;
+}
+
+/** show support page in web-browser **/
+void FaceTrackNoIR::openurl_support() {
+ QDesktopServices::openUrl(QUrl("http://facetracknoir.sourceforge.net/manual/manual.htm", QUrl::TolerantMode));
+}
+
+/** show donations page in web-browser **/
+void FaceTrackNoIR::openurl_donation() {
+ QDesktopServices::openUrl(QUrl("http://facetracknoir.sourceforge.net/information_links/donate.htm", QUrl::TolerantMode));
+}
+
+
+/** show about dialog **/
+void FaceTrackNoIR::about() {
+
+ QPoint offsetpos(100, 100);
+ aboutDialog.move(this->pos() + offsetpos);
+ aboutDialog.show();
+
+ /** ABOUT DIALOG **/
+ aboutDialog.setBaseSize(270, 440);
+
+ aboutDialog.setMaximumWidth(270);
+ aboutDialog.setMaximumHeight(440);
+
+ aboutDialog.setMinimumWidth(270);
+ aboutDialog.setMinimumHeight(440);
+ aboutDialog.setStyleSheet("background:#fff url(:/UIElements/aboutFaceTrackNoIR.png) no-repeat;");
+}
+
+/** start tracking the face **/
+void FaceTrackNoIR::startTracker( ) {
+
+ //
+ // Disable buttons
+ //
+ ui.iconcomboProfile->setEnabled ( false );
+ ui.btnLoad->setEnabled ( false );
+ ui.btnSave->setEnabled ( false );
+ ui.btnSaveAs->setEnabled ( false );
+ ui.btnShowFilterControls->setEnabled ( false );
+
+ //
+ // Create the Tracker and setup
+ //
+ tracker = new Tracker ( this );
+
+ //
+ // Setup the Tracker and send the settings.
+ // This is necessary, because the events are only triggered 'on change'
+ //
+ tracker->setup();
+ tracker->setSmoothing ( ui.slideSmoothing->value() );
+ tracker->setInvertYaw (ui.chkInvertYaw->isChecked() );
+ tracker->setInvertPitch (ui.chkInvertPitch->isChecked() );
+ tracker->setInvertRoll (ui.chkInvertRoll->isChecked() );
+ tracker->setInvertX (ui.chkInvertX->isChecked() );
+ tracker->setInvertY (ui.chkInvertY->isChecked() );
+ tracker->setInvertZ (ui.chkInvertZ->isChecked() );
+
+ tracker->start( QThread::TimeCriticalPriority );
+
+ //
+ // Register the Tracker instance with the Tracker Dialog (if open)
+ //
+ if (pTrackerDialog) {
+ pTrackerDialog->registerTracker( tracker->getTrackerPtr() );
+ }
+
+ ui.headPoseWidget->show();
+
+ //
+ ui.btnStartTracker->setEnabled ( false );
+ ui.btnStopTracker->setEnabled ( true );
+
+ // Enable/disable Protocol-server Settings
+ ui.iconcomboTrackerSource->setEnabled ( false );
+ ui.cbxSecondTrackerSource->setEnabled ( false );
+ ui.iconcomboProtocol->setEnabled ( false );
+// ui.btnShowServerControls->setEnabled ( false );
+ ui.iconcomboFilter->setEnabled ( false );
+
+ //
+ // Update the camera-name, FaceAPI can only use the 1st one found!
+ //
+ GetCameraNameDX();
+
+
+ //
+ // Get the TimeOut value for minimizing FaceTrackNoIR
+ // Only start the Timer if value > 0
+ //
+ QSettings settings("Abbequerque Inc.", "FaceTrackNoIR"); // Registry settings (in HK_USER)
+ int timevalue = settings.value ( "AutoMinimizeTime", 0 ).toInt() * 1000;
+ if (timevalue > 0) {
+
+ bool minimizeTaskBar = settings.value ( "MinimizeTaskBar", 1 ).toBool();
+ if (minimizeTaskBar) {
+ connect(timMinimizeFTN, SIGNAL(timeout()), this, SLOT(showMinimized()));
+ }
+ else {
+ connect(timMinimizeFTN, SIGNAL(timeout()), this, SLOT(hide()));
+ }
+
+ timMinimizeFTN->setSingleShot( true );
+ timMinimizeFTN->start(timevalue);
+ }
+
+ //
+ // Start the timer to update the head-pose (digits and 'man in black')
+ //
+ timUpdateHeadPose->start(50);
+
+ ui.lblX->setVisible(true);
+ ui.lblY->setVisible(true);
+ ui.lblZ->setVisible(true);
+ ui.lblRotX->setVisible(true);
+ ui.lblRotY->setVisible(true);
+ ui.lblRotZ->setVisible(true);
+
+ ui.lcdNumOutputPosX->setVisible(true);
+ ui.lcdNumOutputPosY->setVisible(true);
+ ui.lcdNumOutputPosZ->setVisible(true);
+ ui.lcdNumOutputRotX->setVisible(true);
+ ui.lcdNumOutputRotY->setVisible(true);
+ ui.lcdNumOutputRotZ->setVisible(true);
+}
+
+/** stop tracking the face **/
+void FaceTrackNoIR::stopTracker( ) {
+
+ //
+ // Stop displaying the head-pose.
+ //
+ timUpdateHeadPose->stop();
+ _pose_display->rotateBy(0, 0, 0);
+
+
+ ui.lblX->setVisible(false);
+ ui.lblY->setVisible(false);
+ ui.lblZ->setVisible(false);
+ ui.lblRotX->setVisible(false);
+ ui.lblRotY->setVisible(false);
+ ui.lblRotZ->setVisible(false);
+
+ ui.lcdNumOutputPosX->setVisible(false);
+ ui.lcdNumOutputPosY->setVisible(false);
+ ui.lcdNumOutputPosZ->setVisible(false);
+ ui.lcdNumOutputRotX->setVisible(false);
+ ui.lcdNumOutputRotY->setVisible(false);
+ ui.lcdNumOutputRotZ->setVisible(false);
+ ui.txtTracking->setVisible(false);
+ ui.txtAxisReverse->setVisible(false);
+
+ //
+ // UnRegister the Tracker instance with the Tracker Dialog (if open)
+ //
+ if (pTrackerDialog) {
+ pTrackerDialog->unRegisterTracker();
+ }
+ if (pProtocolDialog) {
+ pProtocolDialog->unRegisterProtocol();
+ }
+
+ //
+ // Delete the tracker (after stopping things and all).
+ //
+ if ( tracker ) {
+ qDebug() << "stopTracker says: Deleting tracker!";
+ delete tracker;
+ qDebug() << "stopTracker says: Tracker deleted!";
+ tracker = 0;
+ }
+ ui.btnStartTracker->setEnabled ( true );
+ ui.btnStopTracker->setEnabled ( false );
+// ui.btnShowEngineControls->setEnabled ( false );
+ ui.iconcomboProtocol->setEnabled ( true );
+ ui.iconcomboTrackerSource->setEnabled ( true );
+ ui.cbxSecondTrackerSource->setEnabled ( true );
+ ui.iconcomboFilter->setEnabled ( true );
+
+ // Enable/disable Protocol-server Settings
+ ui.btnShowServerControls->setEnabled ( true );
+ ui.video_frame->hide();
+
+ //
+ ui.iconcomboProfile->setEnabled ( true );
+ ui.btnLoad->setEnabled ( true );
+ ui.btnSave->setEnabled ( true );
+ ui.btnSaveAs->setEnabled ( true );
+ ui.btnShowFilterControls->setEnabled ( true );
+
+ //
+ // Stop the timer, so it won't go off again...
+ //
+ timMinimizeFTN->stop();
+
+}
+
+/** set the invert from the checkbox **/
+void FaceTrackNoIR::setInvertYaw( int invert ) {
+ Tracker::setInvertYaw ( (invert != 0)?true:false );
+ settingsDirty = true;
+}
+
+/** set the invert from the checkbox **/
+void FaceTrackNoIR::setInvertPitch( int invert ) {
+ Tracker::setInvertPitch ( (invert != 0)?true:false );
+ settingsDirty = true;
+}
+
+/** set the invert from the checkbox **/
+void FaceTrackNoIR::setInvertRoll( int invert ) {
+ Tracker::setInvertRoll ( (invert != 0)?true:false );
+ settingsDirty = true;
+}
+
+/** set the invert from the checkbox **/
+void FaceTrackNoIR::setInvertX( int invert ) {
+ Tracker::setInvertX ( (invert != 0)?true:false );
+ settingsDirty = true;
+}
+
+/** set the invert from the checkbox **/
+void FaceTrackNoIR::setInvertY( int invert ) {
+ Tracker::setInvertY ( (invert != 0)?true:false );
+ settingsDirty = true;
+}
+
+/** set the invert from the checkbox **/
+void FaceTrackNoIR::setInvertZ( int invert ) {
+ Tracker::setInvertZ ( (invert != 0)?true:false );
+ settingsDirty = true;
+}
+
+/** Show the headpose in the widget (triggered by timer) **/
+void FaceTrackNoIR::showHeadPose() {
+THeadPoseData newdata;
+
+ ui.lblX->setVisible(true);
+ ui.lblY->setVisible(true);
+ ui.lblZ->setVisible(true);
+ ui.lblRotX->setVisible(true);
+ ui.lblRotY->setVisible(true);
+ ui.lblRotZ->setVisible(true);
+
+ ui.lcdNumOutputPosX->setVisible(true);
+ ui.lcdNumOutputPosY->setVisible(true);
+ ui.lcdNumOutputPosZ->setVisible(true);
+ ui.lcdNumOutputRotX->setVisible(true);
+ ui.lcdNumOutputRotY->setVisible(true);
+ ui.lcdNumOutputRotZ->setVisible(true);
+
+ if (!isMinimized()) {
+
+ //
+ // 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.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));
+
+ ui.txtTracking->setVisible(Tracker::getTrackingActive());
+ ui.txtAxisReverse->setVisible(Tracker::getAxisReverse());
+
+ //
+ // Get the output-pose and also display it.
+ //
+ if (_pose_display) {
+ Tracker::getOutputHeadPose(&newdata);
+ _pose_display->rotateBy(newdata.pitch, newdata.yaw, newdata.roll);
+
+ 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));
+
+ 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));
+ }
+
+ //
+ // 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 **/
+void FaceTrackNoIR::setSmoothing( int smooth ) {
+
+ //
+ // Pass the smoothing setting, if the Tracker exists.
+ //
+ if ( tracker ) {
+ tracker->setSmoothing ( smooth );
+ settingsDirty = true;
+ }
+}
+
+
+/** toggles Video Widget **/
+void FaceTrackNoIR::showVideoWidget() {
+ if(ui.video_frame->isHidden())
+ ui.video_frame->show();
+ else
+ ui.video_frame->hide();
+}
+
+/** toggles Video Widget **/
+void FaceTrackNoIR::showHeadPoseWidget() {
+ if(ui.headPoseWidget->isHidden())
+ ui.headPoseWidget->show();
+ else
+ ui.headPoseWidget->hide();
+}
+
+/** toggles Engine Controls Dialog **/
+void FaceTrackNoIR::showTrackerSettings() {
+importGetTrackerDialog getIT;
+QLibrary *trackerLib;
+QString libName;
+
+ qDebug() << "FaceTrackNoIR::showTrackerSettings started.";
+
+ //
+ // Delete the existing QDialog
+ //
+ if (pTrackerDialog) {
+ delete pTrackerDialog;
+ pTrackerDialog = NULL;
+ }
+
+ // Show the appropriate Tracker Settings
+ libName.clear();
+ libName = getCurrentTrackerName();
+
+ //
+ // Load the Server-settings dialog (if any) and show it.
+ //
+ if (!libName.isEmpty()) {
+ trackerLib = new QLibrary(libName);
+
+// qDebug() << "FaceTrackNoIR::showTrackerSettings Loaded trackerLib." << trackerLib;
+
+ getIT = (importGetTrackerDialog) trackerLib->resolve("GetTrackerDialog");
+
+// qDebug() << "FaceTrackNoIR::showTrackerSettings resolved." << getIT;
+
+ if (getIT) {
+ ITrackerDialog *ptrXyz(getIT());
+ if (ptrXyz)
+ {
+ pTrackerDialog = ptrXyz;
+ pTrackerDialog->Initialize( this );
+// qDebug() << "FaceTrackNoIR::showTrackerSettings GetTrackerDialog Function Resolved!";
+ if (tracker) {
+ pTrackerDialog->registerTracker( tracker->getTrackerPtr() );
+// qDebug() << "FaceTrackNoIR::showTrackerSettings RegisterTracker Function Executed";
+ }
+ }
+ }
+ else {
+ QMessageBox::warning(0,"FaceTrackNoIR Error", "DLL not loaded",QMessageBox::Ok,QMessageBox::NoButton);
+ }
+ }
+
+}
+
+// Show the Settings dialog for the secondary Tracker
+void FaceTrackNoIR::showSecondTrackerSettings() {
+importGetTrackerDialog getIT;
+QLibrary *trackerLib;
+QString libName;
+
+ qDebug() << "FaceTrackNoIR::showSecondTrackerSettings started.";
+
+ //
+ // Delete the existing QDialog
+ //
+ if (pSecondTrackerDialog) {
+ delete pSecondTrackerDialog;
+ pSecondTrackerDialog = NULL;
+ }
+
+ // Show the appropriate Tracker Settings
+ libName.clear();
+ libName = getSecondTrackerName();
+
+ //
+ // Load the Server-settings dialog (if any) and show it.
+ //
+ if ((!libName.isEmpty()) && (libName != "None")) {
+ trackerLib = new QLibrary(libName);
+
+// qDebug() << "FaceTrackNoIR::showTrackerSettings Loaded trackerLib." << trackerLib;
+
+ getIT = (importGetTrackerDialog) trackerLib->resolve("GetTrackerDialog");
+
+// qDebug() << "FaceTrackNoIR::showTrackerSettings resolved." << getIT;
+
+ if (getIT) {
+ ITrackerDialog *ptrXyz(getIT());
+ if (ptrXyz)
+ {
+ pSecondTrackerDialog = ptrXyz;
+ pSecondTrackerDialog->Initialize( this );
+// qDebug() << "FaceTrackNoIR::showTrackerSettings GetTrackerDialog Function Resolved!";
+ if (tracker) {
+ pSecondTrackerDialog->registerTracker( tracker->getSecondTrackerPtr() );
+// qDebug() << "FaceTrackNoIR::showTrackerSettings RegisterTracker Function Executed";
+ }
+ }
+ }
+ else {
+ QMessageBox::warning(0,"FaceTrackNoIR Error", "DLL not loaded",QMessageBox::Ok,QMessageBox::NoButton);
+ }
+ }
+
+}
+
+/** toggles Server Controls Dialog **/
+void FaceTrackNoIR::showServerControls() {
+importGetProtocolDialog getIT;
+QLibrary *protocolLib;
+QString libName;
+
+ //
+ // Delete the existing QDialog
+ //
+ if (pProtocolDialog) {
+ delete pProtocolDialog;
+ }
+
+ // Show the appropriate Protocol-server Settings
+ libName.clear();
+ libName = getCurrentProtocolName();
+
+ //
+ // Load the Server-settings dialog (if any) and show it.
+ //
+ if (!libName.isEmpty()) {
+ protocolLib = new QLibrary(libName);
+
+ getIT = (importGetProtocolDialog) protocolLib->resolve("GetProtocolDialog");
+ if (getIT) {
+ IProtocolDialogPtr ptrXyz(getIT());
+ if (ptrXyz)
+ {
+ pProtocolDialog = ptrXyz;
+ pProtocolDialog->Initialize( this );
+ if (tracker) {
+ pProtocolDialog->registerProtocol( tracker->getProtocolPtr() );
+ qDebug() << "FaceTrackNoIR::showServerControls RegisterProtocol Function Executed";
+ }
+ qDebug() << "FaceTrackNoIR::showServerControls GetProtocolDialog Function Resolved!";
+ }
+ else {
+ qDebug() << "FaceTrackNoIR::showServerControls Function NOT Resolved!";
+ }
+ }
+ else {
+ QMessageBox::warning(0,"FaceTrackNoIR Error", "DLL not loaded",QMessageBox::Ok,QMessageBox::NoButton);
+ }
+ }
+}
+
+/** toggles Filter Controls Dialog **/
+void FaceTrackNoIR::showFilterControls() {
+importGetFilterDialog getIT;
+QLibrary *filterLib;
+QString libName;
+
+ //
+ // Delete the existing QDialog
+ //
+ if (pFilterDialog) {
+ delete pFilterDialog;
+ pFilterDialog = NULL;
+ }
+
+ // Get the currently selected Filter
+ libName.clear();
+ libName = getCurrentFilterName();
+
+ //
+ // Load the Filter-settings dialog (if any) and show it.
+ //
+ if (!libName.isEmpty()) {
+ filterLib = new QLibrary(libName);
+
+ getIT = (importGetFilterDialog) filterLib->resolve("GetFilterDialog");
+ if (getIT) {
+ IFilterDialogPtr ptrXyz(getIT());
+ if (ptrXyz)
+ {
+ pFilterDialog = ptrXyz;
+ pFilterDialog->Initialize( this, Tracker::getFilterPtr() );
+ qDebug() << "FaceTrackNoIR::showFilterControls GetFilterDialog Function Resolved!";
+ }
+ else {
+ qDebug() << "FaceTrackNoIR::showFilterControls Function NOT Resolved!";
+ }
+ }
+ else {
+ QMessageBox::warning(0,"FaceTrackNoIR Error", "DLL not loaded",QMessageBox::Ok,QMessageBox::NoButton);
+ }
+ }
+}
+
+/** toggles FaceTrackNoIR Preferences Dialog **/
+void FaceTrackNoIR::showPreferences() {
+
+ // Create if new
+ if (!_preferences)
+ {
+ _preferences = new PreferencesDialog( this, this, Qt::Dialog );
+ }
+
+ // Show if already created
+ if (_preferences) {
+ _preferences->show();
+ _preferences->raise();
+ }
+}
+
+/** toggles Keyboard Shortcut Dialog **/
+void FaceTrackNoIR::showKeyboardShortcuts() {
+
+ // Create if new
+ if (!_keyboard_shortcuts)
+ {
+ _keyboard_shortcuts = new KeyboardShortcutDialog( this, this, Qt::Dialog );
+ }
+
+ // Show if already created
+ if (_keyboard_shortcuts) {
+ _keyboard_shortcuts->show();
+ _keyboard_shortcuts->raise();
+ }
+}
+
+/** toggles Curve Configuration Dialog **/
+void FaceTrackNoIR::showCurveConfiguration() {
+
+ // Create if new
+ if (!_curve_config)
+ {
+ _curve_config = new CurveConfigurationDialog( this, this, Qt::Dialog );
+ }
+
+ // Show if already created
+ if (_curve_config) {
+ _curve_config->show();
+ _curve_config->raise();
+ }
+}
+
+/** exit application **/
+void FaceTrackNoIR::exit() {
+ QCoreApplication::exit(0);
+}
+
+//
+// Setup the icons for the comboBoxes
+//
+void FaceTrackNoIR::createIconGroupBox()
+{
+importGetProtocolDll getProtocol;
+IProtocolDllPtr pProtocolDll; // Pointer to Protocol info instance (in DLL)
+importGetFilterDll getFilter;
+IFilterDllPtr pFilterDll; // Pointer to Filter info instance (in DLL)
+importGetTrackerDll getTracker;
+ITrackerDll *pTrackerDll; // Pointer to Tracker info instance (in DLL)
+QStringList listDLLs; // List of specific DLLs
+
+ QSettings settings("Abbequerque Inc.", "FaceTrackNoIR"); // Registry settings (in HK_USER)
+
+ QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/Settings/default.ini" ).toString();
+ QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file)
+
+ //
+ // Get a List of all the Protocol-DLL-files in the Program-folder.
+ //
+ QDir settingsDir( QCoreApplication::applicationDirPath() );
+ QStringList filters;
+ filters.clear();
+ filters << "FTNoIR_Protocol_*.dll";
+ protocolFileList.clear();
+ listDLLs.clear();
+ listDLLs = settingsDir.entryList( filters, QDir::Files, QDir::Name );
+
+ //
+ // Add strings to the Listbox.
+ //
+ disconnect(ui.iconcomboProtocol, SIGNAL(currentIndexChanged(int)), this, SLOT(protocolSelected(int)));
+ ui.iconcomboProtocol->clear();
+ for ( int i = 0; i < listDLLs.size(); i++) {
+
+ // Try to load the DLL and get the Icon and Name
+ QLibrary *protocolLib = new QLibrary(listDLLs.at(i));
+ QString *protocolName = new QString("");
+ QIcon *protocolIcon = new QIcon();
+
+ getProtocol = (importGetProtocolDll) protocolLib->resolve("GetProtocolDll");
+ if (getProtocol) {
+ IProtocolDllPtr ptrXyz(getProtocol());
+ if (ptrXyz)
+ {
+ pProtocolDll = ptrXyz;
+ pProtocolDll->getFullName( protocolName );
+ pProtocolDll->getIcon( protocolIcon );
+
+ //
+ // Add the Icon and the Name to the Listbox and update the fileList
+ //
+ ui.iconcomboProtocol->addItem(*protocolIcon, *protocolName );
+ protocolFileList.append(listDLLs.at(i));
+ }
+ }
+ else {
+ QMessageBox::warning(0,"FaceTrackNoIR Error", "Protocol-DLL not loaded, please check if the DLL is version 1.7 \nand all dependencies are installed. \n(" + listDLLs.at(i) + ")",QMessageBox::Ok,QMessageBox::NoButton);
+ }
+
+ }
+ connect(ui.iconcomboProtocol, SIGNAL(currentIndexChanged(int)), this, SLOT(protocolSelected(int)));
+
+ //
+ // Get a List of all the Filter-DLL-files in the Program-folder.
+ //
+ filters.clear();
+ filters << "FTNoIR_Filter_*.dll";
+ filterFileList.clear();
+ listDLLs.clear();
+ listDLLs = settingsDir.entryList( filters, QDir::Files, QDir::Name );
+
+ //
+ // Add strings to the Listbox.
+ //
+ disconnect(ui.iconcomboFilter, SIGNAL(currentIndexChanged(int)), this, SLOT(filterSelected(int)));
+ ui.iconcomboFilter->clear();
+ ui.iconcomboFilter->addItem("None");
+
+ for ( int i = 0; i < listDLLs.size(); i++) {
+
+ // Try to load the DLL and get the Icon and Name
+ QLibrary *filterLib = new QLibrary(listDLLs.at(i));
+ QString *filterName = new QString("");
+ QIcon *filterIcon = new QIcon();
+
+ getFilter = (importGetFilterDll) filterLib->resolve("GetFilterDll");
+ if (getFilter) {
+ IFilterDllPtr ptrXyz(getFilter());
+ if (ptrXyz)
+ {
+ pFilterDll = ptrXyz;
+ pFilterDll->getFullName( filterName );
+ pFilterDll->getIcon( filterIcon );
+
+ //
+ // Add the Icon and the Name to the Listbox and update the fileList
+ //
+ ui.iconcomboFilter->addItem(*filterIcon, *filterName );
+ filterFileList.append(listDLLs.at(i));
+ }
+ }
+ else {
+ QMessageBox::warning(0,"FaceTrackNoIR Error", "Filter-DLL not loaded, please check if the DLL is version 1.7 \nand all dependencies are installed. \n(" + listDLLs.at(i) + ")",QMessageBox::Ok,QMessageBox::NoButton);
+ }
+
+ }
+ connect(ui.iconcomboFilter, SIGNAL(currentIndexChanged(int)), this, SLOT(filterSelected(int)));
+
+ //
+ // Get a List of all the Tracker-DLL-files in the Program-folder.
+ //
+ filters.clear();
+ filters << "FTNoIR_Tracker_*.dll";
+ trackerFileList.clear();
+ listDLLs.clear();
+ listDLLs = settingsDir.entryList( filters, QDir::Files, QDir::Name );
+
+ //
+ // Add strings to the Listbox(es).
+ //
+ disconnect(ui.iconcomboTrackerSource, SIGNAL(currentIndexChanged(int)), this, SLOT(trackingSourceSelected(int)));
+ ui.iconcomboTrackerSource->clear();
+
+ disconnect(ui.cbxSecondTrackerSource, SIGNAL(currentIndexChanged(int)), this, SLOT(trackingSourceSelected(int)));
+ ui.cbxSecondTrackerSource->clear();
+ ui.cbxSecondTrackerSource->addItem("None");
+
+ for ( int i = 0; i < listDLLs.size(); i++) {
+
+ // Try to load the DLL and get the Icon and Name
+ QLibrary *trackerLib = new QLibrary(listDLLs.at(i));
+ QString *trackerName = new QString("");
+ QIcon *trackerIcon = new QIcon();
+
+ getTracker = (importGetTrackerDll) trackerLib->resolve("GetTrackerDll");
+ if (getTracker) {
+ ITrackerDll *ptrXyz(getTracker());
+ if (ptrXyz)
+ {
+ pTrackerDll = ptrXyz;
+ pTrackerDll->getFullName( trackerName );
+ pTrackerDll->getIcon( trackerIcon );
+
+ //
+ // Add the Icon and the Name to the Listbox and update the fileList
+ //
+ ui.iconcomboTrackerSource->addItem(*trackerIcon, *trackerName );
+ ui.cbxSecondTrackerSource->addItem(*trackerIcon, *trackerName );
+ trackerFileList.append(listDLLs.at(i));
+ }
+ }
+ else {
+ QMessageBox::warning(0,"FaceTrackNoIR Error", "Tracker-DLL not loaded, please check if the DLL is version 1.7 \nand all dependencies are installed. \n(" + listDLLs.at(i) + ")",QMessageBox::Ok,QMessageBox::NoButton);
+ }
+
+ }
+ connect(ui.iconcomboTrackerSource, SIGNAL(currentIndexChanged(int)), this, SLOT(trackingSourceSelected(int)));
+ connect(ui.cbxSecondTrackerSource, SIGNAL(currentIndexChanged(int)), this, SLOT(trackingSourceSelected(int)));
+}
+
+//
+// Create the Actions in the System tray and connect them to Application events
+//
+void FaceTrackNoIR::createActions()
+{
+ minimizeAction = new QAction(tr("Mi&nimize FaceTrackNoIR"), this);
+ connect(minimizeAction, SIGNAL(triggered()), this, SLOT(hide()));
+
+ //maximizeAction = new QAction(tr("Ma&ximize"), this);
+ //connect(maximizeAction, SIGNAL(triggered()), this, SLOT(showMaximized()));
+
+ restoreAction = new QAction(tr("&Restore FaceTrackNoIR"), this);
+ connect(restoreAction, SIGNAL(triggered()), this, SLOT(showNormal()));
+
+ quitAction = new QAction(tr("&Quit FaceTrackNoIR"), this);
+ connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
+}
+
+//
+// Create the SystemTray and set the default Icon
+//
+void FaceTrackNoIR::createTrayIcon()
+{
+ if (QSystemTrayIcon::isSystemTrayAvailable()) {
+ trayIconMenu = new QMenu(this);
+ trayIconMenu->addAction(minimizeAction);
+ trayIconMenu->addAction(restoreAction);
+ trayIconMenu->addSeparator();
+ trayIconMenu->addAction(quitAction);
+
+ trayIcon = new QSystemTrayIcon(this);
+ trayIcon->setContextMenu(trayIconMenu);
+
+ trayIcon->setIcon(QIcon(QCoreApplication::applicationDirPath() + "/images/FaceTrackNoIR.ico"));
+ }
+}
+
+//
+// Handle SystemTray events
+//
+void FaceTrackNoIR::iconActivated(QSystemTrayIcon::ActivationReason reason)
+{
+ switch (reason) {
+ case QSystemTrayIcon::Trigger:
+ case QSystemTrayIcon::DoubleClick:
+ //ui.iconcomboProtocol->setCurrentIndex((ui.iconcomboProtocol->currentIndex() + 1)
+ // % ui.iconcomboProtocol->count());
+ break;
+ ////case QSystemTrayIcon::MiddleClick:
+ //// showMessage();
+ //// break;
+ default:
+ ;
+ }
+ }
+
+//
+// Handle changes of the Protocol selection
+//
+void FaceTrackNoIR::protocolSelected(int index)
+{
+ settingsDirty = true;
+ ui.btnShowServerControls->setEnabled ( true );
+
+ //
+ // Set the Icon for the tray and update the Icon for the Settings button.
+ //
+ QIcon icon = ui.iconcomboProtocol->itemIcon(index);
+ if (trayIcon != 0) {
+ trayIcon->setIcon(icon);
+ trayIcon->setToolTip(ui.iconcomboProtocol->itemText(index));
+ trayIcon->show();
+ trayIcon->showMessage( "FaceTrackNoIR", ui.iconcomboProtocol->itemText(index));
+ }
+ setWindowIcon(QIcon(":/images/FaceTrackNoIR.ico"));
+ ui.btnShowServerControls->setIcon(icon);
+}
+
+//
+// Handle changes of the Tracking Source selection
+//
+void FaceTrackNoIR::trackingSourceSelected(int index)
+{
+ settingsDirty = true;
+ ui.btnShowEngineControls->setEnabled ( true );
+}
+
+//
+// Handle changes of the Profile selection
+//
+void FaceTrackNoIR::profileSelected(int index)
+{
+ //
+ // Read the current INI-file setting, to get the folder in which it's located...
+ //
+ QSettings settings("Abbequerque Inc.", "FaceTrackNoIR"); // Registry settings (in HK_USER)
+ QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/Settings/default.ini" ).toString();
+ QFileInfo pathInfo ( currentFile );
+
+ //
+ // Save the name of the INI-file in the Registry.
+ //
+ settings.setValue ("SettingsFile", pathInfo.absolutePath() + "/" + iniFileList.at(ui.iconcomboProfile->currentIndex()));
+ loadSettings();
+}
+
+//
+// Handle changes of the Filter selection
+//
+void FaceTrackNoIR::filterSelected(int index)
+{
+ settingsDirty = true;
+
+ //QSettings settings("Abbequerque Inc.", "FaceTrackNoIR"); // Registry settings (in HK_USER)
+
+ //QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/Settings/default.ini" ).toString();
+ //QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file)
+
+ ui.btnShowFilterControls->setEnabled ( true );
+}
+
+//
+// Constructor for FaceTrackNoIR=Preferences-dialog
+//
+PreferencesDialog::PreferencesDialog( FaceTrackNoIR *ftnoir, QWidget *parent, Qt::WindowFlags f ) :
+QWidget( parent , f)
+{
+ ui.setupUi( this );
+
+ QPoint offsetpos(100, 100);
+ this->move(parent->pos() + offsetpos);
+
+ mainApp = ftnoir; // Preserve a pointer to FTNoIR
+
+ // Connect Qt signals to member-functions
+ connect(ui.btnOK, SIGNAL(clicked()), this, SLOT(doOK()));
+ connect(ui.btnCancel, SIGNAL(clicked()), this, SLOT(doCancel()));
+
+ connect(ui.spinAutoMinimizeTime, SIGNAL(valueChanged(int)), this, SLOT(keyChanged(int)));
+ connect(ui.chkAutoStartTracking, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int)));
+ connect(ui.radioMinimize, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int)));
+
+ // Load the settings from the current .INI-file
+ loadSettings();
+}
+
+//
+// Destructor for server-dialog
+//
+PreferencesDialog::~PreferencesDialog() {
+ qDebug() << "~PreferencesDialog() says: started";
+}
+
+//
+// OK clicked on server-dialog
+//
+void PreferencesDialog::doOK() {
+ save();
+ this->close();
+}
+
+// override show event
+void PreferencesDialog::showEvent ( QShowEvent * event ) {
+ loadSettings();
+}
+
+//
+// Cancel clicked on server-dialog
+//
+void PreferencesDialog::doCancel() {
+ //
+ // Ask if changed Settings should be saved
+ //
+ if (settingsDirty) {
+ int ret = QMessageBox::question ( this, "Settings have changed", "Do you want to save the settings?", QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel, QMessageBox::Discard );
+
+ qDebug() << "doCancel says: answer =" << ret;
+
+ switch (ret) {
+ case QMessageBox::Save:
+ save();
+ this->close();
+ break;
+ case QMessageBox::Discard:
+ this->close();
+ break;
+ case QMessageBox::Cancel:
+ // Cancel was clicked
+ break;
+ default:
+ // should never be reached
+ break;
+ }
+ }
+ else {
+ this->close();
+ }
+}
+
+//
+// Load the current Settings from the currently 'active' INI-file.
+//
+void PreferencesDialog::loadSettings() {
+
+ QSettings settings("Abbequerque Inc.", "FaceTrackNoIR"); // Registry settings (in HK_USER)
+ ui.spinAutoMinimizeTime->setValue( settings.value ( "AutoMinimizeTime", 0 ).toInt() );
+ ui.chkAutoStartTracking->setChecked( settings.value ( "AutoStartTracking", 0 ).toBool() );
+ ui.radioMinimize->setChecked( settings.value ( "MinimizeTaskBar", 1 ).toBool() );
+
+ settingsDirty = false;
+
+}
+
+//
+// Save the current Settings to the currently 'active' INI-file.
+//
+void PreferencesDialog::save() {
+
+ QSettings settings("Abbequerque Inc.", "FaceTrackNoIR"); // Registry settings (in HK_USER)
+ settings.setValue( "AutoMinimizeTime", ui.spinAutoMinimizeTime->value() );
+ settings.setValue( "AutoStartTracking", ui.chkAutoStartTracking->isChecked() );
+ settings.setValue( "MinimizeTaskBar", ui.radioMinimize->isChecked() );
+
+ //
+ // Send a message to the main program, to update the Settings (for the tracker)
+ //
+ mainApp->updateSettings();
+
+ settingsDirty = false;
+}
+
+//**************************************************************************************************//
+//**************************************************************************************************//
+//
+// Constructor for Keyboard-shortcuts-dialog
+//
+KeyboardShortcutDialog::KeyboardShortcutDialog( FaceTrackNoIR *ftnoir, QWidget *parent, Qt::WindowFlags f ) :
+QWidget( parent , f)
+{
+ ui.setupUi( this );
+
+ QPoint offsetpos(100, 100);
+ this->move(parent->pos() + offsetpos);
+
+ mainApp = ftnoir; // Preserve a pointer to FTNoIR
+
+ // Connect Qt signals to member-functions
+ connect(ui.btnOK, SIGNAL(clicked()), this, SLOT(doOK()));
+ connect(ui.btnCancel, SIGNAL(clicked()), this, SLOT(doCancel()));
+
+ connect(ui.cbxCenterKey, SIGNAL(currentIndexChanged(int)), this, SLOT(keyChanged( int )));
+ connect(ui.cbxCenterMouseKey, SIGNAL(currentIndexChanged(int)), this, SLOT(keyChanged( int )));
+ connect(ui.chkCenterShift, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int)));
+ connect(ui.chkCenterCtrl, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int)));
+ connect(ui.chkCenterAlt, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int)));
+
+ connect(ui.cbxGameZeroKey, SIGNAL(currentIndexChanged(int)), this, SLOT(keyChanged( int )));
+ connect(ui.cbxGameZeroMouseKey, SIGNAL(currentIndexChanged(int)), this, SLOT(keyChanged( int )));
+ connect(ui.chkGameZeroShift, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int)));
+ connect(ui.chkGameZeroCtrl, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int)));
+ connect(ui.chkGameZeroAlt, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int)));
+
+ connect(ui.cbxStartStopKey, SIGNAL(currentIndexChanged(int)), this, SLOT(keyChanged( int )));
+ connect(ui.cbxStartStopMouseKey, SIGNAL(currentIndexChanged(int)), this, SLOT(keyChanged( int )));
+ connect(ui.chkStartStopShift, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int)));
+ connect(ui.chkStartStopCtrl, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int)));
+ connect(ui.chkStartStopAlt, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int)));
+ connect(ui.radioSetZero, SIGNAL(toggled(bool)), this, SLOT(keyChanged(bool)));
+ connect(ui.radioSetEngineStop, SIGNAL(toggled(bool)), this, SLOT(keyChanged(bool)));
+
+ connect(ui.cbxInhibitKey, SIGNAL(currentIndexChanged(int)), this, SLOT(keyChanged( int )));
+ connect(ui.cbxInhibitMouseKey, SIGNAL(currentIndexChanged(int)), this, SLOT(keyChanged( int )));
+ connect(ui.chkInhibitShift, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int)));
+ connect(ui.chkInhibitCtrl, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int)));
+ connect(ui.chkInhibitAlt, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int)));
+
+ // Also add events for the Axis-checkboxes
+ connect(ui.chkInhibitShift, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int)));
+ connect(ui.chkInhibitYaw, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int)));
+ connect(ui.chkInhibitRoll, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int)));
+ connect(ui.chkInhibitX, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int)));
+ connect(ui.chkInhibitY, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int)));
+ connect(ui.chkInhibitZ, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int)));
+
+ //
+ // Clear the Lists with key-descriptions and keycodes and build the Lists
+ // The strings will all be added to the ListBoxes for each Shortkey
+ //
+ stringList.clear();
+ stringList.append("NONE");
+ stringList.append("F1");
+ stringList.append("F2");
+ stringList.append("F3");
+ stringList.append("F4");
+ stringList.append("F5");
+ stringList.append("F6");
+ stringList.append("F7");
+ stringList.append("F8");
+ stringList.append("F9");
+ stringList.append("F10");
+ stringList.append("F11");
+ stringList.append("F12");
+ stringList.append("MINUS");
+ stringList.append("EQUALS");
+ stringList.append("BACK");
+ stringList.append("A");
+ stringList.append("B");
+ stringList.append("C");
+ stringList.append("D");
+ stringList.append("E");
+ stringList.append("F");
+ stringList.append("G");
+ stringList.append("H");
+ stringList.append("I");
+ stringList.append("J");
+ stringList.append("K");
+ stringList.append("L");
+ stringList.append("M");
+ stringList.append("N");
+ stringList.append("O");
+ stringList.append("P");
+ stringList.append("Q");
+ stringList.append("R");
+ stringList.append("S");
+ stringList.append("T");
+ stringList.append("U");
+ stringList.append("V");
+ stringList.append("W");
+ stringList.append("X");
+ stringList.append("Y");
+ stringList.append("Z");
+ stringList.append("NUMPAD0");
+ stringList.append("NUMPAD1");
+ stringList.append("NUMPAD2");
+ stringList.append("NUMPAD3");
+ stringList.append("NUMPAD4");
+ stringList.append("NUMPAD5");
+ stringList.append("NUMPAD6");
+ stringList.append("NUMPAD7");
+ stringList.append("NUMPAD8");
+ stringList.append("NUMPAD9");
+ stringList.append("HOME");
+ stringList.append("UP");
+ stringList.append("PGUP"); /* PgUp on arrow keypad */
+ stringList.append("LEFT");
+ stringList.append("RIGHT");
+ stringList.append("END");
+ stringList.append("DOWN");
+ stringList.append("PGDWN"); /* PgDn on arrow keypad */
+ stringList.append("INSERT");
+ stringList.append("DELETE");
+
+ keyList.clear();
+ keyList.append(0); // NONE = 0
+ keyList.append(DIK_F1);
+ keyList.append(DIK_F2);
+ keyList.append(DIK_F3);
+ keyList.append(DIK_F4);
+ keyList.append(DIK_F5);
+ keyList.append(DIK_F6);
+ keyList.append(DIK_F7);
+ keyList.append(DIK_F8);
+ keyList.append(DIK_F9);
+ keyList.append(DIK_F10);
+ keyList.append(DIK_F11);
+ keyList.append(DIK_F12);
+ keyList.append(DIK_MINUS);
+ keyList.append(DIK_EQUALS);
+ keyList.append(DIK_BACK);
+ keyList.append(DIK_A);
+ keyList.append(DIK_B);
+ keyList.append(DIK_C);
+ keyList.append(DIK_D);
+ keyList.append(DIK_E);
+ keyList.append(DIK_F);
+ keyList.append(DIK_G);
+ keyList.append(DIK_H);
+ keyList.append(DIK_I);
+ keyList.append(DIK_J);
+ keyList.append(DIK_K);
+ keyList.append(DIK_L);
+ keyList.append(DIK_M);
+ keyList.append(DIK_N);
+ keyList.append(DIK_O);
+ keyList.append(DIK_P);
+ keyList.append(DIK_Q);
+ keyList.append(DIK_R);
+ keyList.append(DIK_S);
+ keyList.append(DIK_T);
+ keyList.append(DIK_U);
+ keyList.append(DIK_V);
+ keyList.append(DIK_W);
+ keyList.append(DIK_X);
+ keyList.append(DIK_Y);
+ keyList.append(DIK_Z);
+ keyList.append(DIK_NUMPAD0);
+ keyList.append(DIK_NUMPAD1);
+ keyList.append(DIK_NUMPAD2);
+ keyList.append(DIK_NUMPAD3);
+ keyList.append(DIK_NUMPAD4);
+ keyList.append(DIK_NUMPAD5);
+ keyList.append(DIK_NUMPAD6);
+ keyList.append(DIK_NUMPAD7);
+ keyList.append(DIK_NUMPAD8);
+ keyList.append(DIK_NUMPAD9);
+ keyList.append(DIK_HOME);
+ keyList.append(DIK_UP);
+ keyList.append(DIK_PRIOR); /* PgUp on arrow keypad */
+ keyList.append(DIK_LEFT);
+ keyList.append(DIK_RIGHT);
+ keyList.append(DIK_END);
+ keyList.append(DIK_DOWN);
+ keyList.append(DIK_NEXT); /* PgDn on arrow keypad */
+ keyList.append(DIK_INSERT);
+ keyList.append(DIK_DELETE);
+
+ //
+ // Add strings to the Listboxes.
+ //
+ for ( int i = 0; i < stringList.size(); i++) {
+ ui.cbxCenterKey->addItem(stringList.at(i));
+ ui.cbxGameZeroKey->addItem(stringList.at(i));
+ ui.cbxStartStopKey->addItem(stringList.at(i));
+ ui.cbxInhibitKey->addItem(stringList.at(i));
+ }
+
+ //
+ // Clear the Lists with key-descriptions and keycodes and build the Lists
+ // The strings will all be added to the ListBoxes for each Shortkey
+ //
+ stringListMouse.clear();
+ stringListMouse.append("NONE");
+ stringListMouse.append("LEFT");
+ stringListMouse.append("RIGHT");
+ stringListMouse.append("MIDDLE");
+ stringListMouse.append("BACK");
+ stringListMouse.append("FORWARD");
+
+ //
+ // Add strings to the Listboxes.
+ //
+ for ( int i = 0; i < stringListMouse.size(); i++) {
+ ui.cbxCenterMouseKey->addItem(stringListMouse.at(i));
+ ui.cbxGameZeroMouseKey->addItem(stringListMouse.at(i));
+ ui.cbxStartStopMouseKey->addItem(stringListMouse.at(i));
+ ui.cbxInhibitMouseKey->addItem(stringListMouse.at(i));
+ }
+
+ // Load the settings from the current .INI-file
+ loadSettings();
+}
+
+//
+// Destructor for server-dialog
+//
+KeyboardShortcutDialog::~KeyboardShortcutDialog() {
+ qDebug() << "~KeyboardShortcutDialog() says: started";
+}
+
+//
+// OK clicked on server-dialog
+//
+void KeyboardShortcutDialog::doOK() {
+ save();
+ this->close();
+}
+
+// override show event
+void KeyboardShortcutDialog::showEvent ( QShowEvent * event ) {
+ loadSettings();
+}
+
+//
+// Cancel clicked on server-dialog
+//
+void KeyboardShortcutDialog::doCancel() {
+ //
+ // Ask if changed Settings should be saved
+ //
+ if (settingsDirty) {
+ int ret = QMessageBox::question ( this, "Settings have changed", "Do you want to save the settings?", QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel, QMessageBox::Discard );
+
+ qDebug() << "doCancel says: answer =" << ret;
+
+ switch (ret) {
+ case QMessageBox::Save:
+ save();
+ this->close();
+ break;
+ case QMessageBox::Discard:
+ this->close();
+ break;
+ case QMessageBox::Cancel:
+ // Cancel was clicked
+ break;
+ default:
+ // should never be reached
+ break;
+ }
+ }
+ else {
+ this->close();
+ }
+}
+
+//
+// Load the current Settings from the currently 'active' INI-file.
+//
+void KeyboardShortcutDialog::loadSettings() {
+int keyindex;
+
+ qDebug() << "loadSettings says: Starting ";
+ QSettings settings("Abbequerque Inc.", "FaceTrackNoIR"); // Registry settings (in HK_USER)
+
+ QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/Settings/default.ini" ).toString();
+ QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file)
+
+ qDebug() << "loadSettings says: iniFile = " << currentFile;
+
+ iniFile.beginGroup ( "KB_Shortcuts" );
+
+ // Center key
+ ui.cbxCenterMouseKey->setCurrentIndex( iniFile.value ( "MouseKey_Center", 0 ).toInt() );
+ keyindex = keyList.indexOf ( iniFile.value ( "Keycode_Center", DIK_HOME ).toInt() );
+ if ( keyindex > 0 ) {
+ ui.cbxCenterKey->setCurrentIndex( keyindex );
+ }
+ else {
+ ui.cbxCenterKey->setCurrentIndex( 0 );
+ }
+ ui.chkCenterShift->setChecked (iniFile.value ( "Shift_Center", 0 ).toBool());
+ ui.chkCenterCtrl->setChecked (iniFile.value ( "Ctrl_Center", 0 ).toBool());
+ ui.chkCenterAlt->setChecked (iniFile.value ( "Alt_Center", 0 ).toBool());
+ ui.chkDisableBeep->setChecked (iniFile.value ( "Disable_Beep", 0 ).toBool());
+
+ // GameZero key
+ ui.cbxGameZeroMouseKey->setCurrentIndex( iniFile.value ( "MouseKey_GameZero", 0 ).toInt() );
+ keyindex = keyList.indexOf ( iniFile.value ( "Keycode_GameZero", 1 ).toInt() );
+ if ( keyindex > 0 ) {
+ ui.cbxGameZeroKey->setCurrentIndex( keyindex );
+ }
+ else {
+ ui.cbxGameZeroKey->setCurrentIndex( 0 );
+ }
+ ui.chkGameZeroShift->setChecked (iniFile.value ( "Shift_GameZero", 0 ).toBool());
+ ui.chkGameZeroCtrl->setChecked (iniFile.value ( "Ctrl_GameZero", 0 ).toBool());
+ ui.chkGameZeroAlt->setChecked (iniFile.value ( "Alt_GameZero", 0 ).toBool());
+
+ // Start/stop key
+ ui.cbxStartStopMouseKey->setCurrentIndex( iniFile.value ( "MouseKey_StartStop", 0 ).toInt() );
+ keyindex = keyList.indexOf ( iniFile.value ( "Keycode_StartStop", DIK_END ).toInt() );
+ if ( keyindex > 0 ) {
+ ui.cbxStartStopKey->setCurrentIndex( keyindex );
+ }
+ else {
+ ui.cbxStartStopKey->setCurrentIndex( 0 );
+ }
+ ui.chkStartStopShift->setChecked (iniFile.value ( "Shift_StartStop", 0 ).toBool());
+ ui.chkStartStopCtrl->setChecked (iniFile.value ( "Ctrl_StartStop", 0 ).toBool());
+ ui.chkStartStopAlt->setChecked (iniFile.value ( "Alt_StartStop", 0 ).toBool());
+ ui.radioSetZero->setChecked (iniFile.value ( "SetZero", 1 ).toBool());
+ ui.radioSetFreeze->setChecked(!ui.radioSetZero->isChecked());
+ ui.radioSetEngineStop->setChecked (iniFile.value ( "SetEngineStop", 1 ).toBool());
+ ui.radioSetKeepTracking->setChecked(!ui.radioSetEngineStop->isChecked());
+
+ // Axis-inhibitor key
+ ui.cbxInhibitMouseKey->setCurrentIndex( iniFile.value ( "MouseKey_Inhibit", 0 ).toInt() );
+ keyindex = keyList.indexOf ( iniFile.value ( "Keycode_Inhibit", 1 ).toInt() );
+ if ( keyindex > 0 ) {
+ ui.cbxInhibitKey->setCurrentIndex( keyindex );
+ }
+ else {
+ ui.cbxInhibitKey->setCurrentIndex( 0 );
+ }
+ ui.chkInhibitShift->setChecked (iniFile.value ( "Shift_Inhibit", 0 ).toBool());
+ ui.chkInhibitCtrl->setChecked (iniFile.value ( "Ctrl_Inhibit", 0 ).toBool());
+ ui.chkInhibitAlt->setChecked (iniFile.value ( "Alt_Inhibit", 0 ).toBool());
+
+ ui.chkInhibitPitch->setChecked (iniFile.value ( "Inhibit_Pitch", 0 ).toBool());
+ ui.chkInhibitYaw->setChecked (iniFile.value ( "Inhibit_Yaw", 0 ).toBool());
+ ui.chkInhibitRoll->setChecked (iniFile.value ( "Inhibit_Roll", 0 ).toBool());
+ ui.chkInhibitX->setChecked (iniFile.value ( "Inhibit_X", 0 ).toBool());
+ ui.chkInhibitY->setChecked (iniFile.value ( "Inhibit_Y", 0 ).toBool());
+ ui.chkInhibitZ->setChecked (iniFile.value ( "Inhibit_Z", 0 ).toBool());
+
+
+ // Reverse Axis
+ ui.chkEnableReverseAxis->setChecked (iniFile.value ( "Enable_ReverseAxis", 0 ).toBool());
+ ui.spinYawAngle4ReverseAxis->setValue( iniFile.value ( "RA_Yaw", 40 ).toInt() );
+ ui.spinZ_Pos4ReverseAxis->setValue( iniFile.value ( "RA_ZPos", -20 ).toInt() );
+ ui.spinZ_PosWhenReverseAxis->setValue( iniFile.value ( "RA_ToZPos", 50 ).toInt() );
+
+ iniFile.endGroup ();
+
+ settingsDirty = false;
+
+}
+
+//
+// Save the current Settings to the currently 'active' INI-file.
+//
+void KeyboardShortcutDialog::save() {
+
+ qDebug() << "save() says: started";
+
+ QSettings settings("Abbequerque Inc.", "FaceTrackNoIR"); // Registry settings (in HK_USER)
+
+ QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/Settings/default.ini" ).toString();
+ QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file)
+
+ iniFile.beginGroup ( "KB_Shortcuts" );
+ iniFile.setValue ( "MouseKey_Center", ui.cbxCenterMouseKey->currentIndex());
+ iniFile.setValue ( "Keycode_Center", keyList.at( ui.cbxCenterKey->currentIndex() ) );
+ iniFile.setValue ( "Shift_Center", ui.chkCenterShift->isChecked() );
+ iniFile.setValue ( "Ctrl_Center", ui.chkCenterCtrl->isChecked() );
+ iniFile.setValue ( "Alt_Center", ui.chkCenterAlt->isChecked() );
+ iniFile.setValue ( "Disable_Beep", ui.chkDisableBeep->isChecked() );
+
+ iniFile.setValue ( "MouseKey_GameZero", ui.cbxGameZeroMouseKey->currentIndex());
+ iniFile.setValue ( "Keycode_GameZero", keyList.at( ui.cbxGameZeroKey->currentIndex() ) );
+ iniFile.setValue ( "Shift_GameZero", ui.chkGameZeroShift->isChecked() );
+ iniFile.setValue ( "Ctrl_GameZero", ui.chkGameZeroCtrl->isChecked() );
+ iniFile.setValue ( "Alt_GameZero", ui.chkGameZeroAlt->isChecked() );
+
+ iniFile.setValue ( "MouseKey_StartStop", ui.cbxStartStopMouseKey->currentIndex());
+ iniFile.setValue ( "Keycode_StartStop", keyList.at( ui.cbxStartStopKey->currentIndex() ) );
+ iniFile.setValue ( "Shift_StartStop", ui.chkStartStopShift->isChecked() );
+ iniFile.setValue ( "Ctrl_StartStop", ui.chkStartStopCtrl->isChecked() );
+ iniFile.setValue ( "Alt_StartStop", ui.chkStartStopAlt->isChecked() );
+ iniFile.setValue ( "SetZero", ui.radioSetZero->isChecked() );
+ iniFile.setValue ( "SetEngineStop", ui.radioSetEngineStop->isChecked() );
+
+ iniFile.setValue ( "MouseKey_Inhibit", ui.cbxInhibitMouseKey->currentIndex());
+ iniFile.setValue ( "Keycode_Inhibit", keyList.at( ui.cbxInhibitKey->currentIndex() ) );
+ iniFile.setValue ( "Shift_Inhibit", ui.chkInhibitShift->isChecked() );
+ iniFile.setValue ( "Ctrl_Inhibit", ui.chkInhibitCtrl->isChecked() );
+ iniFile.setValue ( "Alt_Inhibit", ui.chkInhibitAlt->isChecked() );
+
+ iniFile.setValue ( "Inhibit_Pitch", ui.chkInhibitPitch->isChecked() );
+ iniFile.setValue ( "Inhibit_Yaw", ui.chkInhibitYaw->isChecked() );
+ iniFile.setValue ( "Inhibit_Roll", ui.chkInhibitRoll->isChecked() );
+ iniFile.setValue ( "Inhibit_X", ui.chkInhibitX->isChecked() );
+ iniFile.setValue ( "Inhibit_Y", ui.chkInhibitY->isChecked() );
+ iniFile.setValue ( "Inhibit_Z", ui.chkInhibitZ->isChecked() );
+
+ // Reverse Axis
+ iniFile.setValue ( "Enable_ReverseAxis", ui.chkEnableReverseAxis->isChecked() );
+ iniFile.setValue( "RA_Yaw", ui.spinYawAngle4ReverseAxis->value() );
+ iniFile.setValue( "RA_ZPos", ui.spinZ_Pos4ReverseAxis->value() );
+ iniFile.setValue( "RA_ToZPos", ui.spinZ_PosWhenReverseAxis->value() );
+
+ iniFile.endGroup ();
+
+ settingsDirty = false;
+
+ //
+ // Send a message to the main program, to update the Settings (for the tracker)
+ //
+ mainApp->updateSettings();
+}
+
+//**************************************************************************************************//
+//**************************************************************************************************//
+//
+// Constructor for Curve-configuration-dialog
+//
+CurveConfigurationDialog::CurveConfigurationDialog( FaceTrackNoIR *ftnoir, QWidget *parent, Qt::WindowFlags f ) :
+QWidget( parent , f)
+{
+ ui.setupUi( this );
+
+ QPoint offsetpos(120, 30);
+ this->move(parent->pos() + offsetpos);
+
+ mainApp = ftnoir; // Preserve a pointer to FTNoIR
+
+ // Connect Qt signals to member-functions
+ connect(ui.btnOK, SIGNAL(clicked()), this, SLOT(doOK()));
+ connect(ui.btnCancel, SIGNAL(clicked()), this, SLOT(doCancel()));
+
+ QSettings settings("Abbequerque Inc.", "FaceTrackNoIR"); // Registry settings (in HK_USER)
+ QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/Settings/default.ini" ).toString();
+
+ ui.qFunctionX->setConfig(Tracker::X.curvePtr, currentFile);
+ connect(ui.qFunctionX, SIGNAL(CurveChanged(bool)), this, SLOT(curveChanged(bool)));
+ ui.qFunctionY->setConfig(Tracker::Y.curvePtr, currentFile);
+ connect(ui.qFunctionY, SIGNAL(CurveChanged(bool)), this, SLOT(curveChanged(bool)));
+ ui.qFunctionZ->setConfig(Tracker::Z.curvePtr, currentFile);
+ connect(ui.qFunctionZ, SIGNAL(CurveChanged(bool)), this, SLOT(curveChanged(bool)));
+
+ ui.qFunctionYaw->setConfig(Tracker::Yaw.curvePtr, currentFile);
+ connect(ui.qFunctionYaw, SIGNAL(CurveChanged(bool)), this, SLOT(curveChanged(bool)));
+ //
+ // There are 2 curves for Pitch: Up and Down. Users have indicated that, to be able to use visual Flight controls, it is necessary to have a 'slow' curve for Down...
+ //
+ ui.qFunctionPitch->setConfig(Tracker::Pitch.curvePtr, currentFile);
+ connect(ui.qFunctionPitch, SIGNAL(CurveChanged(bool)), this, SLOT(curveChanged(bool)));
+ ui.qFunctionPitchDown->setConfig(Tracker::Pitch.curvePtrAlt, currentFile);
+ connect(ui.qFunctionPitchDown, SIGNAL(CurveChanged(bool)), this, SLOT(curveChanged(bool)));
+
+ ui.qFunctionRoll->setConfig(Tracker::Roll.curvePtr, currentFile);
+ connect(ui.qFunctionRoll, SIGNAL(CurveChanged(bool)), this, SLOT(curveChanged(bool)));
+
+ // Load the settings from the current .INI-file
+ loadSettings();
+}
+
+//
+// Destructor for server-dialog
+//
+CurveConfigurationDialog::~CurveConfigurationDialog() {
+ qDebug() << "~CurveConfigurationDialog() says: started";
+}
+
+//
+// OK clicked on server-dialog
+//
+void CurveConfigurationDialog::doOK() {
+ save();
+ this->close();
+}
+
+// override show event
+void CurveConfigurationDialog::showEvent ( QShowEvent * event ) {
+ loadSettings();
+}
+
+//
+// Cancel clicked on server-dialog
+//
+void CurveConfigurationDialog::doCancel() {
+ //
+ // Ask if changed Settings should be saved
+ //
+ if (settingsDirty) {
+ int ret = QMessageBox::question ( this, "Settings have changed", "Do you want to save the settings?", QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel, QMessageBox::Discard );
+
+ qDebug() << "doCancel says: answer =" << ret;
+
+ switch (ret) {
+ case QMessageBox::Save:
+ save();
+ this->close();
+ break;
+ case QMessageBox::Discard:
+ this->close();
+ break;
+ case QMessageBox::Cancel:
+ // Cancel was clicked
+ break;
+ default:
+ // should never be reached
+ break;
+ }
+ }
+ else {
+ this->close();
+ }
+}
+
+//
+// Load the current Settings from the currently 'active' INI-file.
+//
+void CurveConfigurationDialog::loadSettings() {
+int NeutralZone;
+int sensYaw, sensPitch, sensRoll;
+int sensX, sensY, sensZ;
+
+ qDebug() << "loadSettings says: Starting ";
+ QSettings settings("Abbequerque Inc.", "FaceTrackNoIR"); // Registry settings (in HK_USER)
+
+ QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/Settings/default.ini" ).toString();
+ QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file)
+
+ qDebug() << "loadSettings says: iniFile = " << currentFile;
+
+ iniFile.beginGroup ( "Tracking" );
+ NeutralZone = iniFile.value ( "NeutralZone", 5 ).toInt();
+ sensYaw = iniFile.value ( "sensYaw", 100 ).toInt();
+ sensPitch = iniFile.value ( "sensPitch", 100 ).toInt();
+ sensRoll = iniFile.value ( "sensRoll", 100 ).toInt();
+ sensX = iniFile.value ( "sensX", 100 ).toInt();
+ sensY = iniFile.value ( "sensY", 100 ).toInt();
+ sensZ = iniFile.value ( "sensZ", 100 ).toInt();
+
+ iniFile.endGroup ();
+
+ ui.qFunctionYaw->loadSettings(currentFile);
+ ui.qFunctionPitch->loadSettings(currentFile);
+ ui.qFunctionPitchDown->loadSettings(currentFile);
+ ui.qFunctionRoll->loadSettings(currentFile);
+
+ settingsDirty = false;
+
+}
+
+//
+// Save the current Settings to the currently 'active' INI-file.
+//
+void CurveConfigurationDialog::save() {
+
+ qDebug() << "save() says: started";
+
+ QSettings settings("Abbequerque Inc.", "FaceTrackNoIR"); // Registry settings (in HK_USER)
+
+ QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/Settings/default.ini" ).toString();
+ QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file)
+
+ ui.qFunctionYaw->saveSettings(currentFile);
+ ui.qFunctionPitch->saveSettings(currentFile);
+ ui.qFunctionPitchDown->saveSettings(currentFile);
+ ui.qFunctionRoll->saveSettings(currentFile);
+
+ ui.qFunctionX->saveSettings(currentFile);
+ ui.qFunctionY->saveSettings(currentFile);
+ ui.qFunctionZ->saveSettings(currentFile);
+
+ settingsDirty = false;
+
+ //
+ // Send a message to the main program, to update the Settings (for the tracker)
+ //
+ mainApp->updateSettings();
+}
diff --git a/facetracknoir/FaceTrackNoIR.h b/facetracknoir/FaceTrackNoIR.h
new file mode 100644
index 00000000..756b5867
--- /dev/null
+++ b/facetracknoir/FaceTrackNoIR.h
@@ -0,0 +1,249 @@
+/********************************************************************************
+* FaceTrackNoIR This program is a private project of the some enthusiastic *
+* gamers from Holland, who don't like to pay much for *
+* head-tracking. *
+* *
+* Copyright (C) 2010 Wim Vriend (Developing) *
+* Ron Hendriks (Researching and Testing) *
+* *
+* Homepage *
+* *
+* This program is free software; you can redistribute it and/or modify it *
+* under the terms of the GNU General Public License as published by the *
+* Free Software Foundation; either version 3 of the License, or (at your *
+* option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, but *
+* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
+* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for *
+* more details. *
+* *
+* You should have received a copy of the GNU General Public License along *
+* with this program; if not, see <http://www.gnu.org/licenses/>. *
+*********************************************************************************/
+
+#ifndef FaceTrackNoIR_H
+#define FaceTrackNoIR_H
+
+#include <tchar.h>
+#include <QtGui/QMainWindow>
+#include <QApplication>
+#include <QFileDialog>
+#include <QListView>
+#include <QPainter>
+#include <QWidget>
+#include <QDialog>
+#include <QUrl>
+
+#include "../FTNoIR_PoseWidget/glwidget.h"
+
+#include "ui_FaceTrackNoIR.h"
+#include "ui_FTNoIR_KeyboardShortcuts.h"
+#include "ui_FTNoIR_Preferences.h"
+#include "ui_FTNoIR_Curves.h"
+
+#include "..\ftnoir_protocol_base\FTNoIR_Protocol_base.h"
+#include "..\ftnoir_tracker_base\FTNoIR_Tracker_base.h"
+#include "..\ftnoir_filter_base\FTNoIR_Filter_base.h"
+
+typedef ITrackerDialogPtr (WINAPI *importGetTrackerDialog)(void);
+typedef ITrackerDllPtr (WINAPI *importGetTrackerDll)(void);
+typedef IProtocolDialogPtr (WINAPI *importGetProtocolDialog)(void);
+typedef IProtocolDllPtr (WINAPI *importGetProtocolDll)(void);
+typedef IFilterDialogPtr (WINAPI *importGetFilterDialog)(void);
+typedef IFilterDllPtr (WINAPI *importGetFilterDll)(void);
+
+#include <Dshow.h>
+
+class Tracker; // pre-define class to avoid circular includes
+
+class FaceTrackNoIR : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ FaceTrackNoIR(QWidget *parent = 0, Qt::WFlags flags = 0);
+ ~FaceTrackNoIR();
+
+ void getGameProgramName(); // Get the ProgramName from the game and display it.
+ void updateSettings(); // Update the settings (let Tracker read INI-file).
+
+ QFrame *getVideoWidget(); // Get a pointer to the video-widget, to use in the DLL
+ QString getCurrentProtocolName(); // Get the name of the selected protocol
+ QString getCurrentFilterName(); // Get the name of the selected filter
+ QString getCurrentTrackerName(); // Get the name of the selected face-tracker
+ QString getSecondTrackerName(); // Get the name of the second face-tracker ("None" if no selection)
+
+private:
+ Ui::FaceTrackNoIRClass ui;
+ Tracker *tracker;
+ QTimer *timMinimizeFTN; // Timer to Auto-minimize
+ QTimer *timUpdateHeadPose; // Timer to display headpose
+ QStringList iniFileList; // List of INI-files, that are present in the Settings folder
+ QStringList protocolFileList; // List of Protocol-DLL-files, that are present in the program-folder
+ QStringList filterFileList; // List of Filter-DLL-files, that are present in the program-folder
+ QStringList trackerFileList; // List of Tracker-DLL-files, that are present in the program-folder
+
+ ITrackerDialogPtr pTrackerDialog; // Pointer to Tracker dialog instance (in DLL)
+ ITrackerDialogPtr pSecondTrackerDialog; // Pointer to the second Tracker dialog instance (in DLL)
+ IProtocolDialogPtr pProtocolDialog; // Pointer to Protocol dialog instance (in DLL)
+ IFilterDialogPtr pFilterDialog; // Pointer to Filter dialog instance (in DLL)
+
+ /** Widget variables **/
+ QVBoxLayout *l;
+ QWidget *_preferences;
+ QWidget *_keyboard_shortcuts;
+ QWidget *_curve_config;
+ GLWidget *_pose_display;
+
+ /** QT objects **/
+ QDialog aboutDialog;
+ QDesktopWidget desktop;
+
+ QAction *minimizeAction;
+ QAction *restoreAction;
+ QAction *quitAction;
+
+ QSystemTrayIcon *trayIcon;
+ QMenu *trayIconMenu;
+
+ void createIconGroupBox();
+// void createMessageGroupBox();
+ void createActions();
+ void createTrayIcon();
+
+ /** helper **/
+ bool cameraDetected;
+ bool settingsDirty;
+
+ void GetCameraNameDX();
+ void loadSettings();
+ void setupFaceTrackNoIR();
+
+ private slots:
+ //file menu
+ void open();
+ void save();
+ void saveAs();
+ void exit();
+
+ //about menu
+ void openurl_support();
+ void openurl_donation();
+ void about();
+
+// void setIcon(int index);
+ void iconActivated(QSystemTrayIcon::ActivationReason reason);
+ void profileSelected(int index);
+ void protocolSelected(int index);
+ void filterSelected(int index);
+ void trackingSourceSelected(int index);
+
+ void showVideoWidget();
+ void showHeadPoseWidget();
+ void showTrackerSettings();
+ void showSecondTrackerSettings();
+
+ void showServerControls();
+ void showFilterControls();
+ void showPreferences();
+ void showKeyboardShortcuts();
+ void showCurveConfiguration();
+
+ void setInvertYaw( int invert );
+ void setInvertPitch( int invert );
+ void setInvertRoll( int invert );
+ void setInvertX( int invert );
+ void setInvertY( int invert );
+ void setInvertZ( int invert );
+
+ void showHeadPose();
+
+ //smoothing slider
+ void setSmoothing( int smooth );
+
+ void startTracker();
+ void stopTracker();
+};
+
+// Widget that has controls for FaceTrackNoIR Preferences.
+class PreferencesDialog: public QWidget, public Ui::UICPreferencesDialog
+{
+ Q_OBJECT
+public:
+
+ explicit PreferencesDialog( FaceTrackNoIR *ftnoir, QWidget *parent=0, Qt::WindowFlags f=0 );
+ virtual ~PreferencesDialog();
+ void showEvent ( QShowEvent * event );
+
+private:
+ Ui::UICPreferencesDialog ui;
+ void loadSettings();
+ void save();
+
+ /** helper **/
+ bool settingsDirty;
+ FaceTrackNoIR *mainApp;
+
+private slots:
+ void doOK();
+ void doCancel();
+ void keyChanged( int index ) { settingsDirty = true; };
+};
+
+// Widget that has controls for Keyboard shortcuts.
+class KeyboardShortcutDialog: public QWidget, public Ui::UICKeyboardShortcutDialog
+{
+ Q_OBJECT
+public:
+
+ explicit KeyboardShortcutDialog( FaceTrackNoIR *ftnoir, QWidget *parent=0, Qt::WindowFlags f=0 );
+ virtual ~KeyboardShortcutDialog();
+ void showEvent ( QShowEvent * event );
+
+private:
+ Ui::UICKeyboardShortcutDialog ui;
+ void loadSettings();
+ void save();
+
+ /** helper **/
+ bool settingsDirty;
+ FaceTrackNoIR *mainApp;
+ QList<QString> stringList; // List of strings, that describe the keyboard-keys
+ QList<BYTE> keyList; // List of keys, with the values of the keyboard-keys
+ QList<QString> stringListMouse; // List of strings, that describe the mouse-keys
+
+private slots:
+ void doOK();
+ void doCancel();
+ void keyChanged( int index ) { settingsDirty = true; };
+ void keyChanged( bool index ) { settingsDirty = true; };
+};
+
+// Widget that has controls for Keyboard shortcuts.
+class CurveConfigurationDialog: public QWidget, public Ui::UICCurveConfigurationDialog
+{
+ Q_OBJECT
+public:
+
+ explicit CurveConfigurationDialog( FaceTrackNoIR *ftnoir, QWidget *parent=0, Qt::WindowFlags f=0 );
+ virtual ~CurveConfigurationDialog();
+ void showEvent ( QShowEvent * event );
+
+private:
+ Ui::UICCurveConfigurationDialog ui;
+ void loadSettings();
+ void save();
+
+ /** helper **/
+ bool settingsDirty;
+ FaceTrackNoIR *mainApp;
+
+private slots:
+ void doOK();
+ void doCancel();
+ void curveChanged( bool change ) { settingsDirty = true; };
+};
+
+
+#endif // FaceTrackNoIR_H
diff --git a/facetracknoir/FaceTrackNoIR.ico b/facetracknoir/FaceTrackNoIR.ico
new file mode 100644
index 00000000..5115066c
--- /dev/null
+++ b/facetracknoir/FaceTrackNoIR.ico
Binary files differ
diff --git a/facetracknoir/FaceTrackNoIR.qrc b/facetracknoir/FaceTrackNoIR.qrc
new file mode 100644
index 00000000..60e4da7b
--- /dev/null
+++ b/facetracknoir/FaceTrackNoIR.qrc
@@ -0,0 +1,14 @@
+<RCC>
+ <qresource prefix="/">
+ <file>UIElements/Tools.png</file>
+ <file>images/Settings16.png</file>
+ <file>images/SettingsOpen16.png</file>
+ <file>UIElements/Donate.png</file>
+ <file>UIElements/Curves.png</file>
+ <file>images/rotation_DOFs.png</file>
+ <file>images/translation_DOFs.png</file>
+ <file>images/330px-6DOF_en.png</file>
+ <file>images/FaceTrackNoIR.ico</file>
+ <file>UIElements/aboutFaceTrackNoIR.png</file>
+ </qresource>
+</RCC>
diff --git a/facetracknoir/FaceTrackNoIR.rc b/facetracknoir/FaceTrackNoIR.rc
new file mode 100644
index 00000000..ed8a68c1
--- /dev/null
+++ b/facetracknoir/FaceTrackNoIR.rc
@@ -0,0 +1,84 @@
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// Dutch (Neutral) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NLD)
+#ifdef _WIN32
+LANGUAGE LANG_DUTCH, SUBLANG_NEUTRAL
+#pragma code_page(1252)
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_ICON1 ICON "FaceTrackNoIR.ico"
+#endif // Dutch (Neutral) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+/////////////////////////////////////////////////////////////////////////////
+// German (Germany) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU)
+#ifdef _WIN32
+LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+#endif // German (Germany) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/facetracknoir/FaceTrackNoIR.ui b/facetracknoir/FaceTrackNoIR.ui
new file mode 100644
index 00000000..8c3db4a4
--- /dev/null
+++ b/facetracknoir/FaceTrackNoIR.ui
@@ -0,0 +1,2375 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <author>WVR</author>
+ <class>FaceTrackNoIRClass</class>
+ <widget class="QMainWindow" name="FaceTrackNoIRClass">
+ <property name="windowModality">
+ <enum>Qt::NonModal</enum>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>925</width>
+ <height>415</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>415</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>415</height>
+ </size>
+ </property>
+ <property name="contextMenuPolicy">
+ <enum>Qt::DefaultContextMenu</enum>
+ </property>
+ <property name="windowTitle">
+ <string>FaceTrackNoIR</string>
+ </property>
+ <property name="windowIcon">
+ <iconset>
+ <normaloff>UIElements/FaceTrackNoIR.ico</normaloff>UIElements/FaceTrackNoIR.ico</iconset>
+ </property>
+ <property name="toolTip">
+ <string/>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">/* Customize any plain widget that is a child of a QMainWindow. */
+QMainWindow &gt; .QWidget {
+ background-color: rgb(100, 100, 100);
+}
+
+/* Set the selection colors for all widgets. */
+QWidget {
+ selection-color: black;
+ selection-background-color: Silver;
+ color: black;
+}
+
+/* Specials for individual widget(s) */
+QWidget#widget {
+/* background-color: #484848;*/
+ background-color: #595959;
+ border-left: 1px solid #000;
+}
+
+/* Specials for individual widget(s) */
+QWidget#widget4logo {
+ background-color: #000000;
+}
+
+/* Specials for individual widget(s) */
+QWidget#headPoseWidget {
+ background-color: #595959;
+}
+
+QWidget#widget4video {
+/* background-color: #595959;*/
+}
+
+QWidget#Leftwidget {
+ background-color: ;
+}
+
+QWidget#widgetTop {
+ background-color: #595959;
+ border-bottom: 1px solid #000;
+}
+
+/* Make text in message boxes selectable. */
+QMessageBox {
+ /* LinksAccessibleByMouse | TextSelectableByMouse */
+ messagebox-text-interaction-flags: 5;
+}
+
+/* Make the entire row selected in item views. */
+QAbstractItemView {
+ show-decoration-selected: 1;
+}
+
+/* Nice WindowsXP-style password character for password line edits. */
+QLineEdit[echoMode=&quot;2&quot;] {
+ lineedit-password-character: 9679;
+}
+
+/* Customize tooltips. */
+QToolTip {
+ background-color: rgb(170, 255, 127);
+ opacity: 200;
+}
+
+/* Customize push buttons and comboboxes. Our read-only combobox
+ is very similar to a push button, so they share the same border image. */
+
+QPushButton {
+ min-width: 4em;
+}
+
+QCheckBox {
+ background:none;
+}
+
+QPushButton:disabled {
+ color: rgb(128, 128, 128);
+}
+
+QGroupBox {
+ color: rgb(255, 255, 255);
+}</string>
+ </property>
+ <property name="locale">
+ <locale language="English" country="UnitedStates"/>
+ </property>
+ <property name="toolButtonStyle">
+ <enum>Qt::ToolButtonIconOnly</enum>
+ </property>
+ <property name="animated">
+ <bool>true</bool>
+ </property>
+ <widget class="QWidget" name="centralWidget">
+ <property name="minimumSize">
+ <size>
+ <width>925</width>
+ <height>350</height>
+ </size>
+ </property>
+ <property name="styleSheet">
+ <string notr="true"/>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <property name="spacing">
+ <number>0</number>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <property name="spacing">
+ <number>0</number>
+ </property>
+ <item>
+ <layout class="QGridLayout" name="gridLayout">
+ <property name="leftMargin">
+ <number>0</number>
+ </property>
+ <property name="rightMargin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <item row="4" column="0">
+ <widget class="QWidget" name="widget4video" native="true">
+ <property name="minimumSize">
+ <size>
+ <width>250</width>
+ <height>170</height>
+ </size>
+ </property>
+ <widget class="QFrame" name="video_frame">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>250</width>
+ <height>170</height>
+ </rect>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>250</width>
+ <height>150</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>500</width>
+ <height>500</height>
+ </size>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
+ </property>
+ </widget>
+ </widget>
+ </item>
+ <item row="0" column="0">
+ <layout class="QHBoxLayout" name="horizontalLayout_6">
+ <item>
+ <widget class="QWidget" name="widget4logo" native="true">
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>90</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>90</height>
+ </size>
+ </property>
+ <widget class="QPushButton" name="btnDonate">
+ <property name="geometry">
+ <rect>
+ <x>100</x>
+ <y>1</y>
+ <width>145</width>
+ <height>34</height>
+ </rect>
+ </property>
+ <property name="cursor">
+ <cursorShape>PointingHandCursor</cursorShape>
+ </property>
+ <property name="toolTip">
+ <string>Please help us: make gaming fun...</string>
+ </property>
+ <property name="text">
+ <string>Click here to
+Support FaceTrackNoIR!</string>
+ </property>
+ <property name="icon">
+ <iconset resource="FaceTrackNoIR.qrc">
+ <normaloff>:/UIElements/Donate.png</normaloff>:/UIElements/Donate.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>18</width>
+ <height>18</height>
+ </size>
+ </property>
+ </widget>
+ <widget class="QLCDNumber" name="lcdNumOutputRotX">
+ <property name="geometry">
+ <rect>
+ <x>196</x>
+ <y>34</y>
+ <width>50</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="autoFillBackground">
+ <bool>false</bool>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">color: rgb(0, 255, 0);</string>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="numDigits">
+ <number>5</number>
+ </property>
+ <property name="segmentStyle">
+ <enum>QLCDNumber::Flat</enum>
+ </property>
+ </widget>
+ <widget class="QLCDNumber" name="lcdNumOutputRotY">
+ <property name="geometry">
+ <rect>
+ <x>196</x>
+ <y>52</y>
+ <width>50</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="autoFillBackground">
+ <bool>false</bool>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">color: rgb(0, 255, 0);</string>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="numDigits">
+ <number>5</number>
+ </property>
+ <property name="segmentStyle">
+ <enum>QLCDNumber::Flat</enum>
+ </property>
+ </widget>
+ <widget class="QLCDNumber" name="lcdNumOutputRotZ">
+ <property name="geometry">
+ <rect>
+ <x>196</x>
+ <y>70</y>
+ <width>50</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="autoFillBackground">
+ <bool>false</bool>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">color: rgb(0, 255, 0);</string>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="numDigits">
+ <number>5</number>
+ </property>
+ <property name="segmentStyle">
+ <enum>QLCDNumber::Flat</enum>
+ </property>
+ </widget>
+ <widget class="QLCDNumber" name="lcdNumOutputPosX">
+ <property name="geometry">
+ <rect>
+ <x>112</x>
+ <y>34</y>
+ <width>50</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="autoFillBackground">
+ <bool>false</bool>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">color: rgb(0, 255, 0);</string>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="numDigits">
+ <number>5</number>
+ </property>
+ <property name="segmentStyle">
+ <enum>QLCDNumber::Flat</enum>
+ </property>
+ </widget>
+ <widget class="QLCDNumber" name="lcdNumOutputPosY">
+ <property name="geometry">
+ <rect>
+ <x>112</x>
+ <y>52</y>
+ <width>50</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="autoFillBackground">
+ <bool>false</bool>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">color: rgb(0, 255, 0);</string>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="numDigits">
+ <number>5</number>
+ </property>
+ <property name="segmentStyle">
+ <enum>QLCDNumber::Flat</enum>
+ </property>
+ </widget>
+ <widget class="QLCDNumber" name="lcdNumOutputPosZ">
+ <property name="geometry">
+ <rect>
+ <x>112</x>
+ <y>70</y>
+ <width>50</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="autoFillBackground">
+ <bool>false</bool>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">color: rgb(0, 255, 0);</string>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="numDigits">
+ <number>5</number>
+ </property>
+ <property name="segmentStyle">
+ <enum>QLCDNumber::Flat</enum>
+ </property>
+ </widget>
+ <widget class="QLabel" name="lblX">
+ <property name="geometry">
+ <rect>
+ <x>104</x>
+ <y>35</y>
+ <width>16</width>
+ <height>16</height>
+ </rect>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">color: rgb(0, 255, 0);</string>
+ </property>
+ <property name="text">
+ <string>X</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="lblY">
+ <property name="geometry">
+ <rect>
+ <x>105</x>
+ <y>55</y>
+ <width>16</width>
+ <height>16</height>
+ </rect>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">color: rgb(0, 255, 0);</string>
+ </property>
+ <property name="text">
+ <string>Y</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="lblZ">
+ <property name="geometry">
+ <rect>
+ <x>105</x>
+ <y>74</y>
+ <width>16</width>
+ <height>16</height>
+ </rect>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">color: rgb(0, 255, 0);</string>
+ </property>
+ <property name="text">
+ <string>Z</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="lblRotZ">
+ <property name="geometry">
+ <rect>
+ <x>164</x>
+ <y>74</y>
+ <width>20</width>
+ <height>16</height>
+ </rect>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">color: rgb(0, 255, 0);</string>
+ </property>
+ <property name="text">
+ <string>roll</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="lblRotX">
+ <property name="geometry">
+ <rect>
+ <x>166</x>
+ <y>35</y>
+ <width>20</width>
+ <height>16</height>
+ </rect>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">color: rgb(0, 255, 0);</string>
+ </property>
+ <property name="text">
+ <string>yaw</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="lblRotY">
+ <property name="geometry">
+ <rect>
+ <x>164</x>
+ <y>55</y>
+ <width>25</width>
+ <height>16</height>
+ </rect>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">color: rgb(0, 255, 0);</string>
+ </property>
+ <property name="text">
+ <string>pitch</string>
+ </property>
+ </widget>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="5" column="0">
+ <widget class="QWidget" name="headPoseWidget" native="true">
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>160</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>160</height>
+ </size>
+ </property>
+ <property name="styleSheet">
+ <string notr="true"/>
+ </property>
+ <widget class="QGroupBox" name="groupBox">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>60</y>
+ <width>231</width>
+ <height>80</height>
+ </rect>
+ </property>
+ <property name="title">
+ <string>Raw Input</string>
+ </property>
+ <property name="flat">
+ <bool>true</bool>
+ </property>
+ <widget class="QLCDNumber" name="lcdNumRotZ">
+ <property name="geometry">
+ <rect>
+ <x>150</x>
+ <y>60</y>
+ <width>71</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="numDigits">
+ <number>6</number>
+ </property>
+ </widget>
+ <widget class="QLCDNumber" name="lcdNumRotX">
+ <property name="geometry">
+ <rect>
+ <x>150</x>
+ <y>20</y>
+ <width>71</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="numDigits">
+ <number>6</number>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_4">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>20</y>
+ <width>21</width>
+ <height>16</height>
+ </rect>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">border:none;
+color:white</string>
+ </property>
+ <property name="text">
+ <string>X</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_5">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>40</y>
+ <width>21</width>
+ <height>16</height>
+ </rect>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">border:none;
+color:white;</string>
+ </property>
+ <property name="text">
+ <string>Y</string>
+ </property>
+ </widget>
+ <widget class="QLCDNumber" name="lcdNumZ">
+ <property name="geometry">
+ <rect>
+ <x>30</x>
+ <y>60</y>
+ <width>61</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_6">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>60</y>
+ <width>21</width>
+ <height>16</height>
+ </rect>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">color:white;
+border:none;</string>
+ </property>
+ <property name="text">
+ <string>Z</string>
+ </property>
+ </widget>
+ <widget class="QLCDNumber" name="lcdNumY">
+ <property name="geometry">
+ <rect>
+ <x>30</x>
+ <y>40</y>
+ <width>61</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_7">
+ <property name="geometry">
+ <rect>
+ <x>108</x>
+ <y>58</y>
+ <width>31</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">border:none;
+color:white;</string>
+ </property>
+ <property name="text">
+ <string>roll</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_8">
+ <property name="geometry">
+ <rect>
+ <x>109</x>
+ <y>38</y>
+ <width>31</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">color:white;
+border:none;</string>
+ </property>
+ <property name="text">
+ <string>pitch</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_9">
+ <property name="geometry">
+ <rect>
+ <x>108</x>
+ <y>18</y>
+ <width>31</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">border:none;
+color:white;</string>
+ </property>
+ <property name="text">
+ <string>yaw</string>
+ </property>
+ </widget>
+ <widget class="QLCDNumber" name="lcdNumRotY">
+ <property name="geometry">
+ <rect>
+ <x>150</x>
+ <y>40</y>
+ <width>71</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="numDigits">
+ <number>6</number>
+ </property>
+ </widget>
+ <widget class="QLCDNumber" name="lcdNumX">
+ <property name="geometry">
+ <rect>
+ <x>30</x>
+ <y>20</y>
+ <width>61</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="numDigits">
+ <number>5</number>
+ </property>
+ </widget>
+ </widget>
+ <widget class="QGroupBox" name="groupBox_2">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>10</y>
+ <width>231</width>
+ <height>50</height>
+ </rect>
+ </property>
+ <property name="title">
+ <string>Status</string>
+ </property>
+ <property name="flat">
+ <bool>true</bool>
+ </property>
+ <widget class="QLabel" name="txtTracking">
+ <property name="geometry">
+ <rect>
+ <x>110</x>
+ <y>10</y>
+ <width>101</width>
+ <height>16</height>
+ </rect>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">border:none;
+color: rgb(0, 255, 0);</string>
+ </property>
+ <property name="text">
+ <string>Tracking</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="txtAxisReverse">
+ <property name="geometry">
+ <rect>
+ <x>110</x>
+ <y>30</y>
+ <width>101</width>
+ <height>16</height>
+ </rect>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">border:none;
+color: rgb(0, 255, 0);</string>
+ </property>
+ <property name="text">
+ <string>Axis Reverse</string>
+ </property>
+ </widget>
+ </widget>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QWidget" name="widget" native="true">
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>400</width>
+ <height>300</height>
+ </size>
+ </property>
+ <property name="palette">
+ <palette>
+ <active>
+ <colorrole role="WindowText">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ </brush>
+ </colorrole>
+ <colorrole role="Button">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>89</red>
+ <green>89</green>
+ <blue>89</blue>
+ </color>
+ </brush>
+ </colorrole>
+ <colorrole role="Text">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ </brush>
+ </colorrole>
+ <colorrole role="ButtonText">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ </brush>
+ </colorrole>
+ <colorrole role="Base">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>89</red>
+ <green>89</green>
+ <blue>89</blue>
+ </color>
+ </brush>
+ </colorrole>
+ <colorrole role="Window">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>89</red>
+ <green>89</green>
+ <blue>89</blue>
+ </color>
+ </brush>
+ </colorrole>
+ <colorrole role="Highlight">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>192</red>
+ <green>192</green>
+ <blue>192</blue>
+ </color>
+ </brush>
+ </colorrole>
+ <colorrole role="HighlightedText">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ </brush>
+ </colorrole>
+ <colorrole role="AlternateBase">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>72</red>
+ <green>72</green>
+ <blue>72</blue>
+ </color>
+ </brush>
+ </colorrole>
+ </active>
+ <inactive>
+ <colorrole role="WindowText">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ </brush>
+ </colorrole>
+ <colorrole role="Button">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>89</red>
+ <green>89</green>
+ <blue>89</blue>
+ </color>
+ </brush>
+ </colorrole>
+ <colorrole role="Text">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ </brush>
+ </colorrole>
+ <colorrole role="ButtonText">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ </brush>
+ </colorrole>
+ <colorrole role="Base">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>89</red>
+ <green>89</green>
+ <blue>89</blue>
+ </color>
+ </brush>
+ </colorrole>
+ <colorrole role="Window">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>89</red>
+ <green>89</green>
+ <blue>89</blue>
+ </color>
+ </brush>
+ </colorrole>
+ <colorrole role="Highlight">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>192</red>
+ <green>192</green>
+ <blue>192</blue>
+ </color>
+ </brush>
+ </colorrole>
+ <colorrole role="HighlightedText">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ </brush>
+ </colorrole>
+ <colorrole role="AlternateBase">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>72</red>
+ <green>72</green>
+ <blue>72</blue>
+ </color>
+ </brush>
+ </colorrole>
+ </inactive>
+ <disabled>
+ <colorrole role="WindowText">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ </brush>
+ </colorrole>
+ <colorrole role="Button">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>89</red>
+ <green>89</green>
+ <blue>89</blue>
+ </color>
+ </brush>
+ </colorrole>
+ <colorrole role="Text">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ </brush>
+ </colorrole>
+ <colorrole role="ButtonText">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ </brush>
+ </colorrole>
+ <colorrole role="Base">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>89</red>
+ <green>89</green>
+ <blue>89</blue>
+ </color>
+ </brush>
+ </colorrole>
+ <colorrole role="Window">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>89</red>
+ <green>89</green>
+ <blue>89</blue>
+ </color>
+ </brush>
+ </colorrole>
+ <colorrole role="Highlight">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>192</red>
+ <green>192</green>
+ <blue>192</blue>
+ </color>
+ </brush>
+ </colorrole>
+ <colorrole role="HighlightedText">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ </brush>
+ </colorrole>
+ <colorrole role="AlternateBase">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>72</red>
+ <green>72</green>
+ <blue>72</blue>
+ </color>
+ </brush>
+ </colorrole>
+ </disabled>
+ </palette>
+ </property>
+ <property name="autoFillBackground">
+ <bool>false</bool>
+ </property>
+ <property name="styleSheet">
+ <string notr="true"/>
+ </property>
+ <property name="locale">
+ <locale language="English" country="UnitedStates"/>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_4">
+ <item>
+ <layout class="QGridLayout" name="gridLayout_2">
+ <item row="2" column="0">
+ <layout class="QHBoxLayout" name="horizontalLayout_3">
+ <property name="leftMargin">
+ <number>10</number>
+ </property>
+ <property name="rightMargin">
+ <number>10</number>
+ </property>
+ <item>
+ <widget class="QGroupBox" name="groupProfile">
+ <property name="minimumSize">
+ <size>
+ <width>206</width>
+ <height>120</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>210</width>
+ <height>120</height>
+ </size>
+ </property>
+ <property name="title">
+ <string>Profile</string>
+ </property>
+ <widget class="QComboBox" name="iconcomboProfile">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>20</y>
+ <width>180</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <property name="styleSheet">
+ <string notr="true"/>
+ </property>
+ <property name="currentIndex">
+ <number>-1</number>
+ </property>
+ <property name="maxVisibleItems">
+ <number>10</number>
+ </property>
+ </widget>
+ <widget class="QPushButton" name="btnSaveAs">
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>80</y>
+ <width>180</width>
+ <height>23</height>
+ </rect>
+ </property>
+ <property name="toolTip">
+ <string>Save the INI-file under another name</string>
+ </property>
+ <property name="styleSheet">
+ <string notr="true"/>
+ </property>
+ <property name="text">
+ <string>Save As ...</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" name="btnLoad">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>50</y>
+ <width>81</width>
+ <height>23</height>
+ </rect>
+ </property>
+ <property name="toolTip">
+ <string>Load an INI-file from a folder</string>
+ </property>
+ <property name="styleSheet">
+ <string notr="true"/>
+ </property>
+ <property name="text">
+ <string>Load</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" name="btnSave">
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>110</x>
+ <y>50</y>
+ <width>81</width>
+ <height>23</height>
+ </rect>
+ </property>
+ <property name="toolTip">
+ <string>Save the current INI-file</string>
+ </property>
+ <property name="styleSheet">
+ <string notr="true"/>
+ </property>
+ <property name="text">
+ <string>Save</string>
+ </property>
+ </widget>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="groupGlobalSettings">
+ <property name="minimumSize">
+ <size>
+ <width>420</width>
+ <height>120</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>120</height>
+ </size>
+ </property>
+ <property name="title">
+ <string>Global Settings</string>
+ </property>
+ <widget class="QWidget" name="gridLayoutWidget">
+ <property name="geometry">
+ <rect>
+ <x>9</x>
+ <y>20</y>
+ <width>171</width>
+ <height>80</height>
+ </rect>
+ </property>
+ <layout class="QGridLayout" name="gridLayout_3">
+ <item row="0" column="0">
+ <widget class="QLabel" name="lblSensYaw_4">
+ <property name="minimumSize">
+ <size>
+ <width>25</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>150</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">color:#ccc;
+background:none;</string>
+ </property>
+ <property name="text">
+ <string>Smoothing:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLabel" name="label">
+ <property name="styleSheet">
+ <string notr="true">color:#ccc;
+background:none;</string>
+ </property>
+ <property name="text">
+ <string>(samples)</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QSlider" name="slideSmoothing">
+ <property name="minimumSize">
+ <size>
+ <width>50</width>
+ <height>15</height>
+ </size>
+ </property>
+ <property name="minimum">
+ <number>1</number>
+ </property>
+ <property name="maximum">
+ <number>50</number>
+ </property>
+ <property name="pageStep">
+ <number>5</number>
+ </property>
+ <property name="value">
+ <number>10</number>
+ </property>
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="tickPosition">
+ <enum>QSlider::NoTicks</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QSpinBox" name="spinSmoothing">
+ <property name="minimumSize">
+ <size>
+ <width>35</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">background:none;</string>
+ </property>
+ <property name="minimum">
+ <number>1</number>
+ </property>
+ <property name="maximum">
+ <number>50</number>
+ </property>
+ <property name="value">
+ <number>10</number>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="gridLayoutWidget_2">
+ <property name="geometry">
+ <rect>
+ <x>190</x>
+ <y>20</y>
+ <width>211</width>
+ <height>81</height>
+ </rect>
+ </property>
+ <layout class="QGridLayout" name="gridLayout_4">
+ <item row="3" column="0">
+ <widget class="QLabel" name="lblSensRoll">
+ <property name="minimumSize">
+ <size>
+ <width>25</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>150</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="layoutDirection">
+ <enum>Qt::RightToLeft</enum>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">color:#ccc;
+background:none;</string>
+ </property>
+ <property name="text">
+ <string>Roll</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1">
+ <widget class="QCheckBox" name="chkInvertRoll">
+ <property name="styleSheet">
+ <string notr="true">background:none;</string>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="2">
+ <widget class="QLabel" name="lblSensZ">
+ <property name="minimumSize">
+ <size>
+ <width>25</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>150</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="layoutDirection">
+ <enum>Qt::RightToLeft</enum>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">color:#ccc;
+background:none;</string>
+ </property>
+ <property name="text">
+ <string>Z</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="3">
+ <widget class="QCheckBox" name="chkInvertZ">
+ <property name="styleSheet">
+ <string notr="true">background:none;</string>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="lblSensPitch">
+ <property name="minimumSize">
+ <size>
+ <width>25</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>150</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="layoutDirection">
+ <enum>Qt::RightToLeft</enum>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">color:#ccc;
+background:none;</string>
+ </property>
+ <property name="text">
+ <string>Pitch</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QCheckBox" name="chkInvertPitch">
+ <property name="styleSheet">
+ <string notr="true">background:none;</string>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="2">
+ <widget class="QLabel" name="lblSensY">
+ <property name="minimumSize">
+ <size>
+ <width>25</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>150</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="layoutDirection">
+ <enum>Qt::RightToLeft</enum>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">color:#ccc;
+background:none;</string>
+ </property>
+ <property name="text">
+ <string>Y</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="3">
+ <widget class="QCheckBox" name="chkInvertY">
+ <property name="styleSheet">
+ <string notr="true">background:none;</string>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="lblSensYaw">
+ <property name="minimumSize">
+ <size>
+ <width>25</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>150</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="layoutDirection">
+ <enum>Qt::RightToLeft</enum>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">color:#ccc;
+background:none;</string>
+ </property>
+ <property name="text">
+ <string>Yaw</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QCheckBox" name="chkInvertYaw">
+ <property name="styleSheet">
+ <string notr="true">background:none;</string>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2">
+ <widget class="QLabel" name="lblSensX">
+ <property name="minimumSize">
+ <size>
+ <width>25</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>150</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="layoutDirection">
+ <enum>Qt::RightToLeft</enum>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">color:#ccc;
+background:none;</string>
+ </property>
+ <property name="text">
+ <string>X</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="3">
+ <widget class="QCheckBox" name="chkInvertX">
+ <property name="styleSheet">
+ <string notr="true">background:none;</string>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLabel" name="lblInvert1_3">
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>30</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">color:#ccc;
+background:none;</string>
+ </property>
+ <property name="text">
+ <string>Invert</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="3">
+ <widget class="QLabel" name="lblInvert1_2">
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>30</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">color:#ccc;
+background:none;</string>
+ </property>
+ <property name="text">
+ <string>Invert</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_4">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item row="0" column="0">
+ <layout class="QHBoxLayout" name="horizontalLayout_4">
+ <item>
+ <widget class="QWidget" name="bubbleSmallWidget_2" native="true">
+ <property name="minimumSize">
+ <size>
+ <width>500</width>
+ <height>67</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>700</width>
+ <height>67</height>
+ </size>
+ </property>
+ <property name="acceptDrops">
+ <bool>true</bool>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">background: url(&quot;UIElements/bubble_1_small.png&quot;) no-repeat;
+opacity:100;</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_6">
+ <property name="spacing">
+ <number>0</number>
+ </property>
+ <property name="leftMargin">
+ <number>15</number>
+ </property>
+ <property name="topMargin">
+ <number>10</number>
+ </property>
+ <property name="rightMargin">
+ <number>10</number>
+ </property>
+ <property name="bottomMargin">
+ <number>10</number>
+ </property>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_5">
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QLabel" name="cameraName">
+ <property name="minimumSize">
+ <size>
+ <width>400</width>
+ <height>25</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>600</width>
+ <height>30</height>
+ </size>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">color:#ccc;
+background:none;</string>
+ </property>
+ <property name="text">
+ <string>Camera Name</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="gameName">
+ <property name="minimumSize">
+ <size>
+ <width>400</width>
+ <height>20</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>600</width>
+ <height>30</height>
+ </size>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">color:#ccc;
+background:none;</string>
+ </property>
+ <property name="text">
+ <string>Game Name</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="4" column="0">
+ <layout class="QGridLayout" name="gridLayout_5">
+ <property name="leftMargin">
+ <number>10</number>
+ </property>
+ <property name="verticalSpacing">
+ <number>6</number>
+ </property>
+ <item row="0" column="0">
+ <widget class="QGroupBox" name="groupTrackerSource">
+ <property name="minimumSize">
+ <size>
+ <width>200</width>
+ <height>80</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>200</width>
+ <height>80</height>
+ </size>
+ </property>
+ <property name="styleSheet">
+ <string notr="true"/>
+ </property>
+ <property name="title">
+ <string>Tracker Source(1st = Master)</string>
+ </property>
+ <widget class="QComboBox" name="iconcomboTrackerSource">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>20</y>
+ <width>180</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <property name="styleSheet">
+ <string notr="true"/>
+ </property>
+ <property name="currentIndex">
+ <number>-1</number>
+ </property>
+ <property name="maxVisibleItems">
+ <number>5</number>
+ </property>
+ </widget>
+ <widget class="QPushButton" name="btnShowEngineControls">
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>50</y>
+ <width>180</width>
+ <height>23</height>
+ </rect>
+ </property>
+ <property name="toolTip">
+ <string>Change tracker settings</string>
+ </property>
+ <property name="styleSheet">
+ <string notr="true"/>
+ </property>
+ <property name="text">
+ <string>Settings</string>
+ </property>
+ </widget>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QGroupBox" name="groupFilter">
+ <property name="minimumSize">
+ <size>
+ <width>200</width>
+ <height>70</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>200</width>
+ <height>80</height>
+ </size>
+ </property>
+ <property name="styleSheet">
+ <string notr="true"/>
+ </property>
+ <property name="title">
+ <string>Filter</string>
+ </property>
+ <widget class="QComboBox" name="iconcomboFilter">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>20</y>
+ <width>180</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <property name="styleSheet">
+ <string notr="true"/>
+ </property>
+ <property name="currentIndex">
+ <number>-1</number>
+ </property>
+ <property name="maxVisibleItems">
+ <number>7</number>
+ </property>
+ </widget>
+ <widget class="QPushButton" name="btnShowFilterControls">
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>50</y>
+ <width>180</width>
+ <height>23</height>
+ </rect>
+ </property>
+ <property name="toolTip">
+ <string>Change game protocol settings</string>
+ </property>
+ <property name="styleSheet">
+ <string notr="true"/>
+ </property>
+ <property name="text">
+ <string>Settings</string>
+ </property>
+ </widget>
+ </widget>
+ </item>
+ <item row="0" column="2">
+ <widget class="QGroupBox" name="groupGameProtocol">
+ <property name="minimumSize">
+ <size>
+ <width>200</width>
+ <height>80</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>200</width>
+ <height>80</height>
+ </size>
+ </property>
+ <property name="styleSheet">
+ <string notr="true"/>
+ </property>
+ <property name="title">
+ <string>Game protocol</string>
+ </property>
+ <widget class="QComboBox" name="iconcomboProtocol">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>20</y>
+ <width>180</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <property name="styleSheet">
+ <string notr="true"/>
+ </property>
+ <property name="currentIndex">
+ <number>-1</number>
+ </property>
+ <property name="maxVisibleItems">
+ <number>7</number>
+ </property>
+ </widget>
+ <widget class="QPushButton" name="btnShowServerControls">
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>50</y>
+ <width>180</width>
+ <height>23</height>
+ </rect>
+ </property>
+ <property name="toolTip">
+ <string>Change game protocol settings</string>
+ </property>
+ <property name="styleSheet">
+ <string notr="true"/>
+ </property>
+ <property name="text">
+ <string>Settings</string>
+ </property>
+ </widget>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QGroupBox" name="groupStartStop">
+ <property name="minimumSize">
+ <size>
+ <width>200</width>
+ <height>80</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>80</height>
+ </size>
+ </property>
+ <property name="title">
+ <string>GO!</string>
+ </property>
+ <widget class="QPushButton" name="btnStartTracker">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>20</y>
+ <width>81</width>
+ <height>23</height>
+ </rect>
+ </property>
+ <property name="toolTip">
+ <string>Start the Tracker</string>
+ </property>
+ <property name="styleSheet">
+ <string notr="true"/>
+ </property>
+ <property name="text">
+ <string>Start</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" name="btnStopTracker">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>100</x>
+ <y>20</y>
+ <width>81</width>
+ <height>23</height>
+ </rect>
+ </property>
+ <property name="toolTip">
+ <string>Stop the Tracker</string>
+ </property>
+ <property name="styleSheet">
+ <string notr="true"/>
+ </property>
+ <property name="text">
+ <string>Stop</string>
+ </property>
+ </widget>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QGroupBox" name="groupBox_3">
+ <property name="minimumSize">
+ <size>
+ <width>200</width>
+ <height>80</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>200</width>
+ <height>80</height>
+ </size>
+ </property>
+ <property name="title">
+ <string>Tracker Source (2nd)</string>
+ </property>
+ <widget class="QPushButton" name="btnShowSecondTrackerSettings">
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>50</y>
+ <width>180</width>
+ <height>23</height>
+ </rect>
+ </property>
+ <property name="toolTip">
+ <string>Change tracker settings</string>
+ </property>
+ <property name="styleSheet">
+ <string notr="true"/>
+ </property>
+ <property name="text">
+ <string>Settings</string>
+ </property>
+ </widget>
+ <widget class="QComboBox" name="cbxSecondTrackerSource">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>20</y>
+ <width>180</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <property name="styleSheet">
+ <string notr="true"/>
+ </property>
+ <property name="currentIndex">
+ <number>-1</number>
+ </property>
+ <property name="maxVisibleItems">
+ <number>5</number>
+ </property>
+ </widget>
+ </widget>
+ </item>
+ <item row="0" column="3">
+ <spacer name="horizontalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="1" column="2">
+ <layout class="QVBoxLayout" name="verticalLayout_3">
+ <item>
+ <widget class="QPushButton" name="btnShortcuts">
+ <property name="minimumSize">
+ <size>
+ <width>52</width>
+ <height>38</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>200</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="cursor">
+ <cursorShape>PointingHandCursor</cursorShape>
+ </property>
+ <property name="toolTip">
+ <string>Edit the Keyboard and mouse shortcuts</string>
+ </property>
+ <property name="text">
+ <string>Shortkeys</string>
+ </property>
+ <property name="icon">
+ <iconset resource="FaceTrackNoIR.qrc">
+ <normaloff>:/UIElements/Tools.png</normaloff>:/UIElements/Tools.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="btnEditCurves">
+ <property name="minimumSize">
+ <size>
+ <width>52</width>
+ <height>38</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>200</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="cursor">
+ <cursorShape>PointingHandCursor</cursorShape>
+ </property>
+ <property name="toolTip">
+ <string>Edit the Curve settings</string>
+ </property>
+ <property name="layoutDirection">
+ <enum>Qt::LeftToRight</enum>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">background:none;</string>
+ </property>
+ <property name="text">
+ <string>Curves</string>
+ </property>
+ <property name="icon">
+ <iconset resource="FaceTrackNoIR.qrc">
+ <normaloff>:/UIElements/Curves.png</normaloff>:/UIElements/Curves.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>120</width>
+ <height>24</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QMenuBar" name="menuBar">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>925</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">b</string>
+ </property>
+ <widget class="QMenu" name="menuFile">
+ <property name="title">
+ <string>File</string>
+ </property>
+ <addaction name="actionOpen"/>
+ <addaction name="actionSave"/>
+ <addaction name="actionSave_As"/>
+ <addaction name="separator"/>
+ <addaction name="actionExit"/>
+ </widget>
+ <widget class="QMenu" name="menuView">
+ <property name="title">
+ <string>View</string>
+ </property>
+ <addaction name="actionVideoWidget"/>
+ </widget>
+ <widget class="QMenu" name="menuOptions">
+ <property name="title">
+ <string>Options</string>
+ </property>
+ <addaction name="actionPreferences"/>
+ <addaction name="actionKeyboard_Shortcuts"/>
+ <addaction name="separator"/>
+ <addaction name="actionCurve_Configuration"/>
+ </widget>
+ <widget class="QMenu" name="menuHelp">
+ <property name="title">
+ <string>Help</string>
+ </property>
+ <addaction name="actionSupport"/>
+ <addaction name="actionYour_Support"/>
+ <addaction name="separator"/>
+ <addaction name="actionAbout"/>
+ </widget>
+ <addaction name="menuFile"/>
+ <addaction name="menuView"/>
+ <addaction name="menuOptions"/>
+ <addaction name="menuHelp"/>
+ </widget>
+ <action name="actionOpen">
+ <property name="text">
+ <string>&amp;Open</string>
+ </property>
+ <property name="shortcut">
+ <string>Ctrl+O</string>
+ </property>
+ <property name="iconVisibleInMenu">
+ <bool>false</bool>
+ </property>
+ </action>
+ <action name="actionExit">
+ <property name="text">
+ <string>&amp;Exit</string>
+ </property>
+ <property name="shortcut">
+ <string>Ctrl+Q</string>
+ </property>
+ <property name="menuRole">
+ <enum>QAction::QuitRole</enum>
+ </property>
+ <property name="iconVisibleInMenu">
+ <bool>false</bool>
+ </property>
+ </action>
+ <action name="actionPlayPause">
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ <property name="text">
+ <string>Play / Pause</string>
+ </property>
+ <property name="iconVisibleInMenu">
+ <bool>false</bool>
+ </property>
+ </action>
+ <action name="actionNext">
+ <property name="text">
+ <string>Next</string>
+ </property>
+ <property name="shortcut">
+ <string>Ctrl+.</string>
+ </property>
+ <property name="iconVisibleInMenu">
+ <bool>false</bool>
+ </property>
+ </action>
+ <action name="actionPreviews">
+ <property name="text">
+ <string>Previews</string>
+ </property>
+ <property name="shortcut">
+ <string>Ctrl+,</string>
+ </property>
+ <property name="iconVisibleInMenu">
+ <bool>false</bool>
+ </property>
+ </action>
+ <action name="actionVolumeUp">
+ <property name="text">
+ <string>Volume Up</string>
+ </property>
+ <property name="shortcut">
+ <string>Ctrl++</string>
+ </property>
+ <property name="iconVisibleInMenu">
+ <bool>false</bool>
+ </property>
+ </action>
+ <action name="actionVolumeDown">
+ <property name="text">
+ <string>Volume Down</string>
+ </property>
+ <property name="shortcut">
+ <string>Ctrl+-</string>
+ </property>
+ <property name="iconVisibleInMenu">
+ <bool>false</bool>
+ </property>
+ </action>
+ <action name="actionVideoWidget">
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="text">
+ <string>Video Widget</string>
+ </property>
+ <property name="shortcut">
+ <string>Ctrl+V</string>
+ </property>
+ </action>
+ <action name="actionHeadPoseWidget">
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ <property name="text">
+ <string>HeadPose Widget</string>
+ </property>
+ <property name="shortcut">
+ <string>Ctrl+W</string>
+ </property>
+ </action>
+ <action name="actionAbout">
+ <property name="text">
+ <string>About FaceTrackNoIR</string>
+ </property>
+ <property name="shortcut">
+ <string>Ctrl+A</string>
+ </property>
+ </action>
+ <action name="actionMute">
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ <property name="text">
+ <string>Mute</string>
+ </property>
+ <property name="shortcut">
+ <string>Ctrl+M</string>
+ </property>
+ </action>
+ <action name="actionSave">
+ <property name="text">
+ <string>Save</string>
+ </property>
+ </action>
+ <action name="actionSave_As">
+ <property name="text">
+ <string>Save As</string>
+ </property>
+ </action>
+ <action name="actionKeyboard_Shortcuts">
+ <property name="text">
+ <string>Keyboard and Mouse Shortcuts</string>
+ </property>
+ </action>
+ <action name="actionPreferences">
+ <property name="text">
+ <string>Preferences</string>
+ </property>
+ </action>
+ <action name="actionCurve_Configuration">
+ <property name="text">
+ <string>Curve Configuration</string>
+ </property>
+ </action>
+ <action name="actionSupport">
+ <property name="text">
+ <string>Support</string>
+ </property>
+ </action>
+ <action name="actionYour_Support">
+ <property name="text">
+ <string>Your Support</string>
+ </property>
+ </action>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <tabstops>
+ <tabstop>iconcomboTrackerSource</tabstop>
+ <tabstop>btnStartTracker</tabstop>
+ <tabstop>btnStopTracker</tabstop>
+ <tabstop>btnShowEngineControls</tabstop>
+ <tabstop>iconcomboProtocol</tabstop>
+ </tabstops>
+ <resources>
+ <include location="FaceTrackNoIR.qrc"/>
+ </resources>
+ <connections>
+ <connection>
+ <sender>slideSmoothing</sender>
+ <signal>valueChanged(int)</signal>
+ <receiver>spinSmoothing</receiver>
+ <slot>setValue(int)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>442</x>
+ <y>387</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>494</x>
+ <y>389</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>spinSmoothing</sender>
+ <signal>valueChanged(int)</signal>
+ <receiver>slideSmoothing</receiver>
+ <slot>setValue(int)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>494</x>
+ <y>389</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>442</x>
+ <y>387</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/facetracknoir/FaceTrackNoIR_vc8.vcproj b/facetracknoir/FaceTrackNoIR_vc8.vcproj
new file mode 100644
index 00000000..524e7826
--- /dev/null
+++ b/facetracknoir/FaceTrackNoIR_vc8.vcproj
@@ -0,0 +1,892 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8,00"
+ Name="FaceTrackNoIR"
+ ProjectGUID="{9DCDB5B9-941E-42F7-AF76-DF794AA3C013}"
+ RootNamespace="FaceTrackNoIR"
+ Keyword="Qt4VSv1.0"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)/bin"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="0"
+ ManagedExtensions="0"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine="postbuild.bat &quot;$(QTDIR)\plugins\designer\QFunctionConfigurator.dll&quot; &quot;$(OutDir)&quot; $(ConfigurationName)"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="0"
+ EnableIntrinsicFunctions="true"
+ FavorSizeOrSpeed="1"
+ OmitFramePointers="false"
+ EnableFiberSafeOptimizations="false"
+ WholeProgramOptimization="false"
+ AdditionalIncludeDirectories=".\GeneratedFiles;&quot;$(QTDIR)\include&quot;;&quot;.\GeneratedFiles\$(ConfigurationName)&quot;;&quot;$(QTDIR)\include\QtCore&quot;;&quot;$(QTDIR)\include\QtNetwork&quot;;&quot;$(QTDIR)\include\QtGui&quot;;&quot;$(QTDIR)\include\QtOpenGL&quot;;&quot;$(SolutionDir)\FTNoIR_Tracker_UDP&quot;;&quot;$(SolutionDir)\FTNoIR_Tracker_UDP\GeneratedFiles&quot;;&quot;$(SolutionDir)\FTNoIR_Filter_EWMA2&quot;;&quot;C:\Program Files (x86)\Microsoft DirectX SDK (February 2010)\Include&quot;;&quot;$(SolutionDir)\QFunctionConfigurator\QFunctionConfigurator&quot;;&quot;C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include&quot;;&quot;C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include&quot;;&quot;$(SolutionDir)\bin&quot;"
+ PreprocessorDefinitions="UNICODE;WIN32;QT_LARGEFILE_SUPPORT;QT_THREAD_SUPPORT;QT_NO_DEBUG;QT_CORE_LIB;QT_GUI_LIB;QT_OPENGL_LIB;QT_NETWORK_LIB;QT_DLL"
+ RuntimeLibrary="2"
+ FloatingPointModel="0"
+ TreatWChar_tAsBuiltInType="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ WarnAsError="true"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ CommandLine=""
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="opengl32.lib qtmain.lib QtCore4.lib QtGui4.lib QtOpenGL4.lib QtNetwork4.lib Strmiids.lib Ws2_32.lib QFunctionConfigurator.lib"
+ OutputFile="$(OutDir)\$(ProjectName).exe"
+ AdditionalLibraryDirectories="&quot;$(QTDIR)\lib&quot;;&quot;$(SolutionDir)\bin&quot;;&quot;$(SolutionDir)\QFunctionConfigurator\QFunctionConfigurator\Release&quot;;&quot;$(SolutionDir)\dinput&quot;"
+ GenerateManifest="true"
+ IgnoreDefaultLibraryNames=""
+ GenerateDebugInformation="true"
+ AssemblyDebug="0"
+ SubSystem="2"
+ AllowIsolation="true"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ EmbedManifest="true"
+ UpdateFileHashes="true"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine=""
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)\bin_dbg"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine="postbuild.bat &quot;$(QTDIR)\plugins\designer\QBezierConfigurator.dll&quot; &quot;$(OutDir)&quot; $(ConfigurationName)"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="4"
+ AdditionalIncludeDirectories="&quot;C:\Program Files (x86)\Microsoft DirectX SDK (February 2010)\Include&quot;;.\GeneratedFiles;&quot;$(QTDIR)\include&quot;;&quot;.\GeneratedFiles\$(ConfigurationName)&quot;;&quot;$(QTDIR)\include\QtCore&quot;;&quot;$(QTDIR)\include\QtGui&quot;;&quot;$(QTDIR)\include\QtNetwork&quot;;&quot;$(QTDIR)\include\QtOpenGL&quot;;.;&quot;$(SolutionDir)\QFunctionConfigurator\QFunctionConfigurator&quot;;&quot;C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include&quot;"
+ PreprocessorDefinitions="UNICODE;WIN32,QT_LARGEFILE_SUPPORT,QT_THREAD_SUPPORT,QT_CORE_LIB,QT_GUI_LIB,QT_OPENGL_LIB;QT_DLL"
+ RuntimeLibrary="3"
+ TreatWChar_tAsBuiltInType="true"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="qtmaind.lib QtCored4.lib QtGuid4.lib QtOpenGL4.lib QtNetworkd4.lib Strmiids.lib QFunctionConfigurator.lib"
+ OutputFile="$(OutDir)\$(ProjectName).exe"
+ AdditionalLibraryDirectories="&quot;$(QTDIR)\lib&quot;;&quot;$(SolutionDir)\dinput&quot;;&quot;$(SolutionDir)\bin&quot;"
+ IgnoreAllDefaultLibraries="false"
+ IgnoreDefaultLibraryNames=""
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ UseFAT32Workaround="true"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="mt.exe -manifest &quot;$(InputDir)SCServer.manifest&quot; -outputresource:&quot;$(OutDir)\$(TargetFileName)&quot;;^#101"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Sources"
+ Filter="cpp;cxx;c;def"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\FaceApp.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\FaceTrackNoIR.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\FTNoIR_PoseWidget\glwidget.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\main.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\rotation.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\tracker.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\tracker_types.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Headers"
+ Filter="h"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\FaceApp.h"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Moc&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\moc.exe&quot; &quot;$(InputPath)&quot; -o &quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot; -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_THREAD_SUPPORT -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_NETWORK_LIB -DQT_DLL &quot;-I.\GeneratedFiles&quot; &quot;-I$(QTDIR)\include&quot; &quot;-I.\GeneratedFiles\$(ConfigurationName)\.&quot; &quot;-I$(QTDIR)\include\QtCore&quot; &quot;-I$(QTDIR)\include\QtNetwork&quot; &quot;-I$(QTDIR)\include\QtGui&quot; &quot;-I$(QTDIR)\include\QtOpenGL&quot; &quot;-I$(SolutionDir)\FTNoIR_Tracker_UDP&quot; &quot;-I$(SolutionDir)\FTNoIR_Tracker_UDP\GeneratedFiles&quot; &quot;-I$(SolutionDir)\FTNoIR_Filter_EWMA2&quot; &quot;-IC:\Program Files (x86)\Microsoft DirectX SDK (February 2010)\Include&quot; &quot;-I$(SolutionDir)\QFunctionConfigurator\QFunctionConfigurator&quot; &quot;-IC:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include&quot; &quot;-IC:\Program Files\Microsoft SDKs\Windows\v6.0A\Include&quot; &quot;-I$(SolutionDir)\bin&quot;&#x0D;&#x0A;"
+ AdditionalDependencies="&quot;$(QTDIR)\bin\moc.exe&quot;;$(InputPath)"
+ Outputs="&quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot;"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Moc&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\moc.exe&quot; -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_THREAD_SUPPORT -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_DLL &quot;-IC:\Program Files (x86)\Microsoft DirectX SDK (February 2010)\Include&quot; &quot;-I.\GeneratedFiles&quot; &quot;-I$(QTDIR)\include&quot; &quot;-I.\GeneratedFiles\$(ConfigurationName)\.&quot; &quot;-I$(QTDIR)\include\QtCore&quot; &quot;-I$(QTDIR)\include\QtGui&quot; &quot;-I$(QTDIR)\include\QtNetwork&quot; &quot;-I$(QTDIR)\include\QtOpenGL&quot; &quot;-I.&quot; &quot;-I$(SolutionDir)\QFunctionConfigurator\QFunctionConfigurator&quot; &quot;-IC:\Program Files\Microsoft SDKs\Windows\v6.0A\Include&quot; &quot;$(InputPath)&quot; -o &quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
+ AdditionalDependencies="&quot;$(QTDIR)\bin\moc.exe&quot;;$(InputPath)"
+ Outputs="&quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot;"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\FaceTrackNoIR.h"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Moc&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\moc.exe&quot; &quot;$(InputPath)&quot; -o &quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot; -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_THREAD_SUPPORT -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_NETWORK_LIB -DQT_DLL &quot;-I.\GeneratedFiles&quot; &quot;-I$(QTDIR)\include&quot; &quot;-I.\GeneratedFiles\$(ConfigurationName)\.&quot; &quot;-I$(QTDIR)\include\QtCore&quot; &quot;-I$(QTDIR)\include\QtNetwork&quot; &quot;-I$(QTDIR)\include\QtGui&quot; &quot;-I$(QTDIR)\include\QtOpenGL&quot; &quot;-I$(SolutionDir)\FTNoIR_Tracker_UDP&quot; &quot;-I$(SolutionDir)\FTNoIR_Tracker_UDP\GeneratedFiles&quot; &quot;-I$(SolutionDir)\FTNoIR_Filter_EWMA2&quot; &quot;-IC:\Program Files (x86)\Microsoft DirectX SDK (February 2010)\Include&quot; &quot;-I$(SolutionDir)\QFunctionConfigurator\QFunctionConfigurator&quot; &quot;-IC:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include&quot; &quot;-IC:\Program Files\Microsoft SDKs\Windows\v6.0A\Include&quot; &quot;-I$(SolutionDir)\bin&quot;&#x0D;&#x0A;"
+ AdditionalDependencies="&quot;$(QTDIR)\bin\moc.exe&quot;;$(InputPath)"
+ Outputs="&quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot;"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Moc&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\moc.exe&quot; -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_THREAD_SUPPORT -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_DLL &quot;-IC:\Program Files (x86)\Microsoft DirectX SDK (February 2010)\Include&quot; &quot;-I.\GeneratedFiles&quot; &quot;-I$(QTDIR)\include&quot; &quot;-I.\GeneratedFiles\$(ConfigurationName)\.&quot; &quot;-I$(QTDIR)\include\QtCore&quot; &quot;-I$(QTDIR)\include\QtGui&quot; &quot;-I$(QTDIR)\include\QtNetwork&quot; &quot;-I$(QTDIR)\include\QtOpenGL&quot; &quot;-I.&quot; &quot;-I$(SolutionDir)\QFunctionConfigurator\QFunctionConfigurator&quot; &quot;-IC:\Program Files\Microsoft SDKs\Windows\v6.0A\Include&quot; &quot;$(InputPath)&quot; -o &quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
+ AdditionalDependencies="&quot;$(QTDIR)\bin\moc.exe&quot;;$(InputPath)"
+ Outputs="&quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot;"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\FTNoIR_PoseWidget\glwidget.h"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Moc&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\moc.exe&quot; &quot;$(InputPath)&quot; -o &quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot; -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_THREAD_SUPPORT -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_NETWORK_LIB -DQT_DLL &quot;-I.\GeneratedFiles&quot; &quot;-I$(QTDIR)\include&quot; &quot;-I.\GeneratedFiles\$(ConfigurationName)\.&quot; &quot;-I$(QTDIR)\include\QtCore&quot; &quot;-I$(QTDIR)\include\QtNetwork&quot; &quot;-I$(QTDIR)\include\QtGui&quot; &quot;-I$(QTDIR)\include\QtOpenGL&quot; &quot;-I$(SolutionDir)\FTNoIR_Tracker_UDP&quot; &quot;-I$(SolutionDir)\FTNoIR_Tracker_UDP\GeneratedFiles&quot; &quot;-I$(SolutionDir)\FTNoIR_Filter_EWMA2&quot; &quot;-IC:\Program Files (x86)\Microsoft DirectX SDK (February 2010)\Include&quot; &quot;-I$(SolutionDir)\QFunctionConfigurator\QFunctionConfigurator&quot; &quot;-IC:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include&quot; &quot;-IC:\Program Files\Microsoft SDKs\Windows\v6.0A\Include&quot; &quot;-I$(SolutionDir)\bin&quot;&#x0D;&#x0A;"
+ AdditionalDependencies="&quot;$(QTDIR)\bin\moc.exe&quot;;$(InputPath)"
+ Outputs="&quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot;"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Moc&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\moc.exe&quot; -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_THREAD_SUPPORT -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_DLL &quot;-IC:\Program Files (x86)\Microsoft DirectX SDK (February 2010)\Include&quot; &quot;-I.\GeneratedFiles&quot; &quot;-I$(QTDIR)\include&quot; &quot;-I.\GeneratedFiles\$(ConfigurationName)\.&quot; &quot;-I$(QTDIR)\include\QtCore&quot; &quot;-I$(QTDIR)\include\QtGui&quot; &quot;-I$(QTDIR)\include\QtNetwork&quot; &quot;-I$(QTDIR)\include\QtOpenGL&quot; &quot;-I.&quot; &quot;-I$(SolutionDir)\QFunctionConfigurator\QFunctionConfigurator&quot; &quot;-IC:\Program Files\Microsoft SDKs\Windows\v6.0A\Include&quot; &quot;$(InputPath)&quot; -o &quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
+ AdditionalDependencies="&quot;$(QTDIR)\bin\moc.exe&quot;;$(InputPath)"
+ Outputs="&quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot;"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\resource.h"
+ >
+ </File>
+ <File
+ RelativePath=".\rotation.h"
+ >
+ </File>
+ <File
+ RelativePath=".\tracker.h"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Moc&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\moc.exe&quot; &quot;$(InputPath)&quot; -o &quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot; -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_THREAD_SUPPORT -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_NETWORK_LIB -DQT_DLL &quot;-I.\GeneratedFiles&quot; &quot;-I$(QTDIR)\include&quot; &quot;-I.\GeneratedFiles\$(ConfigurationName)\.&quot; &quot;-I$(QTDIR)\include\QtCore&quot; &quot;-I$(QTDIR)\include\QtNetwork&quot; &quot;-I$(QTDIR)\include\QtGui&quot; &quot;-I$(QTDIR)\include\QtOpenGL&quot; &quot;-I$(SolutionDir)\FTNoIR_Tracker_UDP&quot; &quot;-I$(SolutionDir)\FTNoIR_Tracker_UDP\GeneratedFiles&quot; &quot;-I$(SolutionDir)\FTNoIR_Filter_EWMA2&quot; &quot;-IC:\Program Files (x86)\Microsoft DirectX SDK (February 2010)\Include&quot; &quot;-I$(SolutionDir)\QFunctionConfigurator\QFunctionConfigurator&quot; &quot;-IC:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include&quot; &quot;-IC:\Program Files\Microsoft SDKs\Windows\v6.0A\Include&quot; &quot;-I$(SolutionDir)\bin&quot;&#x0D;&#x0A;"
+ AdditionalDependencies="&quot;$(QTDIR)\bin\moc.exe&quot;;$(InputPath)"
+ Outputs="&quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot;"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Moc&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\moc.exe&quot; -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_THREAD_SUPPORT -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_DLL &quot;-IC:\Program Files (x86)\Microsoft DirectX SDK (February 2010)\Include&quot; &quot;-I.\GeneratedFiles&quot; &quot;-I$(QTDIR)\include&quot; &quot;-I.\GeneratedFiles\$(ConfigurationName)\.&quot; &quot;-I$(QTDIR)\include\QtCore&quot; &quot;-I$(QTDIR)\include\QtGui&quot; &quot;-I$(QTDIR)\include\QtNetwork&quot; &quot;-I$(QTDIR)\include\QtOpenGL&quot; &quot;-I.&quot; &quot;-I$(SolutionDir)\QFunctionConfigurator\QFunctionConfigurator&quot; &quot;-IC:\Program Files\Microsoft SDKs\Windows\v6.0A\Include&quot; &quot;$(InputPath)&quot; -o &quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
+ AdditionalDependencies="&quot;$(QTDIR)\bin\moc.exe&quot;;$(InputPath)"
+ Outputs="&quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot;"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\tracker_types.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="FormsQt"
+ Filter="ui"
+ UniqueIdentifier="{99349809-55BA-4b9d-BF79-8FDBB0286EB3}"
+ >
+ <File
+ RelativePath=".\FaceTrackNoIR.ui"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Uic&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\uic.exe&quot; -o &quot;.\GeneratedFiles\ui_$(InputName).h&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
+ AdditionalDependencies="$(QTDIR)\bin\uic.exe"
+ Outputs="&quot;.\GeneratedFiles\ui_$(InputName).h&quot;"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Uic&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\uic.exe&quot; -o &quot;.\GeneratedFiles\ui_$(InputName).h&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
+ AdditionalDependencies="$(QTDIR)\bin\uic.exe"
+ Outputs="&quot;.\GeneratedFiles\ui_$(InputName).h&quot;"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\FTNoIR_Curves.ui"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Uic&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\uic.exe&quot; -o &quot;.\GeneratedFiles\ui_$(InputName).h&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
+ AdditionalDependencies="$(QTDIR)\bin\uic.exe"
+ Outputs="&quot;.\GeneratedFiles\ui_$(InputName).h&quot;"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Uic&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\uic.exe&quot; -o &quot;.\GeneratedFiles\ui_$(InputName).h&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
+ AdditionalDependencies="$(QTDIR)\bin\uic.exe"
+ Outputs="&quot;.\GeneratedFiles\ui_$(InputName).h&quot;"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\FTNoIR_KeyboardShortcuts.ui"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Uic&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\uic.exe&quot; -o &quot;.\GeneratedFiles\ui_$(InputName).h&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
+ AdditionalDependencies="$(QTDIR)\bin\uic.exe"
+ Outputs="&quot;.\GeneratedFiles\ui_$(InputName).h&quot;"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Uic&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\uic.exe&quot; -o &quot;.\GeneratedFiles\ui_$(InputName).h&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
+ AdditionalDependencies="$(QTDIR)\bin\uic.exe"
+ Outputs="&quot;.\GeneratedFiles\ui_$(InputName).h&quot;"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\FTNoIR_Preferences.ui"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Uic&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\uic.exe&quot; -o &quot;.\GeneratedFiles\ui_$(InputName).h&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
+ AdditionalDependencies="$(QTDIR)\bin\uic.exe"
+ Outputs="&quot;.\GeneratedFiles\ui_$(InputName).h&quot;"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Uic&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\uic.exe&quot; -o &quot;.\GeneratedFiles\ui_$(InputName).h&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
+ AdditionalDependencies="$(QTDIR)\bin\uic.exe"
+ Outputs="&quot;.\GeneratedFiles\ui_$(InputName).h&quot;"
+ />
+ </FileConfiguration>
+ </File>
+ <Filter
+ Name="UIElements"
+ >
+ <File
+ RelativePath=".\UIElements\aboutFaceTrackNoIR.png"
+ >
+ </File>
+ <File
+ RelativePath=".\UIElements\bubble_1_small.png"
+ >
+ </File>
+ <File
+ RelativePath=".\UIElements\bubble_2_big.png"
+ >
+ </File>
+ <File
+ RelativePath=".\UIElements\Logo_FaceTrackNoIR_32px.png"
+ >
+ </File>
+ </Filter>
+ </Filter>
+ <Filter
+ Name="Generated"
+ Filter="moc;h;cpp"
+ UniqueIdentifier="{71ED8ED8-ACB9-4CE9-BBE1-E00B30144E11}"
+ SourceControlFiles="false"
+ >
+ <File
+ RelativePath=".\GeneratedFiles\qrc_FaceTrackNoIR.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="0"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="0"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\GeneratedFiles\qrc_PoseWidget.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="0"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="0"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\GeneratedFiles\ui_FaceTrackNoIR.h"
+ >
+ </File>
+ <File
+ RelativePath=".\GeneratedFiles\ui_FTNoIR_Curves.h"
+ >
+ </File>
+ <File
+ RelativePath=".\GeneratedFiles\ui_FTNoIR_KeyboardShortcuts.h"
+ >
+ </File>
+ <File
+ RelativePath=".\GeneratedFiles\ui_FTNoIR_Preferences.h"
+ >
+ </File>
+ <Filter
+ Name="Release"
+ Filter="cpp;moc"
+ SourceControlFiles="false"
+ >
+ <File
+ RelativePath=".\GeneratedFiles\Release\moc_FaceApp.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\GeneratedFiles\Release\moc_FaceTrackNoIR.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\GeneratedFiles\Release\moc_glwidget.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\GeneratedFiles\Release\moc_tracker.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Debug"
+ Filter="cpp;moc"
+ SourceControlFiles="false"
+ >
+ <File
+ RelativePath=".\GeneratedFiles\Debug\moc_FaceApp.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\GeneratedFiles\Debug\moc_FaceTrackNoIR.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\GeneratedFiles\Debug\moc_glwidget.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ ObjectFile="$(IntDir)\$(InputName)1.obj"
+ XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ ObjectFile="$(IntDir)\$(InputName)1.obj"
+ XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\GeneratedFiles\Debug\moc_tracker.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ </Filter>
+ <Filter
+ Name="Media"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="qrc;*"
+ UniqueIdentifier="{D9D6E242-F8AF-46E4-B9FD-80ECBC20BA3E}"
+ ParseFiles="false"
+ >
+ <File
+ RelativePath=".\FaceTrackNoIR.ico"
+ >
+ </File>
+ <File
+ RelativePath=".\FaceTrackNoIR.qrc"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Rcc&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\rcc.exe&quot; -name &quot;$(InputName)&quot; -no-compress &quot;$(InputPath)&quot; -o .\GeneratedFiles\qrc_$(InputName).cpp&#x0D;&#x0A;"
+ AdditionalDependencies="$(InputPath);.\bad.svg;.\heart.svg;.\trash.svg"
+ Outputs=".\GeneratedFiles\qrc_$(InputName).cpp"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Rcc&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\rcc.exe&quot; -name &quot;$(InputName)&quot; -no-compress &quot;$(InputPath)&quot; -o .\GeneratedFiles\qrc_$(InputName).cpp&#x0D;&#x0A;"
+ AdditionalDependencies="$(InputPath);.\bad.svg;.\heart.svg;.\trash.svg"
+ Outputs=".\GeneratedFiles\qrc_$(InputName).cpp"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\images\FlightGear.ico"
+ >
+ </File>
+ <File
+ RelativePath=".\images\Freetrack.ico"
+ >
+ </File>
+ <File
+ RelativePath="..\FTNoIR_PoseWidget\PoseWidget.qrc"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Rcc&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\rcc.exe&quot; -name &quot;$(InputName)&quot; -no-compress &quot;$(InputPath)&quot; -o .\GeneratedFiles\qrc_$(InputName).cpp&#x0D;&#x0A;"
+ AdditionalDependencies="$(InputPath);..\FTNoIR_PoseWidget\images\side1.png;..\FTNoIR_PoseWidget\images\side2.png;..\FTNoIR_PoseWidget\images\side3.png;..\FTNoIR_PoseWidget\images\side4.png;..\FTNoIR_PoseWidget\images\side5.png;..\FTNoIR_PoseWidget\images\side6.png"
+ Outputs=".\GeneratedFiles\qrc_$(InputName).cpp"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Rcc&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\rcc.exe&quot; -name &quot;$(InputName)&quot; -no-compress &quot;$(InputPath)&quot; -o .\GeneratedFiles\qrc_$(InputName).cpp&#x0D;&#x0A;"
+ AdditionalDependencies="$(InputPath);..\FTNoIR_PoseWidget\images\side1.png;..\FTNoIR_PoseWidget\images\side2.png;..\FTNoIR_PoseWidget\images\side3.png;..\FTNoIR_PoseWidget\images\side4.png;..\FTNoIR_PoseWidget\images\side5.png;..\FTNoIR_PoseWidget\images\side6.png"
+ Outputs=".\GeneratedFiles\qrc_$(InputName).cpp"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\images\SeeingMachines.ico"
+ >
+ </File>
+ <File
+ RelativePath="..\FTNoIR_PoseWidget\images\side1.png"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\FTNoIR_PoseWidget\images\side2.png"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\FTNoIR_PoseWidget\images\side3.png"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\FTNoIR_PoseWidget\images\side4.png"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\FTNoIR_PoseWidget\images\side5.png"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\FTNoIR_PoseWidget\images\side6.png"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <File
+ RelativePath=".\FaceTrackNoIR.rc"
+ >
+ </File>
+ </Files>
+ <Globals>
+ <Global
+ Name="lupdateOnBuild"
+ Value="1"
+ />
+ <Global
+ Name="MocDir"
+ Value=".\GeneratedFiles\$(ConfigurationName)"
+ />
+ <Global
+ Name="MocOptions"
+ Value=""
+ />
+ <Global
+ Name="QtVersion Win32"
+ Value="qt-everywhere-opensource-src-4.6.2"
+ />
+ <Global
+ Name="RccDir"
+ Value=".\GeneratedFiles"
+ />
+ <Global
+ Name="UicDir"
+ Value=".\GeneratedFiles"
+ />
+ </Globals>
+</VisualStudioProject>
diff --git a/facetracknoir/FaceTrackNoIR_vc9.vcproj b/facetracknoir/FaceTrackNoIR_vc9.vcproj
new file mode 100644
index 00000000..56b5e1d5
--- /dev/null
+++ b/facetracknoir/FaceTrackNoIR_vc9.vcproj
@@ -0,0 +1,886 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="FaceTrackNoIR"
+ ProjectGUID="{9DCDB5B9-941E-42F7-AF76-DF794AA3C013}"
+ RootNamespace="FaceTrackNoIR"
+ Keyword="Qt4VSv1.0"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)/bin"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="0"
+ ManagedExtensions="0"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine="postbuild.bat &quot;$(QTDIR)\plugins\designer\QFunctionConfigurator.dll&quot; &quot;$(OutDir)&quot; $(ConfigurationName)"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="4"
+ EnableIntrinsicFunctions="false"
+ FavorSizeOrSpeed="0"
+ OmitFramePointers="false"
+ EnableFiberSafeOptimizations="false"
+ WholeProgramOptimization="false"
+ AdditionalIncludeDirectories=".\GeneratedFiles;&quot;.\GeneratedFiles\$(ConfigurationName)&quot;;&quot;$(QTDIR)\include&quot;;&quot;$(QTDIR)\include\QtCore&quot;;&quot;$(QTDIR)\include\QtNetwork&quot;;&quot;$(QTDIR)\include\QtGui&quot;;&quot;$(QTDIR)\include\QtOpenGL&quot;;&quot;$(QTDIR)\include\QtWebKit&quot;;&quot;$(QTDIR)\include\QtTest&quot;;&quot;$(SolutionDir)\QFunctionConfigurator\QFunctionConfigurator&quot;;&quot;$(DXSDK_DIR)\Include&quot;"
+ PreprocessorDefinitions="UNICODE;WIN32;QT_LARGEFILE_SUPPORT;QT_THREAD_SUPPORT;QT_NO_DEBUG;QT_CORE_LIB;QT_GUI_LIB;QT_OPENGL_LIB;QT_NETWORK_LIB;QT_DLL"
+ RuntimeLibrary="2"
+ FloatingPointModel="2"
+ TreatWChar_tAsBuiltInType="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ WarnAsError="true"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ CommandLine=""
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="opengl32.lib qtmain.lib QtCore4.lib QtGui4.lib QtOpenGL4.lib QtNetwork4.lib Strmiids.lib QFunctionConfigurator.lib"
+ OutputFile="$(OutDir)\$(ProjectName).exe"
+ AdditionalLibraryDirectories="&quot;$(QTDIR)\lib&quot;;&quot;$(SolutionDir)\QFunctionConfigurator\release&quot;;&quot;$(DXSDK_DIR)\Lib\x86&quot;"
+ GenerateManifest="true"
+ IgnoreDefaultLibraryNames="libc.lib;libcmt.lib;libcd.lib;libcmtd;msvcrtd.lib"
+ GenerateDebugInformation="false"
+ AssemblyDebug="0"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ AllowIsolation="true"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ EmbedManifest="true"
+ UpdateFileHashes="true"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine=""
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)\bin_dbg"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine="postbuild.bat &quot;$(QTDIR)\plugins\designer\QBezierConfigurator.dll&quot; &quot;$(OutDir)&quot; $(ConfigurationName)"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="4"
+ AdditionalIncludeDirectories=".\GeneratedFiles;&quot;.\GeneratedFiles\$(ConfigurationName)&quot;;&quot;$(QTDIR)\include&quot;;&quot;$(QTDIR)\include\QtCore&quot;;&quot;$(QTDIR)\include\QtNetwork&quot;;&quot;$(QTDIR)\include\QtGui&quot;;&quot;$(QTDIR)\include\QtOpenGL&quot;;&quot;$(QTDIR)\include\QtWebKit&quot;;&quot;$(QTDIR)\include\QtTest&quot;;&quot;$(SolutionDir)\QFunctionConfigurator\QFunctionConfigurator&quot;;&quot;$(DXSDK_DIR)\Include&quot;"
+ PreprocessorDefinitions="UNICODE;WIN32,QT_LARGEFILE_SUPPORT,QT_THREAD_SUPPORT,QT_CORE_LIB,QT_GUI_LIB,QT_OPENGL_LIB;QT_DLL"
+ RuntimeLibrary="3"
+ TreatWChar_tAsBuiltInType="true"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="opengl32.lib qtmaind.lib QtCored4.lib QtGuid4.lib QtOpenGLd4.lib QtNetworkd4.lib Strmiids.lib QFunctionConfigurator.lib"
+ OutputFile="$(OutDir)\$(ProjectName).exe"
+ AdditionalLibraryDirectories="&quot;$(QTDIR)\lib&quot;;&quot;$(SolutionDir)\QFunctionConfigurator\debug&quot;;&quot;$(DXSDK_DIR)\Lib\x86&quot;"
+ IgnoreDefaultLibraryNames=""
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine=""
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Sources"
+ Filter="cpp;cxx;c;def"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\FaceApp.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\FaceTrackNoIR.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\FTNoIR_PoseWidget\glwidget.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\main.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\rotation.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\tracker.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\tracker_types.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Headers"
+ Filter="h"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\FaceApp.h"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Moc&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\moc.exe&quot; &quot;$(InputPath)&quot; -o &quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot; -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_THREAD_SUPPORT -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_NETWORK_LIB -DQT_DLL &quot;-I.\GeneratedFiles&quot; &quot;-I.\GeneratedFiles\$(ConfigurationName)\.&quot; &quot;-I$(QTDIR)\include&quot; &quot;-I$(QTDIR)\include\QtCore&quot; &quot;-I$(QTDIR)\include\QtNetwork&quot; &quot;-I$(QTDIR)\include\QtGui&quot; &quot;-I$(QTDIR)\include\QtOpenGL&quot; &quot;-I$(QTDIR)\include\QtWebKit&quot; &quot;-I$(QTDIR)\include\QtTest&quot; &quot;-I$(SolutionDir)\QFunctionConfigurator\QFunctionConfigurator&quot; &quot;-I$(DXSDK_DIR)\Include&quot;&#x0D;&#x0A;"
+ AdditionalDependencies="&quot;$(QTDIR)\bin\moc.exe&quot;;$(InputPath)"
+ Outputs="&quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot;"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Moc&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\moc.exe&quot; &quot;$(InputPath)&quot; -o &quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot; -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_THREAD_SUPPORT -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_DLL &quot;-I.\GeneratedFiles&quot; &quot;-I.\GeneratedFiles\$(ConfigurationName)\.&quot; &quot;-I$(QTDIR)\include&quot; &quot;-I$(QTDIR)\include\QtCore&quot; &quot;-I$(QTDIR)\include\QtNetwork&quot; &quot;-I$(QTDIR)\include\QtGui&quot; &quot;-I$(QTDIR)\include\QtOpenGL&quot; &quot;-I$(QTDIR)\include\QtWebKit&quot; &quot;-I$(QTDIR)\include\QtTest&quot; &quot;-I$(SolutionDir)\QFunctionConfigurator\QFunctionConfigurator&quot; &quot;-I$(DXSDK_DIR)\Include&quot;&#x0D;&#x0A;"
+ AdditionalDependencies="&quot;$(QTDIR)\bin\moc.exe&quot;;$(InputPath)"
+ Outputs="&quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot;"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\FaceTrackNoIR.h"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Moc&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\moc.exe&quot; &quot;$(InputPath)&quot; -o &quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot; -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_THREAD_SUPPORT -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_NETWORK_LIB -DQT_DLL &quot;-I.\GeneratedFiles&quot; &quot;-I.\GeneratedFiles\$(ConfigurationName)\.&quot; &quot;-I$(QTDIR)\include&quot; &quot;-I$(QTDIR)\include\QtCore&quot; &quot;-I$(QTDIR)\include\QtNetwork&quot; &quot;-I$(QTDIR)\include\QtGui&quot; &quot;-I$(QTDIR)\include\QtOpenGL&quot; &quot;-I$(QTDIR)\include\QtWebKit&quot; &quot;-I$(QTDIR)\include\QtTest&quot; &quot;-I$(SolutionDir)\QFunctionConfigurator\QFunctionConfigurator&quot; &quot;-I$(DXSDK_DIR)\Include&quot;&#x0D;&#x0A;"
+ AdditionalDependencies="&quot;$(QTDIR)\bin\moc.exe&quot;;$(InputPath)"
+ Outputs="&quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot;"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Moc&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\moc.exe&quot; &quot;$(InputPath)&quot; -o &quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot; -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_THREAD_SUPPORT -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_DLL &quot;-I.\GeneratedFiles&quot; &quot;-I.\GeneratedFiles\$(ConfigurationName)\.&quot; &quot;-I$(QTDIR)\include&quot; &quot;-I$(QTDIR)\include\QtCore&quot; &quot;-I$(QTDIR)\include\QtNetwork&quot; &quot;-I$(QTDIR)\include\QtGui&quot; &quot;-I$(QTDIR)\include\QtOpenGL&quot; &quot;-I$(QTDIR)\include\QtWebKit&quot; &quot;-I$(QTDIR)\include\QtTest&quot; &quot;-I$(SolutionDir)\QFunctionConfigurator\QFunctionConfigurator&quot; &quot;-I$(DXSDK_DIR)\Include&quot;&#x0D;&#x0A;"
+ AdditionalDependencies="&quot;$(QTDIR)\bin\moc.exe&quot;;$(InputPath)"
+ Outputs="&quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot;"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\FTNoIR_PoseWidget\glwidget.h"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Moc&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\moc.exe&quot; &quot;$(InputPath)&quot; -o &quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot; -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_THREAD_SUPPORT -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_NETWORK_LIB -DQT_DLL &quot;-I.\GeneratedFiles&quot; &quot;-I.\GeneratedFiles\$(ConfigurationName)\.&quot; &quot;-I$(QTDIR)\include&quot; &quot;-I$(QTDIR)\include\QtCore&quot; &quot;-I$(QTDIR)\include\QtNetwork&quot; &quot;-I$(QTDIR)\include\QtGui&quot; &quot;-I$(QTDIR)\include\QtOpenGL&quot; &quot;-I$(QTDIR)\include\QtWebKit&quot; &quot;-I$(QTDIR)\include\QtTest&quot; &quot;-I$(SolutionDir)\QFunctionConfigurator\QFunctionConfigurator&quot; &quot;-I$(DXSDK_DIR)\Include&quot;&#x0D;&#x0A;"
+ AdditionalDependencies="&quot;$(QTDIR)\bin\moc.exe&quot;;$(InputPath)"
+ Outputs="&quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot;"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Moc&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\moc.exe&quot; &quot;$(InputPath)&quot; -o &quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot; -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_THREAD_SUPPORT -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_DLL &quot;-I.\GeneratedFiles&quot; &quot;-I.\GeneratedFiles\$(ConfigurationName)\.&quot; &quot;-I$(QTDIR)\include&quot; &quot;-I$(QTDIR)\include\QtCore&quot; &quot;-I$(QTDIR)\include\QtNetwork&quot; &quot;-I$(QTDIR)\include\QtGui&quot; &quot;-I$(QTDIR)\include\QtOpenGL&quot; &quot;-I$(QTDIR)\include\QtWebKit&quot; &quot;-I$(QTDIR)\include\QtTest&quot; &quot;-I$(SolutionDir)\QFunctionConfigurator\QFunctionConfigurator&quot; &quot;-I$(DXSDK_DIR)\Include&quot;&#x0D;&#x0A;"
+ AdditionalDependencies="&quot;$(QTDIR)\bin\moc.exe&quot;;$(InputPath)"
+ Outputs="&quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot;"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\resource.h"
+ >
+ </File>
+ <File
+ RelativePath=".\rotation.h"
+ >
+ </File>
+ <File
+ RelativePath=".\tracker.h"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Moc&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\moc.exe&quot; &quot;$(InputPath)&quot; -o &quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot; -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_THREAD_SUPPORT -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_NETWORK_LIB -DQT_DLL &quot;-I.\GeneratedFiles&quot; &quot;-I.\GeneratedFiles\$(ConfigurationName)\.&quot; &quot;-I$(QTDIR)\include&quot; &quot;-I$(QTDIR)\include\QtCore&quot; &quot;-I$(QTDIR)\include\QtNetwork&quot; &quot;-I$(QTDIR)\include\QtGui&quot; &quot;-I$(QTDIR)\include\QtOpenGL&quot; &quot;-I$(QTDIR)\include\QtWebKit&quot; &quot;-I$(QTDIR)\include\QtTest&quot; &quot;-I$(SolutionDir)\QFunctionConfigurator\QFunctionConfigurator&quot; &quot;-I$(DXSDK_DIR)\Include&quot;&#x0D;&#x0A;"
+ AdditionalDependencies="&quot;$(QTDIR)\bin\moc.exe&quot;;$(InputPath)"
+ Outputs="&quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot;"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Moc&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\moc.exe&quot; &quot;$(InputPath)&quot; -o &quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot; -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_THREAD_SUPPORT -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_DLL &quot;-I.\GeneratedFiles&quot; &quot;-I.\GeneratedFiles\$(ConfigurationName)\.&quot; &quot;-I$(QTDIR)\include&quot; &quot;-I$(QTDIR)\include\QtCore&quot; &quot;-I$(QTDIR)\include\QtNetwork&quot; &quot;-I$(QTDIR)\include\QtGui&quot; &quot;-I$(QTDIR)\include\QtOpenGL&quot; &quot;-I$(QTDIR)\include\QtWebKit&quot; &quot;-I$(QTDIR)\include\QtTest&quot; &quot;-I$(SolutionDir)\QFunctionConfigurator\QFunctionConfigurator&quot; &quot;-I$(DXSDK_DIR)\Include&quot;&#x0D;&#x0A;"
+ AdditionalDependencies="&quot;$(QTDIR)\bin\moc.exe&quot;;$(InputPath)"
+ Outputs="&quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot;"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\tracker_types.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="FormsQt"
+ Filter="ui"
+ UniqueIdentifier="{99349809-55BA-4b9d-BF79-8FDBB0286EB3}"
+ >
+ <File
+ RelativePath=".\FaceTrackNoIR.ui"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Uic&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\uic.exe&quot; -o &quot;.\GeneratedFiles\ui_$(InputName).h&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
+ AdditionalDependencies="$(QTDIR)\bin\uic.exe"
+ Outputs="&quot;.\GeneratedFiles\ui_$(InputName).h&quot;"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Uic&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\uic.exe&quot; -o &quot;.\GeneratedFiles\ui_$(InputName).h&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
+ AdditionalDependencies="$(QTDIR)\bin\uic.exe"
+ Outputs="&quot;.\GeneratedFiles\ui_$(InputName).h&quot;"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\FTNoIR_Curves.ui"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Uic&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\uic.exe&quot; -o &quot;.\GeneratedFiles\ui_$(InputName).h&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
+ AdditionalDependencies="$(QTDIR)\bin\uic.exe"
+ Outputs="&quot;.\GeneratedFiles\ui_$(InputName).h&quot;"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Uic&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\uic.exe&quot; -o &quot;.\GeneratedFiles\ui_$(InputName).h&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
+ AdditionalDependencies="$(QTDIR)\bin\uic.exe"
+ Outputs="&quot;.\GeneratedFiles\ui_$(InputName).h&quot;"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\FTNoIR_KeyboardShortcuts.ui"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Uic&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\uic.exe&quot; -o &quot;.\GeneratedFiles\ui_$(InputName).h&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
+ AdditionalDependencies="$(QTDIR)\bin\uic.exe"
+ Outputs="&quot;.\GeneratedFiles\ui_$(InputName).h&quot;"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Uic&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\uic.exe&quot; -o &quot;.\GeneratedFiles\ui_$(InputName).h&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
+ AdditionalDependencies="$(QTDIR)\bin\uic.exe"
+ Outputs="&quot;.\GeneratedFiles\ui_$(InputName).h&quot;"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\FTNoIR_Preferences.ui"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Uic&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\uic.exe&quot; -o &quot;.\GeneratedFiles\ui_$(InputName).h&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
+ AdditionalDependencies="$(QTDIR)\bin\uic.exe"
+ Outputs="&quot;.\GeneratedFiles\ui_$(InputName).h&quot;"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Uic&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\uic.exe&quot; -o &quot;.\GeneratedFiles\ui_$(InputName).h&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
+ AdditionalDependencies="$(QTDIR)\bin\uic.exe"
+ Outputs="&quot;.\GeneratedFiles\ui_$(InputName).h&quot;"
+ />
+ </FileConfiguration>
+ </File>
+ <Filter
+ Name="UIElements"
+ >
+ <File
+ RelativePath=".\UIElements\aboutFaceTrackNoIR.png"
+ >
+ </File>
+ <File
+ RelativePath=".\UIElements\bubble_1_small.png"
+ >
+ </File>
+ <File
+ RelativePath=".\UIElements\bubble_2_big.png"
+ >
+ </File>
+ <File
+ RelativePath=".\UIElements\Logo_FaceTrackNoIR_32px.png"
+ >
+ </File>
+ </Filter>
+ </Filter>
+ <Filter
+ Name="Generated"
+ Filter="moc;h;cpp"
+ UniqueIdentifier="{71ED8ED8-ACB9-4CE9-BBE1-E00B30144E11}"
+ SourceControlFiles="false"
+ >
+ <File
+ RelativePath=".\GeneratedFiles\qrc_FaceTrackNoIR.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="0"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="0"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\GeneratedFiles\qrc_PoseWidget.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="0"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="0"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\GeneratedFiles\ui_FaceTrackNoIR.h"
+ >
+ </File>
+ <File
+ RelativePath=".\GeneratedFiles\ui_FTNoIR_Curves.h"
+ >
+ </File>
+ <File
+ RelativePath=".\GeneratedFiles\ui_FTNoIR_KeyboardShortcuts.h"
+ >
+ </File>
+ <File
+ RelativePath=".\GeneratedFiles\ui_FTNoIR_Preferences.h"
+ >
+ </File>
+ <Filter
+ Name="Release"
+ Filter="cpp;moc"
+ SourceControlFiles="false"
+ >
+ <File
+ RelativePath=".\GeneratedFiles\Release\moc_FaceApp.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\GeneratedFiles\Release\moc_FaceTrackNoIR.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\GeneratedFiles\Release\moc_glwidget.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\GeneratedFiles\Release\moc_tracker.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Debug"
+ Filter="cpp;moc"
+ SourceControlFiles="false"
+ >
+ <File
+ RelativePath=".\GeneratedFiles\Debug\moc_FaceApp.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\GeneratedFiles\Debug\moc_FaceTrackNoIR.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\GeneratedFiles\Debug\moc_glwidget.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ ObjectFile="$(IntDir)\$(InputName)1.obj"
+ XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ ObjectFile="$(IntDir)\$(InputName)1.obj"
+ XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\GeneratedFiles\Debug\moc_tracker.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ </Filter>
+ <Filter
+ Name="Media"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="qrc;*"
+ UniqueIdentifier="{D9D6E242-F8AF-46E4-B9FD-80ECBC20BA3E}"
+ ParseFiles="false"
+ >
+ <File
+ RelativePath=".\FaceTrackNoIR.ico"
+ >
+ </File>
+ <File
+ RelativePath=".\FaceTrackNoIR.qrc"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Rcc&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\rcc.exe&quot; -name &quot;$(InputName)&quot; -no-compress &quot;$(InputPath)&quot; -o .\GeneratedFiles\qrc_$(InputName).cpp&#x0D;&#x0A;"
+ AdditionalDependencies="$(InputPath);.\bad.svg;.\heart.svg;.\trash.svg"
+ Outputs=".\GeneratedFiles\qrc_$(InputName).cpp"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Rcc&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\rcc.exe&quot; -name &quot;$(InputName)&quot; -no-compress &quot;$(InputPath)&quot; -o .\GeneratedFiles\qrc_$(InputName).cpp&#x0D;&#x0A;"
+ AdditionalDependencies="$(InputPath);.\bad.svg;.\heart.svg;.\trash.svg"
+ Outputs=".\GeneratedFiles\qrc_$(InputName).cpp"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\images\FlightGear.ico"
+ >
+ </File>
+ <File
+ RelativePath=".\images\Freetrack.ico"
+ >
+ </File>
+ <File
+ RelativePath="..\FTNoIR_PoseWidget\PoseWidget.qrc"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Rcc&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\rcc.exe&quot; -name &quot;$(InputName)&quot; -no-compress &quot;$(InputPath)&quot; -o .\GeneratedFiles\qrc_$(InputName).cpp&#x0D;&#x0A;"
+ AdditionalDependencies="$(InputPath);..\FTNoIR_PoseWidget\images\side1.png;..\FTNoIR_PoseWidget\images\side2.png;..\FTNoIR_PoseWidget\images\side3.png;..\FTNoIR_PoseWidget\images\side4.png;..\FTNoIR_PoseWidget\images\side5.png;..\FTNoIR_PoseWidget\images\side6.png"
+ Outputs=".\GeneratedFiles\qrc_$(InputName).cpp"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Rcc&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\rcc.exe&quot; -name &quot;$(InputName)&quot; -no-compress &quot;$(InputPath)&quot; -o .\GeneratedFiles\qrc_$(InputName).cpp&#x0D;&#x0A;"
+ AdditionalDependencies="$(InputPath);..\FTNoIR_PoseWidget\images\side1.png;..\FTNoIR_PoseWidget\images\side2.png;..\FTNoIR_PoseWidget\images\side3.png;..\FTNoIR_PoseWidget\images\side4.png;..\FTNoIR_PoseWidget\images\side5.png;..\FTNoIR_PoseWidget\images\side6.png"
+ Outputs=".\GeneratedFiles\qrc_$(InputName).cpp"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\images\SeeingMachines.ico"
+ >
+ </File>
+ <File
+ RelativePath="..\FTNoIR_PoseWidget\images\side1.png"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\FTNoIR_PoseWidget\images\side2.png"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\FTNoIR_PoseWidget\images\side3.png"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\FTNoIR_PoseWidget\images\side4.png"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\FTNoIR_PoseWidget\images\side5.png"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\FTNoIR_PoseWidget\images\side6.png"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <File
+ RelativePath=".\FaceTrackNoIR.rc"
+ >
+ </File>
+ </Files>
+ <Globals>
+ <Global
+ Name="lupdateOnBuild"
+ Value="0"
+ />
+ <Global
+ Name="MocDir"
+ Value=".\GeneratedFiles\$(ConfigurationName)"
+ />
+ <Global
+ Name="MocOptions"
+ Value=""
+ />
+ <Global
+ Name="QtVersion Win32"
+ Value="$(DefaultQtVersion)"
+ />
+ <Global
+ Name="RccDir"
+ Value=".\GeneratedFiles"
+ />
+ <Global
+ Name="UicDir"
+ Value=".\GeneratedFiles"
+ />
+ </Globals>
+</VisualStudioProject>
diff --git a/facetracknoir/Readme.txt b/facetracknoir/Readme.txt
new file mode 100644
index 00000000..8bd28966
--- /dev/null
+++ b/facetracknoir/Readme.txt
@@ -0,0 +1,31 @@
+FaceTrackNoIR (v. 1.6.0).
+
+FaceTrackNoIR is a head-tracker, which uses the FaceAPI provided by SeeingMachines. It was made using Visual Studio 2005 and Qt.
+The major advantage over other headtrackers is, that it uses a simple webcam to track the face of 'the gamer'. There is no need
+for expensive equipment or even Borg-like devices with LED's and such.
+
+
+Installation:
+To install the program, simply start Setup.exe and follow the directions. Use the desktop-icon to start FaceTrackNoIR.
+
+Compatibility:
+FaceTrackNoIR is made for Windows and tested on XP, Vista and Windows7. The FaceAPI creators recommend a dual-core processor or better.
+Because the 'non-commercial' version of the FaceAPI is used, the webcam can not be 'chosen': it always uses the first webcam it finds! When FaceTrackNoIR is started, the name of this webcam is displayed.
+
+
+Games:
+FaceTrackNoIR supports several protocols, so it can be used with several games, flight-sims and other. Check out the website for a
+list: http://facetracknoir.sourceforge.net/compatibility/games.htm
+
+Visit the website for the latest info!
+
+
+Please let us know if you like the program, if you have ideas for improvements or any questions you might have.
+The source is also available!
+
+
+The FaceTrackNoIR team:
+
+Wim Vriend
+Ron Hendriks
+and others...
diff --git a/facetracknoir/Readme_Update_20100615.txt b/facetracknoir/Readme_Update_20100615.txt
new file mode 100644
index 00000000..e43d954c
--- /dev/null
+++ b/facetracknoir/Readme_Update_20100615.txt
@@ -0,0 +1,51 @@
+FaceTrackNoIR (v. 20100615).
+
+From various users we received requests for improvements and features. If you keep sending us your ideas, we can keep
+improving FaceTrackNoIR...
+
+Installation:
+Unzip the .exe to the installation folder of FaceTrackNoIR (best rename the old .exe first). The folders in the ZIP-file
+contain support info and examples of a .INI-file (IL-2) and a script for GlovePIE.
+
+
+The following upgrades have been applied:
+
+- ‘=’ is center view
+
+- ‘BACKSPACE’ = start (+center)/stop tracking. A messagebeep is generated when tracking is resumed and the
+ headpose-data is valid again (faceAPI has 'locked on'... ).
+
+- Checkbox ‘use EWMA filter’: Ticking this checkbox will make FaceTrackNoIR filter the headpose data with
+ a so-called 'Exponentially Weighed Moving Average'. This technique was adopted from FlightGear, where
+ Melchior Franz had 'invented' it.
+ If the filter is active, the factor for each of the 6 DOF's are used. These factors determine the weight that is
+ given to previous measurements and goes from 0 - 1 (in the GUI this setting is 0 - 100). A lower value will give a quicker response (but less stable).
+
+ Remark: for FlightGear, the EWMA checkbox does nothing: the filter is embedded in the FlightGear script.
+
+- Some timing-issues with the faceAPI were resolved, so now the scanning-frequency can be higher that 20Hz.
+ We do not know yet, how this influences performance of both FaceTrackNoIR and your CPU. Experience learns, that
+ the headtracking is influenced by many factors, like CPU, video-card, framerate of the game etc.
+
+- The protocol-server that is selected in the combobox is now the only one that is started, when the tracker is started.
+ Before loading an .INI-file, please stop the tracker.
+
+- PPJoy support is added, so now FaceTrackNoIR can be used for other games too. We tested this feature with IL-2,
+ using GlovePIE to generate TrackIR data. Check out the files in the ZIP-file for instructions. PPjoy was created by
+ Deon van der Westhuysen and GlovePIE by Carl Kenner. We thank them both for their effort!
+
+
+
+Please let us know what you think of our little gadget. Posts can be made on the FaceTrackNoIR forum on SourceForge
+(http://sourceforge.net/projects/facetracknoir/forums/forum/1150910) or on the various game-forums.
+
+If anyone has used FaceTrackNoIR successfully with other games, please let us know. If you can, we would also like to receive
+examples of the .INI-file you used for that and maybe settings of other utilities needed. Thanks!
+
+
+
+The FaceTrackNoIR team:
+
+Wim Vriend
+Ron Hendriks
+
diff --git a/facetracknoir/Readme_Update_20100716.txt b/facetracknoir/Readme_Update_20100716.txt
new file mode 100644
index 00000000..e99111a1
--- /dev/null
+++ b/facetracknoir/Readme_Update_20100716.txt
@@ -0,0 +1,35 @@
+FaceTrackNoIR (v. 20100716).
+
+From various users we received requests for improvements and features. If you keep sending us your ideas, we can keep
+improving FaceTrackNoIR...
+
+Installation:
+Unzip the .exe and .dll to the installation folder of FaceTrackNoIR (best rename the old .exe first). The folders in the ZIP-file contain icons for the protocols and an .INI-file (FreeFalcon). Extract these to the folder 'Settings' and 'Images'.
+
+
+The following upgrades have been applied:
+
+- TrackIR support is added. Start FaceTrackNoIR and the TrackIR-protocol before starting the game (at least once)..
+ A registry-entry is added/changed, that the game or flightsim needs.
+
+Hints from the previous update:
+- ‘=’ is center view
+
+- ‘BACKSPACE’ = start (+center)/stop tracking. A messagebeep is generated when tracking is resumed and the
+ headpose-data is valid again (faceAPI has 'locked on'... ).
+
+
+
+Please let us know what you think of our little gadget. Posts can be made on the FaceTrackNoIR forum on SourceForge
+(http://sourceforge.net/projects/facetracknoir/forums/forum/1150910) or on the various game-forums.
+
+If anyone has used FaceTrackNoIR successfully with other games, please let us know. If you can, we would also like to receive
+examples of the .INI-file you used for that and maybe settings of other utilities needed. Thanks!
+
+
+
+The FaceTrackNoIR team:
+
+Wim Vriend
+Ron Hendriks
+
diff --git a/facetracknoir/Readme_Update_20100822.txt b/facetracknoir/Readme_Update_20100822.txt
new file mode 100644
index 00000000..e121fe9f
--- /dev/null
+++ b/facetracknoir/Readme_Update_20100822.txt
@@ -0,0 +1,32 @@
+FaceTrackNoIR (v. 20100822).
+
+From various users we received requests for improvements and features. If you keep sending us your ideas, we can keep
+improving FaceTrackNoIR...
+
+Installation:
+Unzip all files to the installation folder of FaceTrackNoIR (typicaly c:\program files\abbequerque inc\facetracknoir\): overwrite files when asked.
+
+
+The following upgrades have been applied:
+
+- The program-menu now contains a Tools menu. Via this menu the program preferences and keyboard shortcuts can be modified.
+
+- The preferences dialog contains the 'Auto-minimize' setting: FaceTrackNoIR will minimize x sec. after starting the face-tracker.
+ Entering 0 will disable auto-minimize. This setting is global, for all INI-files.
+
+- The keyboard shortcuts for 'center' and 'start/stop' can be assigned here. These settings are stored in the INI-file.
+
+
+Please let us know what you think of our little gadget. Posts can be made on the FaceTrackNoIR forum on SourceForge
+(http://sourceforge.net/projects/facetracknoir/forums/forum/1150910) or on the various game-forums.
+
+If anyone has used FaceTrackNoIR successfully with other games, please let us know. If you can, we would also like to receive
+examples of the .INI-file you used for that and maybe settings of other utilities needed. Thanks!
+
+
+
+The FaceTrackNoIR team:
+
+Wim Vriend
+Ron Hendriks
+
diff --git a/facetracknoir/UIElements/ButtonIcoBlack.bmp b/facetracknoir/UIElements/ButtonIcoBlack.bmp
new file mode 100644
index 00000000..9bc402aa
--- /dev/null
+++ b/facetracknoir/UIElements/ButtonIcoBlack.bmp
Binary files differ
diff --git a/facetracknoir/UIElements/Curves.png b/facetracknoir/UIElements/Curves.png
new file mode 100644
index 00000000..fe21fa15
--- /dev/null
+++ b/facetracknoir/UIElements/Curves.png
Binary files differ
diff --git a/facetracknoir/UIElements/Donate.png b/facetracknoir/UIElements/Donate.png
new file mode 100644
index 00000000..cf4223fb
--- /dev/null
+++ b/facetracknoir/UIElements/Donate.png
Binary files differ
diff --git a/facetracknoir/UIElements/FaceTrackNoIR.ico b/facetracknoir/UIElements/FaceTrackNoIR.ico
new file mode 100644
index 00000000..af36ec30
--- /dev/null
+++ b/facetracknoir/UIElements/FaceTrackNoIR.ico
Binary files differ
diff --git a/facetracknoir/UIElements/Logo_FaceTrackNoIR_32px.jpg b/facetracknoir/UIElements/Logo_FaceTrackNoIR_32px.jpg
new file mode 100644
index 00000000..73ead853
--- /dev/null
+++ b/facetracknoir/UIElements/Logo_FaceTrackNoIR_32px.jpg
Binary files differ
diff --git a/facetracknoir/UIElements/Logo_FaceTrackNoIR_32px.png b/facetracknoir/UIElements/Logo_FaceTrackNoIR_32px.png
new file mode 100644
index 00000000..c4e63c76
--- /dev/null
+++ b/facetracknoir/UIElements/Logo_FaceTrackNoIR_32px.png
Binary files differ
diff --git a/facetracknoir/UIElements/Logo_NoIR.png b/facetracknoir/UIElements/Logo_NoIR.png
new file mode 100644
index 00000000..bb654a07
--- /dev/null
+++ b/facetracknoir/UIElements/Logo_NoIR.png
Binary files differ
diff --git a/facetracknoir/UIElements/Logo_NoIR_small.png b/facetracknoir/UIElements/Logo_NoIR_small.png
new file mode 100644
index 00000000..5d49e0b1
--- /dev/null
+++ b/facetracknoir/UIElements/Logo_NoIR_small.png
Binary files differ
diff --git a/facetracknoir/UIElements/Logo_NoIR_small_target.png b/facetracknoir/UIElements/Logo_NoIR_small_target.png
new file mode 100644
index 00000000..4bbaf41f
--- /dev/null
+++ b/facetracknoir/UIElements/Logo_NoIR_small_target.png
Binary files differ
diff --git a/facetracknoir/UIElements/Logo_NoIR_small_target90px.png b/facetracknoir/UIElements/Logo_NoIR_small_target90px.png
new file mode 100644
index 00000000..ecaa4e12
--- /dev/null
+++ b/facetracknoir/UIElements/Logo_NoIR_small_target90px.png
Binary files differ
diff --git a/facetracknoir/UIElements/Tools.png b/facetracknoir/UIElements/Tools.png
new file mode 100644
index 00000000..2da8f9f5
--- /dev/null
+++ b/facetracknoir/UIElements/Tools.png
Binary files differ
diff --git a/facetracknoir/UIElements/aboutFaceTrackNoIR.png b/facetracknoir/UIElements/aboutFaceTrackNoIR.png
new file mode 100644
index 00000000..90f8f792
--- /dev/null
+++ b/facetracknoir/UIElements/aboutFaceTrackNoIR.png
Binary files differ
diff --git a/facetracknoir/UIElements/bubble_1_small.png b/facetracknoir/UIElements/bubble_1_small.png
new file mode 100644
index 00000000..ebd4e66f
--- /dev/null
+++ b/facetracknoir/UIElements/bubble_1_small.png
Binary files differ
diff --git a/facetracknoir/UIElements/bubble_2_big.png b/facetracknoir/UIElements/bubble_2_big.png
new file mode 100644
index 00000000..5dc40254
--- /dev/null
+++ b/facetracknoir/UIElements/bubble_2_big.png
Binary files differ
diff --git a/facetracknoir/UIElements/logoFaceTrackNoIR.png b/facetracknoir/UIElements/logoFaceTrackNoIR.png
new file mode 100644
index 00000000..a1a3407b
--- /dev/null
+++ b/facetracknoir/UIElements/logoFaceTrackNoIR.png
Binary files differ
diff --git a/facetracknoir/UIElements/logoFaceTrackNoIR60px.png b/facetracknoir/UIElements/logoFaceTrackNoIR60px.png
new file mode 100644
index 00000000..f01f6024
--- /dev/null
+++ b/facetracknoir/UIElements/logoFaceTrackNoIR60px.png
Binary files differ
diff --git a/facetracknoir/images/330px-6DOF_en.png b/facetracknoir/images/330px-6DOF_en.png
new file mode 100644
index 00000000..9d1d72ff
--- /dev/null
+++ b/facetracknoir/images/330px-6DOF_en.png
Binary files differ
diff --git a/facetracknoir/images/FaceTrackNoIR.ico b/facetracknoir/images/FaceTrackNoIR.ico
new file mode 100644
index 00000000..5115066c
--- /dev/null
+++ b/facetracknoir/images/FaceTrackNoIR.ico
Binary files differ
diff --git a/facetracknoir/images/Settings16.png b/facetracknoir/images/Settings16.png
new file mode 100644
index 00000000..3b31623b
--- /dev/null
+++ b/facetracknoir/images/Settings16.png
Binary files differ
diff --git a/facetracknoir/images/SettingsOpen16.png b/facetracknoir/images/SettingsOpen16.png
new file mode 100644
index 00000000..5bf65f0d
--- /dev/null
+++ b/facetracknoir/images/SettingsOpen16.png
Binary files differ
diff --git a/facetracknoir/images/rotation_DOFs.png b/facetracknoir/images/rotation_DOFs.png
new file mode 100644
index 00000000..68682d88
--- /dev/null
+++ b/facetracknoir/images/rotation_DOFs.png
Binary files differ
diff --git a/facetracknoir/images/translation_DOFs.png b/facetracknoir/images/translation_DOFs.png
new file mode 100644
index 00000000..886c586e
--- /dev/null
+++ b/facetracknoir/images/translation_DOFs.png
Binary files differ
diff --git a/facetracknoir/main.cpp b/facetracknoir/main.cpp
new file mode 100644
index 00000000..6e0549d7
--- /dev/null
+++ b/facetracknoir/main.cpp
@@ -0,0 +1,59 @@
+/********************************************************************************
+* FaceTrackNoIR This program is a private project of the some enthusiastic *
+* gamers from Holland, who don't like to pay much for *
+* head-tracking. *
+* *
+* Copyright (C) 2010 Wim Vriend (Developing) *
+* Ron Hendriks (Researching and Testing) *
+* *
+* Homepage *
+* *
+* This program is free software; you can redistribute it and/or modify it *
+* under the terms of the GNU General Public License as published by the *
+* Free Software Foundation; either version 3 of the License, or (at your *
+* option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, but *
+* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
+* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for *
+* more details. *
+* *
+* You should have received a copy of the GNU General Public License along *
+* with this program; if not, see <http://www.gnu.org/licenses/>. *
+*********************************************************************************/
+/*
+ Modifications (last one on top):
+ 20100520 - WVR: Added class FaceApp, to override winEventFilter. It receives
+ messages from the Game.
+*/
+
+#include "FaceApp.h"
+#include "FaceTrackNoIR.h"
+#include <QtGui/QApplication>
+#include <QDesktopWidget>
+#include <QDebug>
+#include <QList>
+
+int main(int argc, char *argv[])
+{
+//// QApplication a(argc, argv);
+ FaceApp a(argc, argv);
+ QFont font;
+ font.setFamily(font.defaultFamily());
+ font.setPointSize(9);
+ a.setFont(font);
+
+ //
+ // Create the Main Window and DeskTop and Exec!
+ //
+ FaceTrackNoIR w;
+ a.SetupEventFilter(&w);
+
+ QDesktopWidget desktop;
+ w.move(desktop.screenGeometry().width()/2-w.width()/2, 100);
+ w.show();
+ qApp->exec();
+
+ return 0;
+}
+
diff --git a/facetracknoir/paintwidget.h b/facetracknoir/paintwidget.h
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/facetracknoir/paintwidget.h
diff --git a/facetracknoir/postbuild.bat b/facetracknoir/postbuild.bat
new file mode 100644
index 00000000..6653067e
--- /dev/null
+++ b/facetracknoir/postbuild.bat
@@ -0,0 +1,27 @@
+@echo off
+rem Copies required DLL files into output folder.
+
+setlocal
+set COPY=xcopy /D /S /C /I /H /R /Y
+set FILTER=find /v "File(s) copied"
+
+echo parameters %1 en %2 en %3
+
+set API_BIN=%1
+set OUTDIR=%2
+set CONFIG=%3
+
+if %CONFIG%==Debug (goto Debug)
+if %CONFIG%==Release (goto Release)
+
+echo Unknown build configuration %CONFIG%
+exit /b -1
+
+:Debug
+%COPY% %API_BIN% %OUTDIR%\ | %FILTER%
+exit /b 0
+
+:Release
+%COPY% %API_BIN% %OUTDIR%\ | %FILTER%
+exit /b 0
+
diff --git a/facetracknoir/resource.h b/facetracknoir/resource.h
new file mode 100644
index 00000000..75059fe3
--- /dev/null
+++ b/facetracknoir/resource.h
@@ -0,0 +1,16 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by Sweetspotter.rc
+//
+#define IDI_ICON1 102
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 103
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1001
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/facetracknoir/rotation.cpp b/facetracknoir/rotation.cpp
new file mode 100644
index 00000000..1c89d775
--- /dev/null
+++ b/facetracknoir/rotation.cpp
@@ -0,0 +1,48 @@
+/* Copyright (c) 2012 Patrick Ruoff
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ */
+
+#include "rotation.h"
+
+#include <cmath>
+
+// ----------------------------------------------------------------------------
+Rotation Rotation::inv()
+{
+ return Rotation(a,-b,-c,-d);
+}
+
+// conversions
+// see http://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles
+void Rotation::fromEuler(double yaw, double pitch, double roll)
+{
+ double sin_phi = sin(roll/2.0);
+ double cos_phi = cos(roll/2.0);
+ double sin_the = sin(pitch/2.0);
+ double cos_the = cos(pitch/2.0);
+ double sin_psi = sin(yaw/2.0);
+ double cos_psi = cos(yaw/2.0);
+
+ a = cos_phi*cos_the*cos_psi + sin_phi*sin_the*sin_psi;
+ b = sin_phi*cos_the*cos_psi - cos_phi*sin_the*sin_psi;
+ c = cos_phi*sin_the*cos_psi + sin_phi*cos_the*sin_psi;
+ d = cos_phi*cos_the*sin_psi - sin_phi*sin_the*cos_psi;
+}
+
+void Rotation::toEuler(double& yaw, double& pitch, double& roll)
+{
+ roll = atan2(2.0*(a*b + c*d), 1.0 - 2.0*(b*b + c*c));
+ pitch = asin(2.0*(a*c - b*d));
+ yaw = atan2(2.0*(a*d + b*c), 1.0 - 2.0*(c*c + d*d));
+}
+
+Rotation operator*(const Rotation& A, const Rotation& B)
+{
+ return Rotation(A.a*B.a - A.b*B.b - A.c*B.c - A.d*B.d, // quaternion multiplication
+ A.a*B.b + A.b*B.a + A.c*B.d - A.d*B.c,
+ A.a*B.c - A.b*B.d + A.c*B.a + A.d*B.b,
+ A.a*B.d + A.b*B.c - A.c*B.b + A.d*B.a);
+} \ No newline at end of file
diff --git a/facetracknoir/rotation.h b/facetracknoir/rotation.h
new file mode 100644
index 00000000..967d6661
--- /dev/null
+++ b/facetracknoir/rotation.h
@@ -0,0 +1,31 @@
+/* Copyright (c) 2012 Patrick Ruoff
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ */
+
+#ifndef ROTATION_H
+#define ROTATION_H
+
+// ----------------------------------------------------------------------------
+class Rotation {
+ friend Rotation operator*(const Rotation& A, const Rotation& B);
+public:
+ Rotation() : a(1.0),b(0.0),c(0.0),d(0.0) {}
+ Rotation(double yaw, double pitch, double roll) { fromEuler(yaw, pitch, roll); }
+ Rotation(double a, double b, double c, double d) : a(a),b(b),c(c),d(d) {}
+
+ Rotation inv(); // inverse
+
+ // conversions
+ void fromEuler(double yaw, double pitch, double roll);
+ void toEuler(double& yaw, double& pitch, double& roll);
+
+protected:
+ double a,b,c,d; // quaternion coefficients
+};
+
+Rotation operator*(const Rotation& A, const Rotation& B); // composition of rotations
+
+#endif //ROTATION_H
diff --git a/facetracknoir/spot.h b/facetracknoir/spot.h
new file mode 100644
index 00000000..38518c74
--- /dev/null
+++ b/facetracknoir/spot.h
@@ -0,0 +1,27 @@
+#ifndef __SPOT_H__
+#define __SPOT_H__
+
+class Spot {
+
+private:
+ QPoint distance;
+ QPoint position;
+ QImage image;
+ QRect target;
+ QRect source;
+
+public:
+ Spot();
+
+ void setDistance(QPoint distance);
+ QPoint getDistance();
+
+ void setPosition(QPoint position);
+ QPoint getPosition();
+
+ QRect getTarget();
+ QRect getSource();
+ QImage getImage();
+};
+
+#endif \ No newline at end of file
diff --git a/facetracknoir/tracker.cpp b/facetracknoir/tracker.cpp
new file mode 100644
index 00000000..5396c95b
--- /dev/null
+++ b/facetracknoir/tracker.cpp
@@ -0,0 +1,1081 @@
+/********************************************************************************
+* FaceTrackNoIR This program is a private project of the some enthusiastic *
+* gamers from Holland, who don't like to pay much for *
+* head-tracking. *
+* *
+* Copyright (C) 2012 Wim Vriend (Developing) *
+* Ron Hendriks (Researching and Testing) *
+* *
+* Homepage: http://facetracknoir.sourceforge.net/home/default.htm *
+* *
+* This program is free software; you can redistribute it and/or modify it *
+* under the terms of the GNU General Public License as published by the *
+* Free Software Foundation; either version 3 of the License, or (at your *
+* option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, but *
+* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
+* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for *
+* more details. *
+* *
+* You should have received a copy of the GNU General Public License along *
+* with this program; if not, see <http://www.gnu.org/licenses/>. *
+*********************************************************************************/
+/*
+ Modifications (last one on top):
+ 20130201 - WVR: Remove the Protocol, when stopping the Thread.
+ 20121215 - WVR: Fixed crash after message: protocol not installed correctly... by terminating the thread.
+ 20120921 - WVR: Fixed centering when no filter is selected.
+ 20120917 - WVR: Added Mouse-buttons to ShortKeys.
+ 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..
+ 20120427 - WVR: The Protocol-code was already in separate DLLs, but the ListBox was still filled ´statically´. Now, a Dir() of the
+ EXE-folder is done, to locate Protocol-DLLs. The Icons were also moved to the DLLs
+ 20120317 - WVR: The Filter and Tracker-code was moved to separate DLLs. The calling-method
+ was changed accordingly.
+ The face-tracker member-functions NotifyZeroed and refreshVideo were added, as
+ requested by Stanislaw.
+ 20110411 - WVR: Finished moving all Protocols to separate C++ projects. Every protocol now
+ has it's own Class, that's inside it's own DLL. This reduces the size of the program,
+ makes it more structured and enables a more sophisticated installer.
+ 20110328 - WVR: Changed the camera-structs into class-instances. This makes initialisation
+ easier and hopefully solves the remaining 'start-up problem'.
+ 20110313 - WVR: Removed 'set_initial'. Less is more.
+ 20110109 - WVR: Added setZero option to define behaviour after STOP tracking via shortkey.
+ 20110104 - WVR: Removed a few nasty bugs (it was impossible to stop tracker without crash).
+ 20101224 - WVR: Removed the QThread inheritance of the Base Class for the protocol-servers.
+ Again, this drastically simplifies the code in the protocols.
+ 20101217 - WVR: Created Base Class for the protocol-servers. This drastically simplifies
+ the code needed here.
+ 20101024 - WVR: Added shortkey to disable/enable one or more axis during tracking.
+ 20101021 - WVR: Added FSUIPC server for FS2004.
+ 20101011 - WVR: Added SimConnect server.
+ 20101007 - WVR: Created 6DOF-curves and drastically changed the tracker for that.
+ Also eliminated a 'glitch' in the process.
+ 20100607 - WVR: Re-installed Rotation Neutral Zone and improved reaction
+ after 'start/stop'. MessageBeep when confidence is back...
+ 20100604 - WVR: Created structure for DOF-data and changed timing of
+ ReceiveHeadPose end run().
+ 20100602 - WVR: Implemented EWMA-filtering, according to the example of
+ Melchior Franz. Works like a charm...
+ 20100601 - WVR: Added DirectInput keyboard-handling. '=' used for center,
+ 'BACK' for start (+center)/stop.
+ 20100517 - WVR: Added upstream command(s) from FlightGear
+ 20100523 - WVR: Checkboxes to invert 6DOF's was implemented. Multiply by
+ 1 or (-1).
+*/
+#include "tracker.h"
+#include "FaceTrackNoIR.h"
+
+// Flags
+bool Tracker::confid = false;
+bool Tracker::do_tracking = true;
+bool Tracker::do_center = false;
+bool Tracker::do_inhibit = false;
+bool Tracker::do_game_zero = false;
+bool Tracker::do_axis_reverse = false;
+
+bool Tracker::setZero = true;
+bool Tracker::setEngineStop = true;
+HANDLE Tracker::hTrackMutex = 0;
+
+bool Tracker::useAxisReverse = false; // Use Axis Reverse
+float Tracker::YawAngle4ReverseAxis = 40.0f; // Axis Reverse settings
+float Tracker::Z_Pos4ReverseAxis = -20.0f;
+float Tracker::Z_PosWhenReverseAxis = 50.0f;
+
+
+T6DOF Tracker::current_camera(0,0,0,0,0,0); // Used for filtering
+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, 180, 50, 90); // 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);
+THeadPoseDOF Tracker::Y("Y","", 50, 180);
+THeadPoseDOF Tracker::Z("Z","", 50, 180);
+
+TShortKey Tracker::CenterKey; // ShortKey to Center headposition
+TShortKey Tracker::StartStopKey; // ShortKey to Start/stop tracking
+TShortKey Tracker::InhibitKey; // ShortKey to inhibit axis while tracking
+TShortKey Tracker::GameZeroKey; // ShortKey to Set Game Zero
+bool Tracker::DisableBeep = false; // Disable beep when center
+//TShortKey Tracker::AxisReverseKey; // ShortKey to start/stop axis reverse while tracking
+
+int Tracker::CenterMouseKey; // ShortKey to Center headposition
+int Tracker::StartStopMouseKey; // ShortKey to Start/stop tracking
+int Tracker::InhibitMouseKey; // ShortKey to inhibit axis while tracking
+int Tracker::GameZeroMouseKey; // ShortKey to Set Game Zero
+
+//ITrackerPtr Tracker::pTracker; // Pointer to Tracker instance (in DLL)
+IProtocolPtr Tracker::pProtocol; // Pointer to Protocol instance (in DLL)
+IFilterPtr Tracker::pFilter; // Pointer to Filter instance (in DLL)
+
+
+/** constructor **/
+Tracker::Tracker( FaceTrackNoIR *parent ) {
+QString libName;
+importGetTracker getIT;
+QLibrary *trackerLib;
+importGetFilter getFilter;
+QLibrary *filterLib;
+importGetProtocol getProtocol;
+QLibrary *protocolLib;
+QFrame *video_frame;
+
+ // Retieve the pointer to the parent
+ mainApp = parent;
+
+ // Create events
+ m_StopThread = CreateEvent(0, TRUE, FALSE, 0);
+ m_WaitThread = CreateEvent(0, TRUE, FALSE, 0);
+
+ Tracker::hTrackMutex = CreateMutexA(NULL, false, "HeadPose_mutex");
+
+ //
+ // Initialize the headpose-data
+ //
+ Tracker::Yaw.initHeadPoseData();
+ Tracker::Pitch.initHeadPoseData();
+ Tracker::Roll.initHeadPoseData();
+ Tracker::X.initHeadPoseData();
+ Tracker::Y.initHeadPoseData();
+ Tracker::Z.initHeadPoseData();
+
+ //
+ // Locate the video-frame, for the DLL
+ //
+ video_frame = 0;
+ video_frame = mainApp->getVideoWidget();
+ qDebug() << "Tracker::Tracker VideoFrame = " << video_frame;
+
+ //
+ // Load the Tracker-engine DLL, get the tracker-class from it and do stuff...
+ //
+ pTracker = NULL;
+ libName = mainApp->getCurrentTrackerName();
+ if (!libName.isEmpty()) {
+ trackerLib = new QLibrary(libName);
+ getIT = (importGetTracker) trackerLib->resolve("GetTracker");
+ qDebug() << "Tracker::Tracker libName = " << libName;
+
+ if (getIT) {
+ ITracker *ptrXyz(getIT()); // Get the Class
+ if (ptrXyz)
+ {
+ pTracker = ptrXyz;
+ pTracker->Initialize( video_frame );
+ qDebug() << "Tracker::setup Function Resolved!";
+ }
+ }
+ else {
+ QMessageBox::warning(0,"FaceTrackNoIR Error", libName + " DLL not loaded",QMessageBox::Ok,QMessageBox::NoButton);
+ }
+ }
+ //
+ // Load the Tracker-engine DLL, get the tracker-class from it and do stuff...
+ //
+ pSecondTracker = NULL;
+ libName = mainApp->getSecondTrackerName();
+ if ((!libName.isEmpty()) && (libName != "None")) {
+ trackerLib = new QLibrary(libName);
+ getIT = (importGetTracker) trackerLib->resolve("GetTracker");
+
+ if (getIT) {
+ ITracker *ptrXyz(getIT()); // Get the Class
+ if (ptrXyz)
+ {
+ pSecondTracker = ptrXyz;
+ pSecondTracker->Initialize( NULL );
+ qDebug() << "Tracker::setup Function Resolved!";
+ }
+ }
+ else {
+ QMessageBox::warning(0,"FaceTrackNoIR Error", libName + " DLL not loaded",QMessageBox::Ok,QMessageBox::NoButton);
+ }
+ }
+
+ //
+ // Load the DLL with the protocol-logic and retrieve a pointer to the Protocol-class.
+ //
+ libName = mainApp->getCurrentProtocolName();
+ if (!libName.isEmpty()) {
+ protocolLib = new QLibrary(libName);
+ getProtocol = (importGetProtocol) protocolLib->resolve("GetProtocol");
+ if (getProtocol) {
+ IProtocolPtr ptrXyz(getProtocol());
+ if (ptrXyz)
+ {
+ pProtocol = ptrXyz;
+ pProtocol->Initialize();
+ qDebug() << "Protocol::setup Function Resolved!";
+ }
+ }
+ else {
+ QMessageBox::warning(0,"FaceTrackNoIR Error", "Protocol-DLL not loaded",QMessageBox::Ok,QMessageBox::NoButton);
+ return;
+ }
+ }
+
+ //
+ // Load the DLL with the filter-logic and retrieve a pointer to the Filter-class.
+ //
+ pFilter = NULL;
+ libName = mainApp->getCurrentFilterName();
+
+ if ((!libName.isEmpty()) && (libName != "None")) {
+ filterLib = new QLibrary(libName);
+
+ getFilter = (importGetFilter) filterLib->resolve("GetFilter");
+ if (getFilter) {
+ IFilterPtr ptrXyz(getFilter());
+ if (ptrXyz)
+ {
+ pFilter = ptrXyz;
+ qDebug() << "Filter::setup Function Resolved!";
+ }
+ }
+ else {
+ QMessageBox::warning(0,"FaceTrackNoIR Error", "Filter-DLL not loaded",QMessageBox::Ok,QMessageBox::NoButton);
+ return;
+ }
+ }
+
+ // Load the settings from the INI-file
+ loadSettings();
+}
+
+/** destructor empty **/
+Tracker::~Tracker() {
+
+ // Stop the Tracker(s)
+ if (pTracker) {
+ pTracker->StopTracker( true );
+ }
+ if (pSecondTracker) {
+ pSecondTracker->StopTracker( true );
+ }
+
+ // Trigger thread to stop
+ ::SetEvent(m_StopThread);
+
+ // Wait until thread finished
+ if (isRunning()) {
+ ::WaitForSingleObject(m_WaitThread, INFINITE);
+ }
+
+ //
+ // Remove the Tracker
+ // 20120615, WVR: As suggested by Stanislaw
+ if (pTracker) {
+ delete pTracker;
+ pTracker = NULL;
+ }
+ if (pSecondTracker) {
+ delete pSecondTracker;
+ pSecondTracker = NULL;
+ }
+
+ //
+ // Remove the Protocol
+ //
+ if (pProtocol) {
+ delete pProtocol;
+ pProtocol = NULL;
+ }
+
+ // Close handles
+ ::CloseHandle(m_StopThread);
+ ::CloseHandle(m_WaitThread);
+
+ if (Tracker::hTrackMutex != 0) {
+ ::CloseHandle( Tracker::hTrackMutex );
+ }
+
+# ifdef USE_DEBUG_CLIENT
+ debug_Client->deleteLater(); // Delete Excel protocol-server
+# endif
+
+ qDebug() << "Tracker::~Tracker Finished...";
+
+}
+
+/** setting up the tracker engine **/
+void Tracker::setup() {
+ bool DLL_Ok;
+
+ // retrieve pointers to the User Interface and the main Application
+ if (pTracker) {
+ pTracker->StartTracker( mainApp->winId() );
+ }
+ if (pSecondTracker) {
+ pSecondTracker->StartTracker( mainApp->winId() );
+ }
+
+ //
+ // Check if the Protocol-server files were installed OK.
+ // Some servers also create a memory-mapping, for Inter Process Communication.
+ // The handle of the MainWindow is sent to 'The Game', so it can send a message back.
+ //
+ if (pProtocol) {
+
+ DLL_Ok = pProtocol->checkServerInstallationOK( mainApp->winId() );
+ if (!DLL_Ok) {
+ // Trigger thread to stop
+ ::SetEvent(m_StopThread);
+ QMessageBox::information(mainApp, "FaceTrackNoIR error", "Protocol is not (correctly) installed!");
+ }
+ }
+
+# ifdef USE_DEBUG_CLIENT
+ DLL_Ok = debug_Client->checkServerInstallationOK( mainApp->winId() ); // Check installation
+ if (!DLL_Ok) {
+ QMessageBox::information(mainApp, "FaceTrackNoIR error", "Excel Protocol is not (correctly) installed!");
+ }
+# endif
+
+}
+
+/** QThread run method @override **/
+void Tracker::run() {
+/** Direct Input variables **/
+//
+// The DirectX stuff was found here: http://www.directxtutorial.com/tutorial9/e-directinput/dx9e2.aspx
+//
+LPDIRECTINPUT8 din; // the pointer to our DirectInput interface
+LPDIRECTINPUTDEVICE8 dinkeyboard; // the pointer to the keyboard device
+LPDIRECTINPUTDEVICE8 dinmouse; // the pointer to the mouse device
+BYTE keystate[256]; // the storage for the key-information
+DIMOUSESTATE mousestate; // the storage for the mouse-information
+HRESULT retAcquire;
+bool lastCenterKey = false; // Remember state, to detect rising edge
+bool lastStartStopKey = false;
+bool lastInhibitKey = false;
+bool lastGameZeroKey = false;
+
+bool lastCenterMouseKey = false; // Remember state, to detect rising edge
+bool lastStartStopMouseKey = false;
+bool lastInhibitMouseKey = false;
+bool lastGameZeroMouseKey = false;
+
+bool waitAxisReverse = false;
+bool waitThroughZero = false;
+double actualYaw = 0.0f;
+double actualZ = 0.0f;
+T6DOF offset_camera(0,0,0,0,0,0);
+T6DOF gamezero_camera(0,0,0,0,0,0);
+T6DOF gameoutput_camera(0,0,0,0,0,0);
+
+bool bInitialCenter1 = true;
+bool bInitialCenter2 = true;
+bool bTracker1Confid = false;
+bool bTracker2Confid = false;
+
+ Tracker::do_tracking = true; // Start initially
+ Tracker::do_center = false; // Center initially
+
+ //
+ // Test some Filter-stuff
+ //
+ if (pFilter) {
+ QString filterName;
+ //pFilter->getFullName(&filterName);
+ //qDebug() << "Tracker::run() FilterName = " << filterName;
+ }
+
+ //
+ // Setup the DirectInput for keyboard strokes
+ //
+ // create the DirectInput interface
+ if (DirectInput8Create(GetModuleHandle(NULL), DIRECTINPUT_VERSION, IID_IDirectInput8,
+ (void**)&din, NULL) != DI_OK) { // COM stuff, so we'll set it to NULL
+ qDebug() << "Tracker::setup DirectInput8 Creation failed!" << GetLastError();
+ }
+
+ // create the keyboard device
+ if (din->CreateDevice(GUID_SysKeyboard, &dinkeyboard, NULL) != DI_OK) {
+ qDebug() << "Tracker::setup CreateDevice function failed!" << GetLastError();
+ }
+ // create the mouse device
+ din->CreateDevice(GUID_SysMouse, &dinmouse, NULL);
+
+ // set the data format to keyboard format
+ if (dinkeyboard->SetDataFormat(&c_dfDIKeyboard) != DI_OK) {
+ qDebug() << "Tracker::setup SetDataFormat function failed!" << GetLastError();
+ }
+ // set the data format to mouse format
+ dinmouse->SetDataFormat(&c_dfDIMouse);
+
+ // set the control you will have over the keyboard
+ if (dinkeyboard->SetCooperativeLevel(mainApp->winId(), DISCL_NONEXCLUSIVE | DISCL_BACKGROUND) != DI_OK) {
+ qDebug() << "Tracker::setup SetCooperativeLevel function failed!" << GetLastError();
+ }
+ // set the control you will have over the mouse
+ dinmouse->SetCooperativeLevel(mainApp->winId(), DISCL_NONEXCLUSIVE | DISCL_BACKGROUND);
+
+ forever
+ {
+
+ // Check event for stop thread
+ if(::WaitForSingleObject(m_StopThread, 0) == WAIT_OBJECT_0)
+ {
+ dinkeyboard->Unacquire(); // Unacquire keyboard
+ dinkeyboard->Release();
+ dinmouse->Unacquire(); // Unacquire mouse
+ dinmouse->Release();
+ din->Release(); // Release DirectInput
+
+ // Set event
+ ::SetEvent(m_WaitThread);
+ 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;
+ }
+
+ //
+ // Check the mouse
+ //
+ // get access if we don't have it already
+ retAcquire = dinmouse->Acquire();
+ if ( (retAcquire != DI_OK) && (retAcquire != S_FALSE) ) {
+ qDebug() << "Tracker::run Acquire function failed!" << GetLastError();
+ }
+ else {
+ if (dinmouse->GetDeviceState(sizeof(DIMOUSESTATE), (LPVOID)&mousestate) != DI_OK) {
+ qDebug() << "Tracker::run GetDeviceState function failed!" << GetLastError();
+ }
+ else {
+ //
+ // Check the state of the StartStop MouseKey
+ //
+ if ( isMouseKeyPressed( &StartStopMouseKey, &mousestate ) && (!lastStartStopMouseKey) ) {
+ Tracker::do_tracking = !Tracker::do_tracking;
+
+ //
+ // To start tracking again and to be at '0', execute Center command too
+ //
+ if (Tracker::do_tracking) {
+ Tracker::confid = false;
+ if (pTracker) {
+ pTracker->StartTracker( mainApp->winId() );
+ }
+ if (pSecondTracker) {
+ pSecondTracker->StartTracker( mainApp->winId() );
+ }
+ }
+ else {
+ if (setEngineStop) { // Only stop engine when option is checked
+ if (pTracker) {
+ pTracker->StopTracker( false );
+ }
+ if (pSecondTracker) {
+ pSecondTracker->StopTracker( false );
+ }
+ }
+ }
+ qDebug() << "Tracker::run() says StartStop pressed, do_tracking =" << Tracker::do_tracking;
+ }
+ lastStartStopMouseKey = isMouseKeyPressed( &StartStopMouseKey, &mousestate ); // Remember
+
+ //
+ // Check the state of the Center MouseKey
+ //
+ if ( isMouseKeyPressed( &CenterMouseKey, &mousestate ) && (!lastCenterMouseKey) ) {
+ Tracker::do_center = true;
+ qDebug() << "Tracker::run() says Center MouseKey pressed";
+ }
+ lastCenterMouseKey = isMouseKeyPressed( &CenterMouseKey, &mousestate ); // Remember
+
+ //
+ // Check the state of the GameZero MouseKey
+ //
+ if ( isMouseKeyPressed( &GameZeroMouseKey, &mousestate ) && (!lastGameZeroMouseKey) ) {
+ Tracker::do_game_zero = true;
+ qDebug() << "Tracker::run() says GameZero MouseKey pressed";
+ }
+ lastGameZeroMouseKey = isMouseKeyPressed( &GameZeroMouseKey, &mousestate ); // Remember
+
+ //
+ // Check the state of the Inhibit MouseKey
+ //
+ if ( isMouseKeyPressed( &InhibitMouseKey, &mousestate ) && (!lastInhibitMouseKey) ) {
+ Tracker::do_inhibit = !Tracker::do_inhibit;
+ qDebug() << "Tracker::run() says Inhibit MouseKey pressed";
+ //
+ // Execute Center command too, when inhibition ends.
+ //
+ if (!Tracker::do_inhibit) {
+ Tracker::do_center = true;
+ }
+ }
+ lastInhibitMouseKey = isMouseKeyPressed( &InhibitMouseKey, &mousestate ); // Remember
+ }
+ }
+
+ //
+ // Check the keyboard
+ //
+ // get access if we don't have it already
+ retAcquire = dinkeyboard->Acquire();
+ if ( (retAcquire != DI_OK) && (retAcquire != S_FALSE) ) {
+ qDebug() << "Tracker::run Acquire function failed!" << GetLastError();
+ }
+ else {
+ // get the input data
+ if (dinkeyboard->GetDeviceState(256, (LPVOID)keystate) != DI_OK) {
+ qDebug() << "Tracker::run GetDeviceState function failed!" << GetLastError();
+ }
+ else {
+ //
+ // Check the state of the Start/Stop key
+ //
+ if ( isShortKeyPressed( &StartStopKey, &keystate[0] ) && (!lastStartStopKey) ) {
+ Tracker::do_tracking = !Tracker::do_tracking;
+
+ //
+ // To start tracking again and to be at '0', execute Center command too
+ //
+ if (Tracker::do_tracking) {
+ Tracker::confid = false;
+ if (pTracker) {
+ pTracker->StartTracker( mainApp->winId() );
+ }
+ if (pSecondTracker) {
+ pSecondTracker->StartTracker( mainApp->winId() );
+ }
+ }
+ else {
+ if (setEngineStop) { // Only stop engine when option is checked
+ if (pTracker) {
+ pTracker->StopTracker( false );
+ }
+ if (pSecondTracker) {
+ pSecondTracker->StopTracker( false );
+ }
+ }
+ }
+ qDebug() << "Tracker::run() says StartStop pressed, do_tracking =" << Tracker::do_tracking;
+ }
+ lastStartStopKey = isShortKeyPressed( &StartStopKey, &keystate[0] ); // Remember
+
+ //
+ // Check the state of the Center key
+ //
+ if ( isShortKeyPressed( &CenterKey, &keystate[0] ) && (!lastCenterKey) ) {
+ Tracker::do_center = true;
+ qDebug() << "Tracker::run() says Center pressed";
+ }
+ lastCenterKey = isShortKeyPressed( &CenterKey, &keystate[0] ); // Remember
+
+ //
+ // Check the state of the GameZero key
+ //
+ if ( isShortKeyPressed( &GameZeroKey, &keystate[0] ) && (!lastGameZeroKey) ) {
+ Tracker::do_game_zero = true;
+ qDebug() << "Tracker::run() says GameZero pressed";
+ }
+ lastGameZeroKey = isShortKeyPressed( &GameZeroKey, &keystate[0] ); // Remember
+
+ //
+ // Check the state of the Inhibit key
+ //
+ if ( isShortKeyPressed( &InhibitKey, &keystate[0] ) && (!lastInhibitKey) ) {
+ Tracker::do_inhibit = !Tracker::do_inhibit;
+ qDebug() << "Tracker::run() says Inhibit pressed";
+ //
+ // Execute Center command too, when inhibition ends.
+ //
+ if (!Tracker::do_inhibit) {
+ Tracker::do_center = true;
+ }
+ }
+ lastInhibitKey = isShortKeyPressed( &InhibitKey, &keystate[0] ); // Remember
+ }
+ }
+
+ //
+ // Reset the 'wait' flag. Moving above 90 with the key pressed, will (de-)activate Axis Reverse.
+ //
+// qDebug() << "Tracker::run() says actualZ = " << actualZ << ", terwijl Z_Pos4 = " << Z_Pos4ReverseAxis;
+ if (useAxisReverse) {
+ Tracker::do_axis_reverse = ((fabs(actualYaw) > YawAngle4ReverseAxis) && (actualZ < Z_Pos4ReverseAxis));
+ }
+ else {
+ Tracker::do_axis_reverse = false;
+ }
+
+
+ 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;
+
+ //
+ // The second tracker serves as 'secondary'. So if an axis is written by the second tracker it CAN be overwritten by the Primary tracker.
+ // This is enforced by the sequence below.
+ //
+ if (pSecondTracker) {
+ bTracker2Confid = pSecondTracker->GiveHeadPoseData(&newpose);
+ }
+ else {
+ bTracker2Confid = false;
+ bInitialCenter2 = false;
+ }
+ if (pTracker) {
+ bTracker1Confid = pTracker->GiveHeadPoseData(&newpose);
+// qDebug() << "Tracker::run() says Roll = " << newpose.roll;
+ }
+ else {
+ bTracker1Confid = false;
+ bInitialCenter1 = false;
+ }
+
+ Tracker::confid = (bTracker1Confid || bTracker2Confid);
+ if ( Tracker::confid ) {
+ addHeadPose(newpose);
+ }
+
+ //
+ // If Center is pressed, copy the current values to the offsets.
+ //
+ if ((Tracker::do_center) || ((bInitialCenter1 && bTracker1Confid ) || (bInitialCenter2 && bTracker2Confid))) {
+
+ if (!DisableBeep) {
+ MessageBeep (MB_ICONASTERISK); // Acknowledge the key-press with a beep.
+ }
+ if (pTracker && bTracker1Confid) {
+ pTracker->notifyCenter(); // Send 'center' to the tracker
+ bInitialCenter1 = false;
+ }
+ if (pSecondTracker && bTracker2Confid) {
+ pSecondTracker->notifyCenter(); // Send 'center' to the second tracker
+ bInitialCenter2 = false;
+ }
+
+ //
+ // Only copy valid values
+ //
+ if (Tracker::confid) {
+
+ offset_camera.x = getSmoothFromList( &X.rawList );
+ offset_camera.y = getSmoothFromList( &Y.rawList );
+ offset_camera.z = getSmoothFromList( &Z.rawList );
+ offset_camera.pitch = getSmoothFromList( &Pitch.rawList );
+ offset_camera.yaw = getSmoothFromList( &Yaw.rawList );
+ offset_camera.roll = getSmoothFromList( &Roll.rawList );
+ }
+
+ Tracker::do_center = false;
+ }
+
+ //
+ // If Set Game Zero is pressed, copy the current values to the offsets.
+ // Change requested by Stanislaw
+ //
+ if (Tracker::confid && Tracker::do_game_zero) {
+ if (pTracker) {
+ if (!pTracker->notifyZeroed())
+ gamezero_camera = gameoutput_camera;
+ }
+// gamezero_camera = gameoutput_camera;
+
+ Tracker::do_game_zero = false;
+ }
+
+ if (Tracker::do_tracking && Tracker::confid) {
+
+ // get values
+ target_camera.x = getSmoothFromList( &X.rawList );
+ target_camera.y = getSmoothFromList( &Y.rawList );
+ target_camera.z = getSmoothFromList( &Z.rawList );
+ target_camera.pitch = getSmoothFromList( &Pitch.rawList );
+ target_camera.yaw = getSmoothFromList( &Yaw.rawList );
+ target_camera.roll = getSmoothFromList( &Roll.rawList );
+// qDebug() << "Tracker::run() says Roll from Smoothing = " << target_camera.roll;
+
+ // do the centering
+ target_camera = target_camera - offset_camera;
+
+ //
+ // Use advanced filtering, when a filter was selected.
+ //
+ if (pFilter) {
+ pFilter->FilterHeadPoseData(&current_camera, &target_camera, &new_camera, Tracker::Pitch.newSample);
+// qDebug() << "Tracker::run() says Roll in Filter = " << current_camera.roll << ", Roll to output = " << new_camera.roll;
+ }
+ else {
+ new_camera = target_camera;
+// qDebug() << "Tracker::run() says Roll to output = " << new_camera.roll;
+ }
+ output_camera.x = X.invert * X.curvePtr->getValue(new_camera.x);
+ output_camera.y = Y.invert * Y.curvePtr->getValue(new_camera.y);
+ output_camera.z = Z.invert * Z.curvePtr->getValue(new_camera.z);
+
+ //
+ // Determine, which curve (Up or Down) must be used for Pitch
+ //
+ bool altp = (new_camera.pitch < 0);
+ if (altp) {
+ output_camera.pitch = Pitch.invert * Pitch.curvePtrAlt->getValue(new_camera.pitch);
+ Pitch.curvePtr->setTrackingActive( false );
+ Pitch.curvePtrAlt->setTrackingActive( true );
+ }
+ else {
+ output_camera.pitch = Pitch.invert * Pitch.curvePtr->getValue(new_camera.pitch);
+ Pitch.curvePtr->setTrackingActive( true );
+ Pitch.curvePtrAlt->setTrackingActive( false );
+ }
+ output_camera.yaw = Yaw.invert * Yaw.curvePtr->getValue(new_camera.yaw);
+ output_camera.roll = Roll.invert * Roll.curvePtr->getValue(new_camera.roll);
+
+ X.curvePtr->setTrackingActive( true );
+ Y.curvePtr->setTrackingActive( true );
+ Z.curvePtr->setTrackingActive( true );
+ Yaw.curvePtr->setTrackingActive( true );
+ Roll.curvePtr->setTrackingActive( true );
+
+ //
+ // Reverse Axis.
+ //
+ actualYaw = output_camera.yaw; // Save the actual Yaw, otherwise we can't check for +90
+ actualZ = output_camera.z; // Also the Z
+ if (Tracker::do_axis_reverse) {
+ output_camera.z = Z_PosWhenReverseAxis; // Set the desired Z-position
+ }
+
+ //
+ // Reset value for the selected axis, if inhibition is active
+ //
+ if (Tracker::do_inhibit) {
+ if (InhibitKey.doPitch) output_camera.pitch = 0.0f;
+ if (InhibitKey.doYaw) output_camera.yaw = 0.0f;
+ if (InhibitKey.doRoll) output_camera.roll = 0.0f;
+ if (InhibitKey.doX) output_camera.x = 0.0f;
+ if (InhibitKey.doY) output_camera.y = 0.0f;
+ if (InhibitKey.doZ) output_camera.z = 0.0f;
+ }
+
+ //
+ // Send the headpose to the game
+ //
+ if (pProtocol) {
+ gameoutput_camera = output_camera + gamezero_camera;
+ pProtocol->sendHeadposeToGame( &gameoutput_camera, &newpose ); // degrees & centimeters
+ }
+ }
+ else {
+ //
+ // Go to initial position
+ //
+ if (pProtocol && setZero) {
+ output_camera.pitch = 0.0f;
+ output_camera.yaw = 0.0f;
+ output_camera.roll = 0.0f;
+ output_camera.x = 0.0f;
+ output_camera.y = 0.0f;
+ output_camera.z = 0.0f;
+ gameoutput_camera = output_camera + gamezero_camera;
+ pProtocol->sendHeadposeToGame( &gameoutput_camera, &newpose ); // degrees & centimeters
+ }
+ 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 );
+ }
+ }
+
+ Tracker::Pitch.newSample = false;
+ ReleaseMutex(Tracker::hTrackMutex);
+
+ //for lower cpu load
+ usleep(10000);
+ yieldCurrentThread();
+ }
+}
+
+/** Add the headpose-data to the Lists **/
+void Tracker::addHeadPose( THeadPoseData head_pose )
+{
+ // Pitch
+ Tracker::Pitch.headPos = head_pose.pitch; // degrees
+ addRaw2List ( &Pitch.rawList, Pitch.maxItems, Tracker::Pitch.headPos );
+// Tracker::Pitch.confidence = head_pose.confidence; // Just this one ...
+ Tracker::Pitch.newSample = true;
+
+ // Yaw
+ Tracker::Yaw.headPos = head_pose.yaw; // degrees
+ addRaw2List ( &Yaw.rawList, Yaw.maxItems, Tracker::Yaw.headPos );
+
+ // Roll
+ Tracker::Roll.headPos = head_pose.roll; // degrees
+ addRaw2List ( &Roll.rawList, Roll.maxItems, Tracker::Roll.headPos );
+
+ // X-position
+ Tracker::X.headPos = head_pose.x; // centimeters
+ addRaw2List ( &X.rawList, X.maxItems, Tracker::X.headPos );
+
+ // Y-position
+ Tracker::Y.headPos = head_pose.y; // centimeters
+ addRaw2List ( &Y.rawList, Y.maxItems, Tracker::Y.headPos );
+
+ // Z-position (distance to camera, absolute!)
+ Tracker::Z.headPos = head_pose.z; // centimeters
+ addRaw2List ( &Z.rawList, Z.maxItems, Tracker::Z.headPos );
+}
+
+//
+// Get the ProgramName from the Game and return it.
+//
+QString Tracker::getGameProgramName() {
+QString str;
+char dest[100];
+
+ str = QString("No protocol active?");
+ if (pProtocol) {
+ pProtocol->getNameFromGame( dest );
+ str = QString( dest );
+ }
+ return str;
+}
+
+//
+// Handle the command, send upstream by the game.
+// Valid values are:
+// 1 = reset Headpose
+//
+bool Tracker::handleGameCommand ( int command ) {
+
+ qDebug() << "handleGameCommand says: Command =" << command;
+
+ switch ( command ) {
+ case 1: // reset headtracker
+ Tracker::do_center = true;
+ break;
+ default:
+ break;
+ }
+ return false;
+}
+
+//
+// Add the new Raw value to the QList.
+// Remove the last item(s), depending on the set maximum list-items.
+//
+void Tracker::addRaw2List ( QList<float> *rawList, float maxIndex, float raw ) {
+ //
+ // Remove old values from the end of the QList.
+ // If the setting for MaxItems was lowered, the QList is shortened here...
+ //
+ while (rawList->size() >= maxIndex) {
+ rawList->removeLast();
+ }
+
+ //
+ // Insert the newest at the beginning.
+ //
+ rawList->prepend ( raw );
+}
+
+//
+// Get the raw headpose, so it can be displayed.
+//
+void Tracker::getHeadPose( THeadPoseData *data ) {
+ data->x = Tracker::X.headPos; // centimeters
+ data->y = Tracker::Y.headPos;
+ data->z = Tracker::Z.headPos;
+
+ data->pitch = Tracker::Pitch.headPos; // degrees
+ data->yaw = Tracker::Yaw.headPos;
+ data->roll = Tracker::Roll.headPos;
+}
+
+//
+// Get the output-headpose, so it can be displayed.
+//
+void Tracker::getOutputHeadPose( THeadPoseData *data ) {
+ data->x = output_camera.x; // centimeters
+ data->y = output_camera.y;
+ data->z = output_camera.z;
+
+ data->pitch = output_camera.pitch; // degrees
+ data->yaw = output_camera.yaw;
+ data->roll = output_camera.roll;
+}
+
+//
+// Get the Smoothed value from the QList.
+//
+float Tracker::getSmoothFromList ( QList<float> *rawList ) {
+float sum = 0;
+
+ if (rawList->isEmpty()) return 0.0f;
+
+ //
+ // Add the Raw values and divide.
+ //
+ for ( int i = 0; i < rawList->size(); i++) {
+ sum += rawList->at(i);
+ }
+ return sum / rawList->size();
+}
+
+//
+// Load the current Settings from the currently 'active' INI-file.
+//
+void Tracker::loadSettings() {
+//int NeutralZone;
+//int sensYaw, sensPitch, sensRoll;
+//int sensX, sensY, sensZ;
+
+ qDebug() << "Tracker::loadSettings says: Starting ";
+ QSettings settings("Abbequerque Inc.", "FaceTrackNoIR"); // Registry settings (in HK_USER)
+
+ QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/Settings/default.ini" ).toString();
+ QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file)
+
+ qDebug() << "loadSettings says: iniFile = " << currentFile;
+
+ //
+ // Read the Tracking settings, to fill the curves.
+ //
+ //iniFile.beginGroup ( "Tracking" );
+ //NeutralZone = iniFile.value ( "NeutralZone", 5 ).toInt();
+ //sensYaw = iniFile.value ( "sensYaw", 100 ).toInt();
+ //sensPitch = iniFile.value ( "sensPitch", 100 ).toInt();
+ //sensRoll = iniFile.value ( "sensRoll", 100 ).toInt();
+ //sensX = iniFile.value ( "sensX", 100 ).toInt();
+ //sensY = iniFile.value ( "sensY", 100 ).toInt();
+ //sensZ = iniFile.value ( "sensZ", 100 ).toInt();
+ //iniFile.endGroup ();
+
+ //
+ // Read the keyboard shortcuts.
+ //
+ iniFile.beginGroup ( "KB_Shortcuts" );
+
+ // Center key
+ CenterMouseKey = iniFile.value ( "MouseKey_Center", 0 ).toInt();
+ CenterKey.keycode = iniFile.value ( "Keycode_Center", DIK_HOME ).toInt();
+ CenterKey.shift = iniFile.value ( "Shift_Center", 0 ).toBool();
+ CenterKey.ctrl = iniFile.value ( "Ctrl_Center", 0 ).toBool();
+ CenterKey.alt = iniFile.value ( "Alt_Center", 0 ).toBool();
+ DisableBeep = iniFile.value ( "Disable_Beep", 0 ).toBool();
+
+ // StartStop key
+ StartStopMouseKey = iniFile.value ( "MouseKey_StartStop", 0 ).toInt();
+ StartStopKey.keycode = iniFile.value ( "Keycode_StartStop", DIK_END ).toInt();
+ StartStopKey.shift = iniFile.value ( "Shift_StartStop", 0 ).toBool();
+ StartStopKey.ctrl = iniFile.value ( "Ctrl_StartStop", 0 ).toBool();
+ StartStopKey.alt = iniFile.value ( "Alt_StartStop", 0 ).toBool();
+ setZero = iniFile.value ( "SetZero", 1 ).toBool();
+ setEngineStop = iniFile.value ( "SetEngineStop", 1 ).toBool();
+
+ // Inhibit key
+ InhibitMouseKey = iniFile.value ( "MouseKey_Inhibit", 0 ).toInt();
+ InhibitKey.keycode = iniFile.value ( "Keycode_Inhibit", 0 ).toInt();
+ InhibitKey.shift = iniFile.value ( "Shift_Inhibit", 0 ).toBool();
+ InhibitKey.ctrl = iniFile.value ( "Ctrl_Inhibit", 0 ).toBool();
+ InhibitKey.alt = iniFile.value ( "Alt_Inhibit", 0 ).toBool();
+ InhibitKey.doPitch = iniFile.value ( "Inhibit_Pitch", 0 ).toBool();
+ InhibitKey.doYaw = iniFile.value ( "Inhibit_Yaw", 0 ).toBool();
+ InhibitKey.doRoll = iniFile.value ( "Inhibit_Roll", 0 ).toBool();
+ InhibitKey.doX = iniFile.value ( "Inhibit_X", 0 ).toBool();
+ InhibitKey.doY = iniFile.value ( "Inhibit_Y", 0 ).toBool();
+ InhibitKey.doZ = iniFile.value ( "Inhibit_Z", 0 ).toBool();
+
+ // Game Zero key
+ GameZeroMouseKey = iniFile.value ( "MouseKey_GameZero", 0 ).toInt();
+ GameZeroKey.keycode = iniFile.value ( "Keycode_GameZero", 0 ).toInt();
+ GameZeroKey.shift = iniFile.value ( "Shift_GameZero", 0 ).toBool();
+ GameZeroKey.ctrl = iniFile.value ( "Ctrl_GameZero", 0 ).toBool();
+ GameZeroKey.alt = iniFile.value ( "Alt_GameZero", 0 ).toBool();
+
+ // Axis Reverse key
+ //AxisReverseKey.keycode = DIK_R;
+ //AxisReverseKey.shift = false;
+ //AxisReverseKey.ctrl = false;
+ //AxisReverseKey.alt = false;
+
+ // Reverse Axis
+ useAxisReverse = iniFile.value ( "Enable_ReverseAxis", 0 ).toBool();
+ YawAngle4ReverseAxis = iniFile.value ( "RA_Yaw", 40 ).toInt();
+ Z_Pos4ReverseAxis = iniFile.value ( "RA_ZPos", 50 ).toInt();
+ Z_PosWhenReverseAxis = iniFile.value ( "RA_ToZPos", 80 ).toInt();
+
+ iniFile.endGroup ();
+}
+
+//
+// Determine if the ShortKey (incl. CTRL, SHIFT and/or ALT) is pressed.
+//
+bool Tracker::isShortKeyPressed( TShortKey *key, BYTE *keystate ){
+bool shift;
+bool ctrl;
+bool alt;
+
+ //
+ // First, check if the right key is pressed. If so, check the modifiers
+ //
+ if (keystate[key->keycode] & 0x80) {
+ shift = ( (keystate[DIK_LSHIFT] & 0x80) || (keystate[DIK_RSHIFT] & 0x80) );
+ ctrl = ( (keystate[DIK_LCONTROL] & 0x80) || (keystate[DIK_RCONTROL] & 0x80) );
+ alt = ( (keystate[DIK_LALT] & 0x80) || (keystate[DIK_RALT] & 0x80) );
+
+ //
+ // If one of the modifiers is needed and not pressed, return false.
+ //
+ if (key->shift && !shift) return false;
+ if (key->ctrl && !ctrl) return false;
+ if (key->alt && !alt) return false;
+
+ //
+ // All is well!
+ //
+ return true;
+ }
+ else {
+ return false;
+ }
+}
+
+//
+// Determine if the MouseKey is pressed.
+//
+bool Tracker::isMouseKeyPressed( int *key, DIMOUSESTATE *mousestate ){
+
+ //
+ // If key == NONE, or invalid: ready!
+ //
+ if ((*key <= 0) || (*key > 5)) {
+ return false;
+ }
+
+ //
+ // Now, check if the right key is pressed.
+ //
+ if (mousestate->rgbButtons[*key-1] & 0x80) {
+ return true;
+ }
+ else {
+ return false;
+ }
+}
diff --git a/facetracknoir/tracker.h b/facetracknoir/tracker.h
new file mode 100644
index 00000000..4b161293
--- /dev/null
+++ b/facetracknoir/tracker.h
@@ -0,0 +1,282 @@
+/********************************************************************************
+* FaceTrackNoIR This program is a private project of the some enthusiastic *
+* gamers from Holland, who don't like to pay much for *
+* head-tracking. *
+* *
+* Copyright (C) 2010 - 2012 Wim Vriend (Developing) *
+* Ron Hendriks (Researching and Testing) *
+* *
+* Homepage * *
+* This program is free software; you can redistribute it and/or modify it *
+* under the terms of the GNU General Public License as published by the *
+* Free Software Foundation; either version 3 of the License, or (at your *
+* option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, but *
+* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
+* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for *
+* more details. *
+* *
+* You should have received a copy of the GNU General Public License along *
+* with this program; if not, see <http://www.gnu.org/licenses/>. *
+*********************************************************************************/
+/*
+ Modifications (last one on top):
+ 20120717 - WVR: FunctionConfig is now used for the Curves, instead of BezierConfig.
+*/
+#ifndef __TRACKER_H__
+#define __TRACKER_H__
+
+#include <QThread>
+#include <QMessageBox>
+#include <QLineEdit>
+#include <QThread>
+#include <QPoint>
+#include <QWaitCondition>
+#include <QList>
+#include <QPainterPath>
+#include <QDebug>
+
+#define DIRECTINPUT_VERSION 0x0800
+#include <Dinput.h>
+
+#include "FunctionConfig.h"
+
+#include "..\ftnoir_tracker_base\FTNoIR_Tracker_base.h"
+#include "..\ftnoir_protocol_base\FTNoIR_Protocol_base.h"
+#include "..\ftnoir_filter_base\FTNoIR_Filter_base.h"
+#include "tracker_types.h"
+
+typedef ITrackerPtr (WINAPI *importGetTracker)(void);
+typedef IProtocolPtr (WINAPI *importGetProtocol)(void);
+typedef IFilterPtr (WINAPI *importGetFilter)(void);
+
+// include the DirectX Library files
+#pragma comment (lib, "dinput8.lib")
+#pragma comment (lib, "dxguid.lib")
+
+enum AngleName {
+ PITCH = 0,
+ YAW = 1,
+ ROLL = 2,
+ X = 3,
+ Y = 4,
+ Z = 5
+};
+
+enum FTNoIR_Client {
+ FREE_TRACK = 0,
+ FLIGHTGEAR = 1,
+ FTNOIR = 2,
+ PPJOY = 3,
+ TRACKIR = 4,
+ SIMCONNECT = 5,
+ FSUIPC = 6,
+ MOUSE = 7
+};
+
+//enum FTNoIR_Face_Tracker {
+// FT_SM_FACEAPI = 0,
+// FT_FTNOIR = 1,
+// FT_VISAGE = 2
+//};
+
+enum FTNoIR_Tracker_Status {
+ TRACKER_OFF = 0,
+ TRACKER_ON = 1
+};
+
+class FaceTrackNoIR; // pre-define parent-class to avoid circular includes
+
+//
+// Structure to hold all variables concerning one of 6 DOF's
+//
+class THeadPoseDOF {
+public:
+
+ THeadPoseDOF(QString primary, QString secondary = "", int maxInput1 = 50, int maxOutput1 = 180, int maxInput2 = 50, int maxOutput2 = 90) {
+ QSettings settings("Abbequerque Inc.", "FaceTrackNoIR"); // Registry settings (in HK_USER)
+ QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/Settings/default.ini" ).toString();
+ QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file)
+
+ curvePtr = new FunctionConfig(primary, maxInput1, maxOutput1); // Create the Function-config for input-output translation
+ curvePtr->loadSettings(iniFile); // Load the settings from the INI-file
+ if (secondary != "") {
+ curvePtrAlt = new FunctionConfig(secondary, maxInput2, maxOutput2);
+ curvePtrAlt->loadSettings(iniFile);
+ }
+
+ }
+
+ void initHeadPoseData(){
+ headPos = 0.0f;
+ invert = 0.0f;
+ red = 0.0f;
+ rawList.clear();
+ maxItems = 10.0f;
+ prevPos = 0.0f;
+ prevRawPos = 0.0f;
+ NeutralZone = 0;
+ MaxInput = 0;
+ confidence = 0.0f;
+ newSample = FALSE;
+
+ qDebug() << "initHeadPoseData: " << curvePtr->getTitle();
+
+ }
+ float headPos; // Current position (from faceTracker, radials or meters)
+ float invert; // Invert measured value (= 1.0f or -1.0f)
+ float red; // Reduction factor (used for EWMA-filtering, between 0.0f and 1.0f)
+ QList<float> rawList; // List of 'n' headPos values (used for moving average)
+ int maxItems; // Maximum number of elements in rawList
+ float prevPos; // Previous Position
+ float prevRawPos; // Previous Raw Position
+
+ FunctionConfig* curvePtr; // Function to translate input -> output
+ FunctionConfig* curvePtrAlt;
+
+ int NeutralZone; // Neutral zone
+ int MaxInput; // Maximum raw input
+ float confidence; // Current confidence
+ bool newSample; // Indicate new sample from tracker
+};
+
+//
+// Structure to hold keycode and CTRL, SHIFT, ALT for shortkeys
+//
+struct TShortKey {
+ BYTE keycode; // Required Key
+ bool shift; // Modifiers to examine
+ bool ctrl;
+ bool alt;
+ bool doPitch; // Modifiers to act on axis
+ bool doYaw;
+ bool doRoll;
+ bool doX;
+ bool doY;
+ bool doZ;
+};
+
+class Tracker : public QThread {
+ Q_OBJECT
+
+private:
+ // Handles to neatly terminate thread...
+ HANDLE m_StopThread;
+ HANDLE m_WaitThread;
+
+ static T6DOF current_camera; // Used for filtering
+ static T6DOF target_camera;
+ static T6DOF new_camera;
+ static T6DOF output_camera;
+
+ ITrackerPtr pTracker; // Pointer to Tracker instance (in DLL)
+ ITrackerPtr pSecondTracker; // Pointer to second Tracker instance (in DLL)
+ static IProtocolPtr pProtocol; // Pointer to Protocol instance (in DLL)
+ static IFilterPtr pFilter; // Pointer to Filter instance (in DLL)
+
+ static void addHeadPose( THeadPoseData head_pose );
+ static void addRaw2List ( QList<float> *rawList, float maxIndex, float raw );
+
+ static TShortKey CenterKey; // ShortKey to Center headposition
+ static TShortKey StartStopKey; // ShortKey to Start/stop tracking
+ static TShortKey InhibitKey; // ShortKey to disable one or more axis during tracking
+ static TShortKey GameZeroKey; // ShortKey to Set Game Zero
+// static TShortKey AxisReverseKey; // ShortKey to reverse axis during tracking
+
+ static int CenterMouseKey; // ShortKey to Center headposition
+ static int StartStopMouseKey; // ShortKey to Start/stop tracking
+ static int InhibitMouseKey; // ShortKey to disable one or more axis during tracking
+ static int GameZeroMouseKey; // ShortKey to Set Game Zero
+ static bool DisableBeep; // Disable Beep when center is pressed
+
+ // Flags to start/stop/reset tracking
+ static bool confid; // Tracker data is OK
+ static bool do_tracking; // Start/stop tracking, using the shortkey
+ static bool do_center; // Center head-position, using the shortkey
+ static bool do_inhibit; // Inhibit DOF-axis, using the shortkey
+ static bool do_game_zero; // Set in-game zero, using the shortkey
+ static bool do_axis_reverse; // Axis reverse, using the shortkey
+
+ static HANDLE hTrackMutex; // Prevent reading/writing the headpose simultaneously
+
+ static bool setZero; // Set to zero's, when OFF (one-shot)
+ static bool setEngineStop; // Stop tracker->engine, when OFF
+
+ static bool useAxisReverse; // Use Axis Reverse
+ static float YawAngle4ReverseAxis; // Axis Reverse settings
+ static float Z_Pos4ReverseAxis;
+ static float Z_PosWhenReverseAxis;
+
+ FaceTrackNoIR *mainApp;
+
+protected:
+ // qthread override run method
+ void run();
+
+public:
+ Tracker( FaceTrackNoIR *parent );
+ ~Tracker();
+
+ /** static member variables for saving the head pose **/
+ static THeadPoseDOF Pitch; // Head-rotation X-direction (Up/Down)
+ static THeadPoseDOF Yaw; // Head-rotation Y-direction ()
+ static THeadPoseDOF Roll; // Head-rotation Z-direction ()
+ static THeadPoseDOF X; // Head-movement X-direction (Left/Right)
+ static THeadPoseDOF Y; // Head-movement Y-direction (Up/Down)
+ static THeadPoseDOF Z; // Head-movement Z-direction (To/From camera)
+
+ void setup();
+
+// void registerHeadPoseCallback();
+ bool handleGameCommand ( int command );
+ QString getGameProgramName(); // Get the ProgramName from the game and display it.
+ void loadSettings(); // Load settings from the INI-file
+ bool isShortKeyPressed( TShortKey *key, BYTE *keystate );
+ bool isMouseKeyPressed( int *key, DIMOUSESTATE *mousestate );
+
+ static bool getTrackingActive() { return do_tracking && confid; }
+ static bool getAxisReverse() { return do_axis_reverse; }
+
+ static bool getConfid() { return confid; }
+
+ static void setInvertPitch(bool invert) { Pitch.invert = invert?-1.0f:+1.0f; }
+ static void setInvertYaw(bool invert) { Yaw.invert = invert?-1.0f:+1.0f; }
+ static void setInvertRoll(bool invert) { Roll.invert = invert?-1.0f:+1.0f; }
+ static void setInvertX(bool invert) { X.invert = invert?-1.0f:+1.0f; }
+ static void setInvertY(bool invert) { Y.invert = invert?-1.0f:+1.0f; }
+ static void setInvertZ(bool invert) { Z.invert = invert?-1.0f:+1.0f; }
+
+ static void getHeadPose(THeadPoseData *data); // Return the current headpose data
+ static void getOutputHeadPose(THeadPoseData *data); // Return the current (processed) headpose data
+ static IFilterPtr getFilterPtr() { return pFilter; } // Return the pointer for the active Filter
+ ITracker *getTrackerPtr() { return pTracker; } // Return the pointer for the active Tracker
+ ITracker *getSecondTrackerPtr() { return pSecondTracker; } // Return the pointer for the secondary Tracker
+ IProtocol *getProtocolPtr() { return pProtocol; } // Return the pointer for the active Protocol
+
+ void doRefreshVideo() { // Call the face-tracker-function RefreshVideo
+ if (pTracker) {
+ pTracker->refreshVideo();
+ }
+ if (pSecondTracker) {
+ pSecondTracker->refreshVideo();
+ }
+ };
+
+ static float getSmoothFromList ( QList<float> *rawList );
+ static float getDegreesFromRads ( float rads ) { return (rads * 57.295781f); }
+ static float getRadsFromDegrees ( float degrees ) { return (degrees * 0.017453f); }
+
+ // For now, use one slider for all
+ void setSmoothing(int x) {
+ Pitch.maxItems = x;
+ Yaw.maxItems = x;
+ Roll.maxItems = x;
+ X.maxItems = x;
+ Y.maxItems = x;
+ Z.maxItems = x;
+ }
+
+};
+
+#endif \ No newline at end of file
diff --git a/facetracknoir/tracker_types.cpp b/facetracknoir/tracker_types.cpp
new file mode 100644
index 00000000..cdd8d239
--- /dev/null
+++ b/facetracknoir/tracker_types.cpp
@@ -0,0 +1,44 @@
+#include "tracker_types.h"
+#include "rotation.h"
+
+const double PI = 3.14159265358979323846264;
+const double D2R = PI/180.0;
+const double R2D = 180.0/PI;
+
+T6DOF operator-(const T6DOF& A, const T6DOF& B)
+{
+ Rotation R_A(A.yaw*D2R, A.pitch*D2R, A.roll*D2R);
+ Rotation R_B(B.yaw*D2R, B.pitch*D2R, B.roll*D2R);
+ Rotation R_C = R_A * R_B.inv();
+
+ T6DOF C;
+ R_C.toEuler(C.yaw, C.pitch, C.roll);
+ C.yaw *= R2D;
+ C.pitch *= R2D;
+ C.roll *= R2D;
+
+ C.x = A.x - B.x;
+ C.y = A.y - B.y;
+ C.z = A.z - B.z;
+ //C.frame_number?
+ return C;
+}
+
+T6DOF operator+(const T6DOF& A, const T6DOF& B)
+{
+ Rotation R_A(A.yaw*D2R, A.pitch*D2R, A.roll*D2R);
+ Rotation R_B(B.yaw*D2R, B.pitch*D2R, B.roll*D2R);
+ Rotation R_C = R_A * R_B;
+
+ T6DOF C;
+ R_C.toEuler(C.yaw, C.pitch, C.roll);
+ C.yaw *= R2D;
+ C.pitch *= R2D;
+ C.roll *= R2D;
+
+ C.x = A.x + B.x;
+ C.y = A.y + B.y;
+ C.z = A.z + B.z;
+ //C.frame_number?
+ return C;
+}
diff --git a/facetracknoir/tracker_types.h b/facetracknoir/tracker_types.h
new file mode 100644
index 00000000..5a13af85
--- /dev/null
+++ b/facetracknoir/tracker_types.h
@@ -0,0 +1,45 @@
+/********************************************************************************
+* FaceTrackNoIR This program is a private project of the some enthusiastic *
+* gamers from Holland, who don't like to pay much for *
+* head-tracking. *
+* *
+* Copyright (C) 2010 - 2012 Wim Vriend (Developing) *
+* Ron Hendriks (Researching and Testing) *
+* *
+* Homepage * *
+* This program is free software; you can redistribute it and/or modify it *
+* under the terms of the GNU General Public License as published by the *
+* Free Software Foundation; either version 3 of the License, or (at your *
+* option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, but *
+* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
+* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for *
+* more details. *
+* *
+* You should have received a copy of the GNU General Public License along *
+* with this program; if not, see <http://www.gnu.org/licenses/>. *
+*********************************************************************************/
+/*
+ Modifications (last one on top):
+ 20120924 - C14: Moved tracker types only used by Tracker to this file (should not be part of public interface)
+ Modified operators to represent correct frame transitions
+*/
+#ifndef __TRACKER_TYPES_H__
+#define __TRACKER_TYPES_H__
+
+#include "..\ftnoir_tracker_base\ftnoir_tracker_types.h"
+
+class T6DOF : public THeadPoseData
+{
+public:
+ T6DOF() : THeadPoseData() {}
+
+ T6DOF(double x, double y, double z, double yaw, double pitch, double roll)
+ : THeadPoseData(x,y,z, yaw,pitch,roll) {}
+};
+
+T6DOF operator-(const T6DOF& A, const T6DOF& B); // get new pose with respect to reference pose B
+T6DOF operator+(const T6DOF& A, const T6DOF& B); // get new pose with respect to reference pose B^-1
+
+#endif //__TRACKER_TYPES_H__ \ No newline at end of file