summaryrefslogtreecommitdiffhomepage
path: root/FaceTrackNoIR
diff options
context:
space:
mode:
authorWim Vriend <facetracknoir@gmail.com>2010-06-13 15:44:02 +0000
committerWim Vriend <facetracknoir@gmail.com>2010-06-13 15:44:02 +0000
commitc6bf844769902c2eda1cb0789dd5872fe9d962ac (patch)
tree12292eb39811efc74f10c16c8db98127fe467370 /FaceTrackNoIR
parent513d1c8521aad3cd5ba7db3b87349553a793c151 (diff)
PPJoy settings dialog added. First try.
git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@12 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb
Diffstat (limited to 'FaceTrackNoIR')
-rw-r--r--FaceTrackNoIR/ClientFiles/FlightGear/Readme.txt3
-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/FTNoIR_ppjoycontrols.ui184
-rw-r--r--FaceTrackNoIR/FaceTrackNoIR.cpp19
-rw-r--r--FaceTrackNoIR/FaceTrackNoIR.h2
-rw-r--r--FaceTrackNoIR/FaceTrackNoIR.ui22
-rw-r--r--FaceTrackNoIR/FaceTrackNoIR.vcproj32
-rw-r--r--FaceTrackNoIR/GeneratedFiles/qrc_FaceTrackNoIR.cpp2
-rw-r--r--FaceTrackNoIR/GeneratedFiles/ui_FTNoIR_ppjoycontrols.h148
-rw-r--r--FaceTrackNoIR/GeneratedFiles/ui_FaceTrackNoIR.h12
-rw-r--r--FaceTrackNoIR/PPJoyServer.cpp51
-rw-r--r--FaceTrackNoIR/PPJoyServer.h22
-rw-r--r--FaceTrackNoIR/Release/BuildLog.htmbin10992 -> 11008 bytes
-rw-r--r--FaceTrackNoIR/Release/mt.dep2
-rw-r--r--FaceTrackNoIR/Release/vc90.idbbin2624512 -> 2624512 bytes
22 files changed, 578 insertions, 14 deletions
diff --git a/FaceTrackNoIR/ClientFiles/FlightGear/Readme.txt b/FaceTrackNoIR/ClientFiles/FlightGear/Readme.txt
index db3bdd8e..c86ffffe 100644
--- a/FaceTrackNoIR/ClientFiles/FlightGear/Readme.txt
+++ b/FaceTrackNoIR/ClientFiles/FlightGear/Readme.txt
@@ -14,3 +14,6 @@ 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/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/FTNoIR_ppjoycontrols.ui b/FaceTrackNoIR/FTNoIR_ppjoycontrols.ui
new file mode 100644
index 00000000..91e1c0c6
--- /dev/null
+++ b/FaceTrackNoIR/FTNoIR_ppjoycontrols.ui
@@ -0,0 +1,184 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>UICPPJoyControls</class>
+ <widget class="QWidget" name="UICPPJoyControls">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>346</width>
+ <height>180</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Engine Controls</string>
+ </property>
+ <property name="windowIcon">
+ <iconset>
+ <normaloff>:/Icons/sm_api_qt_icon.png</normaloff>:/Icons/sm_api_qt_icon.png</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>Virtual Joystick number:</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="_engine_state_label">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="text">
+ <string>TERMINATED</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </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">
+ <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/FaceTrackNoIR.cpp b/FaceTrackNoIR/FaceTrackNoIR.cpp
index de73a0b4..3f665e8b 100644
--- a/FaceTrackNoIR/FaceTrackNoIR.cpp
+++ b/FaceTrackNoIR/FaceTrackNoIR.cpp
@@ -24,6 +24,7 @@
#include "FaceTrackNoIR.h"
#include "tracker.h"
+#include "PPJoyServer.h"
using namespace sm::faceapi;
using namespace sm::faceapi::qt;
@@ -36,6 +37,7 @@ QMainWindow(parent, flags)
{
cameraDetected = false;
_engine_controls = 0;
+ _server_controls = 0;
tracker = 0;
_display = 0;
l = 0;
@@ -62,6 +64,7 @@ void FaceTrackNoIR::setupFaceTrackNoIR() {
connect(ui.actionVideoWidget, SIGNAL(triggered()), this, SLOT(showVideoWidget()));
connect(ui.actionHeadPoseWidget, SIGNAL(triggered()), this, SLOT(showHeadPoseWidget()));
connect(ui.btnShowEngineControls, SIGNAL(clicked()), this, SLOT(showEngineControls()));
+ connect(ui.btnShowServerControls, SIGNAL(clicked()), this, SLOT(showServerControls()));
// button methods connect with methods in this class
connect(ui.btnStartTracker, SIGNAL(clicked()), this, SLOT(startTracker()));
@@ -627,6 +630,22 @@ void FaceTrackNoIR::showEngineControls() {
}
}
+/** toggles Server Controls Dialog **/
+void FaceTrackNoIR::showServerControls() {
+ if (!_server_controls)
+ {
+ qDebug() << "showServerControls says: No server_controls yet!";
+ _server_controls = new PPJoyControls( this, Qt::Dialog );
+ qDebug() << "showServerControls says: After new!";
+ }
+
+ if (_server_controls) {
+ qDebug() << "showServerControls says: Before show!";
+ _server_controls->show();
+ _server_controls->raise();
+ }
+}
+
/** exit application **/
void FaceTrackNoIR::exit() {
QCoreApplication::exit(0);
diff --git a/FaceTrackNoIR/FaceTrackNoIR.h b/FaceTrackNoIR/FaceTrackNoIR.h
index e8ddda12..70f3f08d 100644
--- a/FaceTrackNoIR/FaceTrackNoIR.h
+++ b/FaceTrackNoIR/FaceTrackNoIR.h
@@ -61,6 +61,7 @@ private:
VideoDisplayWidget *_display;
QVBoxLayout *l;
QWidget *_engine_controls;
+ QWidget *_server_controls;
/** QT objects **/
QDialog aboutDialog;
@@ -101,6 +102,7 @@ private:
void showVideoWidget();
void showHeadPoseWidget();
void showEngineControls();
+ void showServerControls();
// sensibility sliders
void setSensYaw( int sens );
diff --git a/FaceTrackNoIR/FaceTrackNoIR.ui b/FaceTrackNoIR/FaceTrackNoIR.ui
index 0cab62bc..cbd4c769 100644
--- a/FaceTrackNoIR/FaceTrackNoIR.ui
+++ b/FaceTrackNoIR/FaceTrackNoIR.ui
@@ -917,6 +917,28 @@ color:#000;</string>
<number>3</number>
</property>
</widget>
+ <widget class="QPushButton" name="btnShowServerControls">
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>80</y>
+ <width>161</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>
diff --git a/FaceTrackNoIR/FaceTrackNoIR.vcproj b/FaceTrackNoIR/FaceTrackNoIR.vcproj
index da799291..9995eec2 100644
--- a/FaceTrackNoIR/FaceTrackNoIR.vcproj
+++ b/FaceTrackNoIR/FaceTrackNoIR.vcproj
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
- Version="9,00"
+ Version="9.00"
Name="FaceTrackNoIR"
ProjectGUID="{9DCDB5B9-941E-42F7-AF76-DF794AA3C013}"
RootNamespace="FaceTrackNoIR"
@@ -427,6 +427,32 @@
/>
</FileConfiguration>
</File>
+ <File
+ RelativePath=".\FTNoIR_ppjoycontrols.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"
>
@@ -566,6 +592,10 @@
RelativePath=".\GeneratedFiles\ui_FaceTrackNoIR.h"
>
</File>
+ <File
+ RelativePath=".\GeneratedFiles\ui_FTNoIR_ppjoycontrols.h"
+ >
+ </File>
<Filter
Name="Release"
Filter="cpp;moc"
diff --git a/FaceTrackNoIR/GeneratedFiles/qrc_FaceTrackNoIR.cpp b/FaceTrackNoIR/GeneratedFiles/qrc_FaceTrackNoIR.cpp
index cc294b4b..f14c187b 100644
--- a/FaceTrackNoIR/GeneratedFiles/qrc_FaceTrackNoIR.cpp
+++ b/FaceTrackNoIR/GeneratedFiles/qrc_FaceTrackNoIR.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
** Resource object code
**
-** Created: Tue 8. Jun 22:08:02 2010
+** Created: Sun 13. Jun 15:55:11 2010
** by: The Resource Compiler for Qt version 4.6.2
**
** WARNING! All changes made in this file will be lost!
diff --git a/FaceTrackNoIR/GeneratedFiles/ui_FTNoIR_ppjoycontrols.h b/FaceTrackNoIR/GeneratedFiles/ui_FTNoIR_ppjoycontrols.h
new file mode 100644
index 00000000..d1759ec4
--- /dev/null
+++ b/FaceTrackNoIR/GeneratedFiles/ui_FTNoIR_ppjoycontrols.h
@@ -0,0 +1,148 @@
+/********************************************************************************
+** Form generated from reading UI file 'FTNoIR_ppjoycontrols.ui'
+**
+** Created: Sun 13. Jun 17:29:36 2010
+** by: Qt User Interface Compiler version 4.6.2
+**
+** WARNING! All changes made in this file will be lost when recompiling UI file!
+********************************************************************************/
+
+#ifndef UI_FTNOIR_PPJOYCONTROLS_H
+#define UI_FTNOIR_PPJOYCONTROLS_H
+
+#include <QtCore/QVariant>
+#include <QtGui/QAction>
+#include <QtGui/QApplication>
+#include <QtGui/QButtonGroup>
+#include <QtGui/QHBoxLayout>
+#include <QtGui/QHeaderView>
+#include <QtGui/QLabel>
+#include <QtGui/QPushButton>
+#include <QtGui/QSpacerItem>
+#include <QtGui/QVBoxLayout>
+#include <QtGui/QWidget>
+
+QT_BEGIN_NAMESPACE
+
+class Ui_UICPPJoyControls
+{
+public:
+ QVBoxLayout *_vertical_layout;
+ QHBoxLayout *hboxLayout;
+ QLabel *textLabel2;
+ QLabel *_engine_state_label;
+ QSpacerItem *verticalSpacer;
+ QHBoxLayout *horizontalLayout;
+ QSpacerItem *horizontalSpacer_2;
+ QHBoxLayout *horizontalLayout_2;
+ QPushButton *btnOK;
+ QPushButton *btnCancel;
+ QSpacerItem *horizontalSpacer;
+
+ void setupUi(QWidget *UICPPJoyControls)
+ {
+ if (UICPPJoyControls->objectName().isEmpty())
+ UICPPJoyControls->setObjectName(QString::fromUtf8("UICPPJoyControls"));
+ UICPPJoyControls->resize(346, 180);
+ QIcon icon;
+ icon.addFile(QString::fromUtf8(":/Icons/sm_api_qt_icon.png"), QSize(), QIcon::Normal, QIcon::Off);
+ UICPPJoyControls->setWindowIcon(icon);
+ UICPPJoyControls->setLayoutDirection(Qt::LeftToRight);
+ UICPPJoyControls->setAutoFillBackground(false);
+ _vertical_layout = new QVBoxLayout(UICPPJoyControls);
+ _vertical_layout->setObjectName(QString::fromUtf8("_vertical_layout"));
+ hboxLayout = new QHBoxLayout();
+ hboxLayout->setObjectName(QString::fromUtf8("hboxLayout"));
+ textLabel2 = new QLabel(UICPPJoyControls);
+ textLabel2->setObjectName(QString::fromUtf8("textLabel2"));
+ QSizePolicy sizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
+ sizePolicy.setHorizontalStretch(0);
+ sizePolicy.setVerticalStretch(0);
+ sizePolicy.setHeightForWidth(textLabel2->sizePolicy().hasHeightForWidth());
+ textLabel2->setSizePolicy(sizePolicy);
+ textLabel2->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
+ textLabel2->setWordWrap(false);
+
+ hboxLayout->addWidget(textLabel2);
+
+ _engine_state_label = new QLabel(UICPPJoyControls);
+ _engine_state_label->setObjectName(QString::fromUtf8("_engine_state_label"));
+ QSizePolicy sizePolicy1(QSizePolicy::Preferred, QSizePolicy::Fixed);
+ sizePolicy1.setHorizontalStretch(0);
+ sizePolicy1.setVerticalStretch(0);
+ sizePolicy1.setHeightForWidth(_engine_state_label->sizePolicy().hasHeightForWidth());
+ _engine_state_label->setSizePolicy(sizePolicy1);
+ _engine_state_label->setFrameShape(QFrame::Panel);
+ _engine_state_label->setFrameShadow(QFrame::Sunken);
+ _engine_state_label->setWordWrap(false);
+
+ hboxLayout->addWidget(_engine_state_label);
+
+
+ _vertical_layout->addLayout(hboxLayout);
+
+ verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
+
+ _vertical_layout->addItem(verticalSpacer);
+
+ horizontalLayout = new QHBoxLayout();
+ horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
+ horizontalSpacer_2 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
+
+ horizontalLayout->addItem(horizontalSpacer_2);
+
+ horizontalLayout_2 = new QHBoxLayout();
+ horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2"));
+ horizontalLayout_2->setSizeConstraint(QLayout::SetDefaultConstraint);
+ btnOK = new QPushButton(UICPPJoyControls);
+ btnOK->setObjectName(QString::fromUtf8("btnOK"));
+ sizePolicy1.setHeightForWidth(btnOK->sizePolicy().hasHeightForWidth());
+ btnOK->setSizePolicy(sizePolicy1);
+ btnOK->setMinimumSize(QSize(100, 0));
+ btnOK->setMaximumSize(QSize(100, 16777215));
+
+ horizontalLayout_2->addWidget(btnOK);
+
+ btnCancel = new QPushButton(UICPPJoyControls);
+ btnCancel->setObjectName(QString::fromUtf8("btnCancel"));
+ sizePolicy1.setHeightForWidth(btnCancel->sizePolicy().hasHeightForWidth());
+ btnCancel->setSizePolicy(sizePolicy1);
+ btnCancel->setMinimumSize(QSize(100, 0));
+ btnCancel->setMaximumSize(QSize(100, 16777215));
+
+ horizontalLayout_2->addWidget(btnCancel);
+
+
+ horizontalLayout->addLayout(horizontalLayout_2);
+
+ horizontalSpacer = new QSpacerItem(10, 20, QSizePolicy::Fixed, QSizePolicy::Minimum);
+
+ horizontalLayout->addItem(horizontalSpacer);
+
+
+ _vertical_layout->addLayout(horizontalLayout);
+
+
+ retranslateUi(UICPPJoyControls);
+
+ QMetaObject::connectSlotsByName(UICPPJoyControls);
+ } // setupUi
+
+ void retranslateUi(QWidget *UICPPJoyControls)
+ {
+ UICPPJoyControls->setWindowTitle(QApplication::translate("UICPPJoyControls", "Engine Controls", 0, QApplication::UnicodeUTF8));
+ textLabel2->setText(QApplication::translate("UICPPJoyControls", "Virtual Joystick number:", 0, QApplication::UnicodeUTF8));
+ _engine_state_label->setText(QApplication::translate("UICPPJoyControls", "TERMINATED", 0, QApplication::UnicodeUTF8));
+ btnOK->setText(QApplication::translate("UICPPJoyControls", "OK", 0, QApplication::UnicodeUTF8));
+ btnCancel->setText(QApplication::translate("UICPPJoyControls", "Cancel", 0, QApplication::UnicodeUTF8));
+ } // retranslateUi
+
+};
+
+namespace Ui {
+ class UICPPJoyControls: public Ui_UICPPJoyControls {};
+} // namespace Ui
+
+QT_END_NAMESPACE
+
+#endif // UI_FTNOIR_PPJOYCONTROLS_H
diff --git a/FaceTrackNoIR/GeneratedFiles/ui_FaceTrackNoIR.h b/FaceTrackNoIR/GeneratedFiles/ui_FaceTrackNoIR.h
index e6a0fa02..03e07ccb 100644
--- a/FaceTrackNoIR/GeneratedFiles/ui_FaceTrackNoIR.h
+++ b/FaceTrackNoIR/GeneratedFiles/ui_FaceTrackNoIR.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'FaceTrackNoIR.ui'
**
-** Created: Tue 8. Jun 22:08:00 2010
+** Created: Sun 13. Jun 16:10:04 2010
** by: Qt User Interface Compiler version 4.6.2
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
@@ -87,6 +87,7 @@ public:
QPushButton *btnStopTracker;
QGroupBox *groupGameProtocol;
QComboBox *iconcomboBox;
+ QPushButton *btnShowServerControls;
QGridLayout *gridLayout_2;
QLabel *lblSensYaw_3;
QSlider *slideSmoothing;
@@ -522,6 +523,11 @@ public:
iconcomboBox->setGeometry(QRect(10, 20, 151, 22));
iconcomboBox->setStyleSheet(QString::fromUtf8(""));
iconcomboBox->setMaxVisibleItems(3);
+ btnShowServerControls = new QPushButton(groupGameProtocol);
+ btnShowServerControls->setObjectName(QString::fromUtf8("btnShowServerControls"));
+ btnShowServerControls->setEnabled(true);
+ btnShowServerControls->setGeometry(QRect(10, 80, 161, 23));
+ btnShowServerControls->setStyleSheet(QString::fromUtf8(""));
horizontalLayout_3->addWidget(groupGameProtocol);
@@ -1218,6 +1224,10 @@ public:
#endif // QT_NO_TOOLTIP
btnStopTracker->setText(QApplication::translate("FaceTrackNoIRClass", "Stop", 0, QApplication::UnicodeUTF8));
groupGameProtocol->setTitle(QApplication::translate("FaceTrackNoIRClass", "Game protocol", 0, QApplication::UnicodeUTF8));
+#ifndef QT_NO_TOOLTIP
+ btnShowServerControls->setToolTip(QApplication::translate("FaceTrackNoIRClass", "Change tracker settings", 0, QApplication::UnicodeUTF8));
+#endif // QT_NO_TOOLTIP
+ btnShowServerControls->setText(QApplication::translate("FaceTrackNoIRClass", "Settings", 0, QApplication::UnicodeUTF8));
lblSensYaw_3->setText(QApplication::translate("FaceTrackNoIRClass", "Global settings", 0, QApplication::UnicodeUTF8));
chkUseEWMA->setText(QString());
lblSensYaw_5->setText(QApplication::translate("FaceTrackNoIRClass", "Use EWMA filtering:", 0, QApplication::UnicodeUTF8));
diff --git a/FaceTrackNoIR/PPJoyServer.cpp b/FaceTrackNoIR/PPJoyServer.cpp
index 53b6322b..a33ceb34 100644
--- a/FaceTrackNoIR/PPJoyServer.cpp
+++ b/FaceTrackNoIR/PPJoyServer.cpp
@@ -30,8 +30,8 @@
#include "Tracker.h"
#include <Winsock.h>
-long PPJoyServer::PPJoyCorrection = 1470;
-long PPJoyServer::analogDefault = (PPJOY_AXIS_MIN+PPJOY_AXIS_MAX)/2 - PPJoyServer::PPJoyCorrection;
+//long PPJoyServer::PPJoyCorrection = 1470;
+//long PPJoyServer::analogDefault = (PPJOY_AXIS_MIN+PPJOY_AXIS_MAX)/2 - PPJoyServer::PPJoyCorrection;
static const char* DevName = "\\\\.\\PPJoyIOCTL1";
/** constructor **/
@@ -51,7 +51,7 @@ PPJoyServer::PPJoyServer( Tracker *parent ) {
}
/* Open a handle to the control device for the first virtual joystick. */
- /* Virtual joystick devices are names PPJoyIOCTL1 to PPJoyIOCTL16. */
+ /* Virtual joystick devices are named PPJoyIOCTL1 to PPJoyIOCTL16. */
h = CreateFileA((LPCSTR) DevName,GENERIC_WRITE,FILE_SHARE_WRITE,NULL,OPEN_EXISTING,0,NULL);
/* Make sure we could open the device! */
@@ -111,16 +111,15 @@ void PPJoyServer::run() {
}
// The effective angle for faceTracking will be < 90 degrees, so we assume a smaller range here
- Analog[0] = scale2AnalogLimits( virtRotX, -50.0f, 50.0f ); // Pitch
- qDebug() << "PPJoyServer says: Pitch =" << Analog[0] << " VirtRotX =" << virtRotX ;
- Analog[1] = scale2AnalogLimits( virtRotY, -50.0f, 50.0f ); // Yaw
- Analog[2] = scale2AnalogLimits( virtRotZ, -50.0f, 50.0f ); // Roll
+ Analog[0] = scale2AnalogLimits( virtRotX, -50.0f, 50.0f ); // Pitch
+ Analog[1] = scale2AnalogLimits( virtRotY, -50.0f, 50.0f ); // Yaw
+ Analog[2] = scale2AnalogLimits( virtRotZ, -50.0f, 50.0f ); // Roll
// The effective movement for faceTracking will be < 50 cm, so we assume a smaller range here
Analog[3] = scale2AnalogLimits( virtPosX, -40.0f, 40.0f ); // X
- Analog[5] = scale2AnalogLimits( virtPosY, -40.0f, 40.0f ); // Y (5?)
- Analog[6] = scale2AnalogLimits( virtPosZ, -40.0f, 40.0f ); // Z (6?)
+ Analog[4] = scale2AnalogLimits( virtPosY, -40.0f, 40.0f ); // Y
+ Analog[5] = scale2AnalogLimits( virtPosZ, -40.0f, 40.0f ); // Z
checkAnalogLimits();
@@ -162,4 +161,38 @@ double y;
return (long) y;
}
+
+//
+// Constructor for server-settings-dialog
+//
+PPJoyControls::PPJoyControls( QWidget *parent, Qt::WindowFlags f ) :
+QWidget( parent , f)
+{
+ ui.setupUi( this );
+
+ connect(ui.btnOK, SIGNAL(clicked()), this, SLOT(doOK()));
+ connect(ui.btnCancel, SIGNAL(clicked()), this, SLOT(doCancel()));
+}
+
+//
+// Destructor for server-dialog
+//
+PPJoyControls::~PPJoyControls() {
+}
+
+//
+// OK clicked on server-dialog
+//
+void PPJoyControls::doOK() {
+ qDebug() << "doOK clicked";
+}
+
+//
+// Cancel clicked on server-dialog
+//
+void PPJoyControls::doCancel() {
+ qDebug() << "doCancel clicked";
+ this->close();
+}
+
//END
diff --git a/FaceTrackNoIR/PPJoyServer.h b/FaceTrackNoIR/PPJoyServer.h
index 83b3617a..72d17bd1 100644
--- a/FaceTrackNoIR/PPJoyServer.h
+++ b/FaceTrackNoIR/PPJoyServer.h
@@ -39,6 +39,8 @@
#include <QMutex>
#include <QLibrary>
+#include "ui_FTNoIR_ppjoycontrols.h"
+
using namespace std;
class Tracker; // pre-define parent-class to avoid circular includes
@@ -87,7 +89,7 @@ private:
long *Analog;
char *Digital;
- static long analogDefault,PPJoyCorrection;
+// static long analogDefault,PPJoyCorrection;
long centerPos[3],centerRot[3];
/** member variables for saving the head pose **/
@@ -112,6 +114,24 @@ public:
};
+// Widget that has controls for PPJoy server-settings.
+class PPJoyControls: public QWidget, public Ui::UICPPJoyControls
+{
+ Q_OBJECT
+public:
+
+ explicit PPJoyControls( QWidget *parent=0, Qt::WindowFlags f=0 );
+ virtual ~PPJoyControls();
+
+private:
+ Ui::UICPPJoyControls ui;
+
+private slots:
+ void doOK();
+ void doCancel();
+
+};
+
#endif//INCLUDED_PPJOYSERVER_H
//END
diff --git a/FaceTrackNoIR/Release/BuildLog.htm b/FaceTrackNoIR/Release/BuildLog.htm
index 2d07dae3..036a7314 100644
--- a/FaceTrackNoIR/Release/BuildLog.htm
+++ b/FaceTrackNoIR/Release/BuildLog.htm
Binary files differ
diff --git a/FaceTrackNoIR/Release/mt.dep b/FaceTrackNoIR/Release/mt.dep
index 506fca00..68cbc7ef 100644
--- a/FaceTrackNoIR/Release/mt.dep
+++ b/FaceTrackNoIR/Release/mt.dep
@@ -1 +1 @@
-Manifest resource last updated at 11:22:50.41 on za 12-06-2010
+Manifest resource last updated at 17:39:08.17 on zo 13-06-2010
diff --git a/FaceTrackNoIR/Release/vc90.idb b/FaceTrackNoIR/Release/vc90.idb
index 1015061a..7adfbd55 100644
--- a/FaceTrackNoIR/Release/vc90.idb
+++ b/FaceTrackNoIR/Release/vc90.idb
Binary files differ