summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorWim Vriend <facetracknoir@gmail.com>2010-10-15 15:40:49 +0000
committerWim Vriend <facetracknoir@gmail.com>2010-10-15 15:40:49 +0000
commitbe9d1d42a340bad458173992b219def3dfed03ae (patch)
treeb980d13b10011a7276e0211246e5972046796a01
parent6999bf3ef1c30d5af447c8cdd98213d1b1106a30 (diff)
SimConnect interface toegevoegd voor Microsoft FSX...
Werkt al! git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@23 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb
-rw-r--r--FaceTrackNoIR.suobin257536 -> 264192 bytes
-rw-r--r--FaceTrackNoIR/FTNoIR_Curves.ui847
-rw-r--r--FaceTrackNoIR/FaceTrackNoIR.apsbin42020 -> 41984 bytes
-rw-r--r--FaceTrackNoIR/FaceTrackNoIR.cpp4
-rw-r--r--FaceTrackNoIR/FaceTrackNoIR.ui375
-rw-r--r--FaceTrackNoIR/FaceTrackNoIR.vcproj69
-rw-r--r--FaceTrackNoIR/SCServer.cpp203
-rw-r--r--FaceTrackNoIR/SCServer.h99
-rw-r--r--FaceTrackNoIR/SCServer.manifest13
-rw-r--r--FaceTrackNoIR/postbuild.bat27
-rw-r--r--FaceTrackNoIR/tracker.cpp113
-rw-r--r--FaceTrackNoIR/tracker.h21
-rw-r--r--bin/FaceTrackNoIR.exebin626688 -> 630784 bytes
-rw-r--r--bin/Settings/ArmA.ini32
-rw-r--r--bin/Settings/FF5.ini25
-rw-r--r--bin/Settings/GlovePIE.ini25
-rw-r--r--bin/Settings/SimConnect.ini28
17 files changed, 1669 insertions, 212 deletions
diff --git a/FaceTrackNoIR.suo b/FaceTrackNoIR.suo
index 98df33d0..cf018c87 100644
--- a/FaceTrackNoIR.suo
+++ b/FaceTrackNoIR.suo
Binary files differ
diff --git a/FaceTrackNoIR/FTNoIR_Curves.ui b/FaceTrackNoIR/FTNoIR_Curves.ui
new file mode 100644
index 00000000..762ff059
--- /dev/null
+++ b/FaceTrackNoIR/FTNoIR_Curves.ui
@@ -0,0 +1,847 @@
+<?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>681</width>
+ <height>728</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>1</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>643</width>
+ <height>627</height>
+ </rect>
+ </property>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="0">
+ <widget class="QBezierConfigurator" name="curveYaw">
+ <property name="maxInputEGU" stdset="0">
+ <number>50</number>
+ </property>
+ <property name="maxOutputEGU" stdset="0">
+ <number>180</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>
+ <property name="stringCaption" stdset="0">
+ <string>Yaw (left and right)</string>
+ </property>
+ <property name="pointOne" stdset="0">
+ <pointf>
+ <x>0.000000000000000</x>
+ <y>0.000000000000000</y>
+ </pointf>
+ </property>
+ <property name="pointThree" stdset="0">
+ <pointf>
+ <x>90.000000000000000</x>
+ <y>0.000000000000000</y>
+ </pointf>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QBezierConfigurator" name="curvePitch">
+ <property name="maxInputEGU" stdset="0">
+ <number>50</number>
+ </property>
+ <property name="maxOutputEGU" stdset="0">
+ <number>180</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 (degr.)</string>
+ </property>
+ <property name="stringOutputEGU" stdset="0">
+ <string>Output Pitch (degr.)</string>
+ </property>
+ <property name="stringCaption" stdset="0">
+ <string>Pitch (forward and backward)</string>
+ </property>
+ <property name="pointOne" stdset="0">
+ <pointf>
+ <x>0.000000000000000</x>
+ <y>0.000000000000000</y>
+ </pointf>
+ </property>
+ <property name="pointThree" stdset="0">
+ <pointf>
+ <x>90.000000000000000</x>
+ <y>0.000000000000000</y>
+ </pointf>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QBezierConfigurator" name="curveRoll">
+ <property name="maxInputEGU" stdset="0">
+ <number>50</number>
+ </property>
+ <property name="maxOutputEGU" stdset="0">
+ <number>180</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>
+ <property name="stringCaption" stdset="0">
+ <string>Roll (left and right)</string>
+ </property>
+ <property name="pointOne" stdset="0">
+ <pointf>
+ <x>0.000000000000000</x>
+ <y>0.000000000000000</y>
+ </pointf>
+ </property>
+ <property name="pointThree" stdset="0">
+ <pointf>
+ <x>90.000000000000000</x>
+ <y>0.000000000000000</y>
+ </pointf>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="3">
+ <widget class="QSpinBox" name="spinNZ_Yaw">
+ <property name="maximum">
+ <number>50</number>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2">
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>NeutralZone</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0">
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QWidget" name="widget" native="true">
+ <property name="minimumSize">
+ <size>
+ <width>170</width>
+ <height>140</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>170</width>
+ <height>140</height>
+ </size>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">image: url(:/images/rotation_DOFs.png);
+background-color: rgb(255, 255, 255);</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="1" column="2">
+ <widget class="QLabel" name="label_2">
+ <property name="text">
+ <string>NeutralZone</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="2">
+ <widget class="QLabel" name="label_3">
+ <property name="text">
+ <string>NeutralZone</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="3">
+ <widget class="QSpinBox" name="spinNZ_Pitch">
+ <property name="maximum">
+ <number>50</number>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="3">
+ <widget class="QSpinBox" name="spinNZ_Roll">
+ <property name="maximum">
+ <number>50</number>
+ </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>10</x>
+ <y>10</y>
+ <width>593</width>
+ <height>633</height>
+ </rect>
+ </property>
+ <layout class="QGridLayout" name="gridLayout_3">
+ <item row="2" column="0">
+ <widget class="QBezierConfigurator" name="curveY">
+ <property name="maxInputEGU" stdset="0">
+ <number>50</number>
+ </property>
+ <property name="maxOutputEGU" stdset="0">
+ <number>180</number>
+ </property>
+ <property name="colorBezier">
+ <color>
+ <red>0</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>Input Move (cm)</string>
+ </property>
+ <property name="stringOutputEGU" stdset="0">
+ <string>Output Move (cm)</string>
+ </property>
+ <property name="stringCaption" stdset="0">
+ <string>Move (up and down)</string>
+ </property>
+ <property name="pointOne" stdset="0">
+ <pointf>
+ <x>0.000000000000000</x>
+ <y>0.000000000000000</y>
+ </pointf>
+ </property>
+ <property name="pointThree" stdset="0">
+ <pointf>
+ <x>90.000000000000000</x>
+ <y>0.000000000000000</y>
+ </pointf>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0">
+ <widget class="QBezierConfigurator" name="curveZ">
+ <property name="maxInputEGU" stdset="0">
+ <number>50</number>
+ </property>
+ <property name="maxOutputEGU" stdset="0">
+ <number>180</number>
+ </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>Input Move (cm)</string>
+ </property>
+ <property name="stringOutputEGU" stdset="0">
+ <string>Output Move (cm)</string>
+ </property>
+ <property name="stringCaption" stdset="0">
+ <string>Move (forward and backward)</string>
+ </property>
+ <property name="pointOne" stdset="0">
+ <pointf>
+ <x>0.000000000000000</x>
+ <y>0.000000000000000</y>
+ </pointf>
+ </property>
+ <property name="pointThree" stdset="0">
+ <pointf>
+ <x>90.000000000000000</x>
+ <y>0.000000000000000</y>
+ </pointf>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="0">
+ <layout class="QHBoxLayout" name="horizontalLayout_5">
+ <item>
+ <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>
+ </item>
+ <item row="1" column="0">
+ <widget class="QBezierConfigurator" name="curveX">
+ <property name="maxInputEGU" stdset="0">
+ <number>50</number>
+ </property>
+ <property name="maxOutputEGU" stdset="0">
+ <number>180</number>
+ </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>Input Move (cm)</string>
+ </property>
+ <property name="stringOutputEGU" stdset="0">
+ <string>Output Move (cm)</string>
+ </property>
+ <property name="stringCaption" stdset="0">
+ <string>Move (left and right)</string>
+ </property>
+ <property name="pointOne" stdset="0">
+ <pointf>
+ <x>0.000000000000000</x>
+ <y>0.000000000000000</y>
+ </pointf>
+ </property>
+ <property name="pointThree" stdset="0">
+ <pointf>
+ <x>90.000000000000000</x>
+ <y>0.000000000000000</y>
+ </pointf>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QLabel" name="label_4">
+ <property name="text">
+ <string>NeutralZone</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2">
+ <widget class="QSpinBox" name="spinNZ_X">
+ <property name="maximum">
+ <number>50</number>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QLabel" name="label_5">
+ <property name="text">
+ <string>NeutralZone</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1">
+ <widget class="QLabel" name="label_6">
+ <property name="text">
+ <string>NeutralZone</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="2">
+ <widget class="QSpinBox" name="spinNZ_Y">
+ <property name="maximum">
+ <number>50</number>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="2">
+ <widget class="QSpinBox" name="spinNZ_Z">
+ <property name="maximum">
+ <number>50</number>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_4"/>
+ </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>QBezierConfigurator</class>
+ <extends>QWidget</extends>
+ <header>qbezierconfigurator.h</header>
+ </customwidget>
+ </customwidgets>
+ <resources>
+ <include location="FaceTrackNoIR.qrc"/>
+ </resources>
+ <connections>
+ <connection>
+ <sender>curveYaw</sender>
+ <signal>valueNeutralZoneChanged(int)</signal>
+ <receiver>spinNZ_Yaw</receiver>
+ <slot>setValue(int)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>268</x>
+ <y>114</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>593</x>
+ <y>125</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>spinNZ_Yaw</sender>
+ <signal>valueChanged(int)</signal>
+ <receiver>curveYaw</receiver>
+ <slot>setNeutralZone(int)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>588</x>
+ <y>115</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>296</x>
+ <y>110</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>curvePitch</sender>
+ <signal>valueNeutralZoneChanged(int)</signal>
+ <receiver>spinNZ_Pitch</receiver>
+ <slot>setValue(int)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>321</x>
+ <y>280</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>576</x>
+ <y>289</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>spinNZ_Pitch</sender>
+ <signal>valueChanged(int)</signal>
+ <receiver>curvePitch</receiver>
+ <slot>setNeutralZone(int)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>629</x>
+ <y>287</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>334</x>
+ <y>285</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>curveRoll</sender>
+ <signal>valueNeutralZoneChanged(int)</signal>
+ <receiver>spinNZ_Roll</receiver>
+ <slot>setValue(int)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>322</x>
+ <y>423</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>589</x>
+ <y>447</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>spinNZ_Roll</sender>
+ <signal>valueChanged(int)</signal>
+ <receiver>curveRoll</receiver>
+ <slot>setNeutralZone(int)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>618</x>
+ <y>446</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>257</x>
+ <y>464</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>curveX</sender>
+ <signal>valueNeutralZoneChanged(int)</signal>
+ <receiver>spinNZ_X</receiver>
+ <slot>setValue(int)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>312</x>
+ <y>107</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>568</x>
+ <y>126</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>spinNZ_X</sender>
+ <signal>valueChanged(int)</signal>
+ <receiver>curveX</receiver>
+ <slot>setNeutralZone(int)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>548</x>
+ <y>125</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>322</x>
+ <y>142</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>curveY</sender>
+ <signal>valueNeutralZoneChanged(int)</signal>
+ <receiver>spinNZ_Y</receiver>
+ <slot>setValue(int)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>282</x>
+ <y>261</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>569</x>
+ <y>286</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>spinNZ_Y</sender>
+ <signal>valueChanged(int)</signal>
+ <receiver>curveY</receiver>
+ <slot>setNeutralZone(int)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>549</x>
+ <y>282</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>342</x>
+ <y>292</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>curveZ</sender>
+ <signal>valueNeutralZoneChanged(int)</signal>
+ <receiver>spinNZ_Z</receiver>
+ <slot>setValue(int)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>363</x>
+ <y>417</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>571</x>
+ <y>445</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>spinNZ_Z</sender>
+ <signal>valueChanged(int)</signal>
+ <receiver>curveZ</receiver>
+ <slot>setNeutralZone(int)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>546</x>
+ <y>444</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>316</x>
+ <y>447</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+ <slots>
+ <slot>startEngineClicked()</slot>
+ <slot>stopEngineClicked()</slot>
+ <slot>cameraSettingsClicked()</slot>
+ </slots>
+</ui>
diff --git a/FaceTrackNoIR/FaceTrackNoIR.aps b/FaceTrackNoIR/FaceTrackNoIR.aps
index f907ff92..0205c761 100644
--- a/FaceTrackNoIR/FaceTrackNoIR.aps
+++ b/FaceTrackNoIR/FaceTrackNoIR.aps
Binary files differ
diff --git a/FaceTrackNoIR/FaceTrackNoIR.cpp b/FaceTrackNoIR/FaceTrackNoIR.cpp
index ef579436..17e4284a 100644
--- a/FaceTrackNoIR/FaceTrackNoIR.cpp
+++ b/FaceTrackNoIR/FaceTrackNoIR.cpp
@@ -698,6 +698,7 @@ void FaceTrackNoIR::createIconGroupBox()
ui.iconcomboBox->addItem(QIcon(QCoreApplication::applicationDirPath() + "/images/FaceTrackNoIR.ico"), tr("FTNoir client"));
ui.iconcomboBox->addItem(QIcon(QCoreApplication::applicationDirPath() + "/images/PPJoy.ico"), tr("Virtual Joystick"));
ui.iconcomboBox->addItem(QIcon(QCoreApplication::applicationDirPath() + "/images/TrackIR.ico"), tr("Fake TrackIR"));
+ ui.iconcomboBox->addItem(QIcon(QCoreApplication::applicationDirPath() + "/images/FSX.ico"), tr("SimConnect"));
ui.iconcomboTrackerSource->addItem(QIcon(QCoreApplication::applicationDirPath() + "/images/SeeingMachines.ico"), tr("Face API"));
ui.iconcomboTrackerSource->addItem(QIcon(QCoreApplication::applicationDirPath() + "/images/FaceTrackNoIR.ico"), tr("FTNoir server"));
@@ -774,6 +775,9 @@ void FaceTrackNoIR::setIcon(int index)
case TRACKIR:
ui.btnShowServerControls->hide();
break;
+ case SIMCONNECT:
+ ui.btnShowServerControls->hide();
+ break;
default:
break;
}
diff --git a/FaceTrackNoIR/FaceTrackNoIR.ui b/FaceTrackNoIR/FaceTrackNoIR.ui
index fe4facb4..91c25ff5 100644
--- a/FaceTrackNoIR/FaceTrackNoIR.ui
+++ b/FaceTrackNoIR/FaceTrackNoIR.ui
@@ -946,9 +946,6 @@ color:#000;</string>
</widget>
</item>
<item>
- <layout class="QGridLayout" name="gridLayout_2"/>
- </item>
- <item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
@@ -1097,8 +1094,165 @@ opacity:100;</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
+ <layout class="QGridLayout" name="gridGlobalSettings">
+ <item row="0" column="0">
+ <widget class="QLabel" name="lblSensYaw_3">
+ <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>Global settings</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="lblSensYaw_5">
+ <property name="minimumSize">
+ <size>
+ <width>100</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>Use EWMA filtering:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QCheckBox" name="chkUseEWMA">
+ <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="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="2" 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="3" 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>120</number>
+ </property>
+ <property name="pageStep">
+ <number>10</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="3" column="1">
+ <widget class="QSpinBox" name="spinSmoothing">
+ <property name="minimumSize">
+ <size>
+ <width>50</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">background:none;</string>
+ </property>
+ <property name="maximum">
+ <number>120</number>
+ </property>
+ <property name="value">
+ <number>10</number>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="Line" name="line">
+ <property name="autoFillBackground">
+ <bool>false</bool>
+ </property>
+ <property name="styleSheet">
+ <string notr="true"/>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
<layout class="QGridLayout" name="gridLayout">
- <item row="1" column="3">
+ <item row="1" column="2">
<widget class="QLabel" name="lblSensYaw">
<property name="minimumSize">
<size>
@@ -1112,6 +1266,9 @@ opacity:100;</string>
<height>16777215</height>
</size>
</property>
+ <property name="layoutDirection">
+ <enum>Qt::RightToLeft</enum>
+ </property>
<property name="styleSheet">
<string notr="true">color:#ccc;
background:none;</string>
@@ -1121,7 +1278,7 @@ background:none;</string>
</property>
</widget>
</item>
- <item row="1" column="7">
+ <item row="1" column="6">
<widget class="QLabel" name="lblSensX">
<property name="minimumSize">
<size>
@@ -1135,6 +1292,9 @@ background:none;</string>
<height>16777215</height>
</size>
</property>
+ <property name="layoutDirection">
+ <enum>Qt::RightToLeft</enum>
+ </property>
<property name="styleSheet">
<string notr="true">color:#ccc;
background:none;</string>
@@ -1144,7 +1304,7 @@ background:none;</string>
</property>
</widget>
</item>
- <item row="2" column="3">
+ <item row="2" column="2">
<widget class="QLabel" name="lblSensPitch">
<property name="minimumSize">
<size>
@@ -1158,6 +1318,9 @@ background:none;</string>
<height>16777215</height>
</size>
</property>
+ <property name="layoutDirection">
+ <enum>Qt::RightToLeft</enum>
+ </property>
<property name="styleSheet">
<string notr="true">color:#ccc;
background:none;</string>
@@ -1167,7 +1330,7 @@ background:none;</string>
</property>
</widget>
</item>
- <item row="2" column="7">
+ <item row="2" column="6">
<widget class="QLabel" name="lblSensY">
<property name="minimumSize">
<size>
@@ -1181,6 +1344,9 @@ background:none;</string>
<height>16777215</height>
</size>
</property>
+ <property name="layoutDirection">
+ <enum>Qt::RightToLeft</enum>
+ </property>
<property name="styleSheet">
<string notr="true">color:#ccc;
background:none;</string>
@@ -1190,7 +1356,7 @@ background:none;</string>
</property>
</widget>
</item>
- <item row="3" column="3">
+ <item row="3" column="2">
<widget class="QLabel" name="lblSensRoll">
<property name="minimumSize">
<size>
@@ -1204,6 +1370,9 @@ background:none;</string>
<height>16777215</height>
</size>
</property>
+ <property name="layoutDirection">
+ <enum>Qt::RightToLeft</enum>
+ </property>
<property name="styleSheet">
<string notr="true">color:#ccc;
background:none;</string>
@@ -1213,7 +1382,7 @@ background:none;</string>
</property>
</widget>
</item>
- <item row="3" column="7">
+ <item row="3" column="6">
<widget class="QLabel" name="lblSensZ">
<property name="minimumSize">
<size>
@@ -1227,6 +1396,9 @@ background:none;</string>
<height>16777215</height>
</size>
</property>
+ <property name="layoutDirection">
+ <enum>Qt::RightToLeft</enum>
+ </property>
<property name="styleSheet">
<string notr="true">color:#ccc;
background:none;</string>
@@ -1236,7 +1408,7 @@ background:none;</string>
</property>
</widget>
</item>
- <item row="1" column="6">
+ <item row="1" column="5">
<widget class="QCheckBox" name="chkInvertYaw">
<property name="styleSheet">
<string notr="true">background:none;</string>
@@ -1246,7 +1418,7 @@ background:none;</string>
</property>
</widget>
</item>
- <item row="0" column="6">
+ <item row="0" column="5">
<widget class="QLabel" name="lblInvert1">
<property name="minimumSize">
<size>
@@ -1269,7 +1441,7 @@ background:none;</string>
</property>
</widget>
</item>
- <item row="2" column="6">
+ <item row="2" column="5">
<widget class="QCheckBox" name="chkInvertPitch">
<property name="styleSheet">
<string notr="true">background:none;</string>
@@ -1279,7 +1451,7 @@ background:none;</string>
</property>
</widget>
</item>
- <item row="3" column="6">
+ <item row="3" column="5">
<widget class="QCheckBox" name="chkInvertRoll">
<property name="styleSheet">
<string notr="true">background:none;</string>
@@ -1289,7 +1461,7 @@ background:none;</string>
</property>
</widget>
</item>
- <item row="1" column="10">
+ <item row="1" column="9">
<widget class="QCheckBox" name="chkInvertX">
<property name="styleSheet">
<string notr="true">background:none;</string>
@@ -1299,7 +1471,7 @@ background:none;</string>
</property>
</widget>
</item>
- <item row="0" column="10">
+ <item row="0" column="9">
<widget class="QLabel" name="lblInvert1_2">
<property name="minimumSize">
<size>
@@ -1322,7 +1494,7 @@ background:none;</string>
</property>
</widget>
</item>
- <item row="2" column="10">
+ <item row="2" column="9">
<widget class="QCheckBox" name="chkInvertY">
<property name="styleSheet">
<string notr="true">background:none;</string>
@@ -1332,7 +1504,7 @@ background:none;</string>
</property>
</widget>
</item>
- <item row="3" column="10">
+ <item row="3" column="9">
<widget class="QCheckBox" name="chkInvertZ">
<property name="styleSheet">
<string notr="true">background:none;</string>
@@ -1342,11 +1514,11 @@ background:none;</string>
</property>
</widget>
</item>
- <item row="1" column="4">
+ <item row="1" column="3">
<widget class="QSlider" name="redYaw">
<property name="minimumSize">
<size>
- <width>50</width>
+ <width>45</width>
<height>15</height>
</size>
</property>
@@ -1367,11 +1539,11 @@ background:none;</string>
</property>
</widget>
</item>
- <item row="2" column="4">
+ <item row="2" column="3">
<widget class="QSlider" name="redPitch">
<property name="minimumSize">
<size>
- <width>50</width>
+ <width>45</width>
<height>15</height>
</size>
</property>
@@ -1392,11 +1564,11 @@ background:none;</string>
</property>
</widget>
</item>
- <item row="3" column="4">
+ <item row="3" column="3">
<widget class="QSlider" name="redRoll">
<property name="minimumSize">
<size>
- <width>50</width>
+ <width>45</width>
<height>15</height>
</size>
</property>
@@ -1417,7 +1589,7 @@ background:none;</string>
</property>
</widget>
</item>
- <item row="1" column="5">
+ <item row="1" column="4">
<widget class="QSpinBox" name="spinRedYaw">
<property name="minimumSize">
<size>
@@ -1439,7 +1611,7 @@ background:none;</string>
</property>
</widget>
</item>
- <item row="2" column="5">
+ <item row="2" column="4">
<widget class="QSpinBox" name="spinRedPitch">
<property name="minimumSize">
<size>
@@ -1461,7 +1633,7 @@ background:none;</string>
</property>
</widget>
</item>
- <item row="3" column="5">
+ <item row="3" column="4">
<widget class="QSpinBox" name="spinRedRoll">
<property name="minimumSize">
<size>
@@ -1483,7 +1655,7 @@ background:none;</string>
</property>
</widget>
</item>
- <item row="0" column="4">
+ <item row="0" column="3">
<widget class="QLabel" name="lblSensitivity_2">
<property name="minimumSize">
<size>
@@ -1506,11 +1678,11 @@ background:none;</string>
</property>
</widget>
</item>
- <item row="1" column="8">
+ <item row="1" column="7">
<widget class="QSlider" name="redX">
<property name="minimumSize">
<size>
- <width>50</width>
+ <width>45</width>
<height>15</height>
</size>
</property>
@@ -1531,11 +1703,11 @@ background:none;</string>
</property>
</widget>
</item>
- <item row="2" column="8">
+ <item row="2" column="7">
<widget class="QSlider" name="redY">
<property name="minimumSize">
<size>
- <width>50</width>
+ <width>45</width>
<height>15</height>
</size>
</property>
@@ -1556,11 +1728,11 @@ background:none;</string>
</property>
</widget>
</item>
- <item row="3" column="8">
+ <item row="3" column="7">
<widget class="QSlider" name="redZ">
<property name="minimumSize">
<size>
- <width>50</width>
+ <width>45</width>
<height>15</height>
</size>
</property>
@@ -1581,7 +1753,7 @@ background:none;</string>
</property>
</widget>
</item>
- <item row="1" column="9">
+ <item row="1" column="8">
<widget class="QSpinBox" name="spinRedX">
<property name="minimumSize">
<size>
@@ -1603,7 +1775,7 @@ background:none;</string>
</property>
</widget>
</item>
- <item row="2" column="9">
+ <item row="2" column="8">
<widget class="QSpinBox" name="spinRedY">
<property name="minimumSize">
<size>
@@ -1625,7 +1797,7 @@ background:none;</string>
</property>
</widget>
</item>
- <item row="3" column="9">
+ <item row="3" column="8">
<widget class="QSpinBox" name="spinRedZ">
<property name="minimumSize">
<size>
@@ -1647,7 +1819,7 @@ background:none;</string>
</property>
</widget>
</item>
- <item row="0" column="8">
+ <item row="0" column="7">
<widget class="QLabel" name="lblSensitivity_3">
<property name="minimumSize">
<size>
@@ -1670,140 +1842,31 @@ background:none;</string>
</property>
</widget>
</item>
- <item row="1" column="2">
- <widget class="QCheckBox" name="chkUseEWMA">
- <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_5">
- <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>Use EWMA filtering:</string>
- </property>
- </widget>
- </item>
- <item row="0" column="0">
- <widget class="QLabel" name="lblSensYaw_3">
- <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>Global settings</string>
- </property>
- </widget>
- </item>
- <item row="2" 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>
+ <item row="0" column="2">
+ <widget class="QLabel" name="label_2">
+ <property name="layoutDirection">
+ <enum>Qt::RightToLeft</enum>
</property>
<property name="styleSheet">
<string notr="true">color:#ccc;
background:none;</string>
</property>
<property name="text">
- <string>Smoothing:</string>
+ <string>EWMA</string>
</property>
</widget>
</item>
- <item row="3" 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>120</number>
- </property>
- <property name="pageStep">
- <number>10</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="3" column="2">
- <widget class="QSpinBox" name="spinSmoothing">
- <property name="minimumSize">
- <size>
- <width>50</width>
- <height>22</height>
- </size>
- </property>
- <property name="styleSheet">
- <string notr="true">background:none;</string>
- </property>
- <property name="maximum">
- <number>120</number>
- </property>
- <property name="value">
- <number>10</number>
+ <item row="0" column="6">
+ <widget class="QLabel" name="label_3">
+ <property name="layoutDirection">
+ <enum>Qt::RightToLeft</enum>
</property>
- </widget>
- </item>
- <item row="2" column="2">
- <widget class="QLabel" name="label">
<property name="styleSheet">
<string notr="true">color:#ccc;
background:none;</string>
</property>
<property name="text">
- <string>(samples)</string>
+ <string>EWMA</string>
</property>
</widget>
</item>
diff --git a/FaceTrackNoIR/FaceTrackNoIR.vcproj b/FaceTrackNoIR/FaceTrackNoIR.vcproj
index cb75ed3b..e691835e 100644
--- a/FaceTrackNoIR/FaceTrackNoIR.vcproj
+++ b/FaceTrackNoIR/FaceTrackNoIR.vcproj
@@ -25,6 +25,7 @@
>
<Tool
Name="VCPreBuildEventTool"
+ CommandLine="postbuild.bat &quot;$(QTDIR)\plugins\designer\QBezierConfigurator.dll&quot; &quot;$(OutDir)&quot; $(ConfigurationName)"
/>
<Tool
Name="VCCustomBuildTool"
@@ -65,6 +66,7 @@
/>
<Tool
Name="VCPreLinkEventTool"
+ CommandLine=""
/>
<Tool
Name="VCLinkerTool"
@@ -103,7 +105,7 @@
/>
<Tool
Name="VCPostBuildEventTool"
- CommandLine="postbuild.bat &quot;$(QTDIR)\plugins\designer\QBezierConfigurator.dll&quot; &quot;$(OutDir)&quot; $(ConfigurationName)"
+ CommandLine="mt.exe -manifest &quot;$(InputDir)SCServer.manifest&quot; -outputresource:&quot;$(OutDir)\$(TargetFileName)&quot;;^#101"
/>
</Configuration>
<Configuration
@@ -220,6 +222,10 @@
>
</File>
<File
+ RelativePath=".\SCServer.cpp"
+ >
+ </File>
+ <File
RelativePath=".\tracker.cpp"
>
</File>
@@ -406,6 +412,32 @@
>
</File>
<File
+ RelativePath=".\SCServer.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; -DQT_CORE_LIB -DQT_DLL -DQT_GUI_LIB -DQT_LARGEFILE_SUPPORT -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_THREAD_SUPPORT -DUNICODE -DWIN32 -I&quot;$(QTDIR)\include\.&quot; -I&quot;$(QTDIR)\include\QtCore\.&quot; -I&quot;$(QTDIR)\include\QtGui\.&quot; -I&quot;$(QTDIR)\include\QtNetwork\.&quot; -I&quot;$(QTDIR)\include\QtOpenGL\.&quot; -I&quot;$(QTDIR)\include\QtTest\.&quot; -I&quot;$(QTDIR)\include\QtWebKit\.&quot; -I&quot;$(SM_API_CPP_WRAPPERS)\include\.&quot; -I&quot;$(SM_API_PATH)\include\.&quot; -I&quot;$(SM_API_QTDIR)\include\.&quot; -I&quot;$(SM_API_WIDGETS)\include\.&quot; -I&quot;.\GeneratedFiles\$(ConfigurationName)\.&quot; -I&quot;.\GeneratedFiles\.&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; -DQT_CORE_LIB -DQT_DLL -DQT_GUI_LIB -DQT_LARGEFILE_SUPPORT -DQT_OPENGL_LIB -DQT_THREAD_SUPPORT -DUNICODE -DWIN32 -I&quot;$(QTDIR)\include\.&quot; -I&quot;$(QTDIR)\include\QtCore\.&quot; -I&quot;$(QTDIR)\include\QtGui\.&quot; -I&quot;$(QTDIR)\include\QtNetwork\.&quot; -I&quot;$(QTDIR)\include\QtOpenGL\.&quot; -I&quot;$(QTDIR)\include\QtTest\.&quot; -I&quot;$(QTDIR)\include\QtWebKit\.&quot; -I&quot;.\.&quot; -I&quot;.\GeneratedFiles\$(ConfigurationName)\.&quot; -I&quot;.\GeneratedFiles\.&quot;&#x0D;&#x0A;"
+ AdditionalDependencies="&quot;$(QTDIR)\bin\moc.exe&quot;;$(InputPath)"
+ Outputs="&quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot;"
+ />
+ </FileConfiguration>
+ </File>
+ <File
RelativePath=".\tracker.h"
>
<FileConfiguration
@@ -712,6 +744,18 @@
</FileConfiguration>
</File>
<File
+ RelativePath=".\GeneratedFiles\Release\moc_SCServer.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
RelativePath=".\GeneratedFiles\Release\moc_tracker.cpp"
>
<FileConfiguration
@@ -802,6 +846,29 @@
</FileConfiguration>
</File>
<File
+ RelativePath=".\GeneratedFiles\Debug\moc_SCServer.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
diff --git a/FaceTrackNoIR/SCServer.cpp b/FaceTrackNoIR/SCServer.cpp
new file mode 100644
index 00000000..70c36595
--- /dev/null
+++ b/FaceTrackNoIR/SCServer.cpp
@@ -0,0 +1,203 @@
+/********************************************************************************
+* SCServer SCServer is the Class, that communicates headpose-data *
+* to games, using the SimConnect.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):
+*/
+#include "SCServer.h"
+
+
+float SCServer::virtPosX = 0.0f;
+float SCServer::virtPosY = 0.0f;
+float SCServer::virtPosZ = 0.0f;
+
+float SCServer::virtRotX = 0.0f;
+float SCServer::virtRotY = 0.0f;
+float SCServer::virtRotZ = 0.0f;
+
+/** constructor **/
+SCServer::SCServer() {
+
+ // Create events
+ m_StopThread = CreateEvent(0, TRUE, FALSE, 0);
+ m_WaitThread = CreateEvent(0, TRUE, FALSE, 0);
+
+ ProgramName = "";
+}
+
+/** destructor **/
+SCServer::~SCServer() {
+
+ // Trigger thread to stop
+ ::SetEvent(m_StopThread);
+
+ // Wait until thread finished
+ if (isRunning()) {
+ ::WaitForSingleObject(m_WaitThread, INFINITE);
+ }
+
+ // Close handles
+ ::CloseHandle(m_StopThread);
+ ::CloseHandle(m_WaitThread);
+
+ //
+ // Free the DLL
+ //
+ SCClientLib.unload();
+
+ //terminates the QThread and waits for finishing the QThread
+ terminate();
+ wait();
+}
+
+/** QThread run @override **/
+void SCServer::run() {
+bool blnSimConnectActive = false;
+HANDLE hSimConnect = NULL; // Handle to SimConnect
+importSimConnect_Open simconnect_open; // SimConnect function(s) in DLL
+importSimConnect_Close simconnect_close;
+importSimConnect_CameraSetRelative6DOF simconnect_set6DOF;
+
+ //
+ // Get the SimConnect_Open function from the DLL and use it!
+ //
+ simconnect_open = (importSimConnect_Open) SCClientLib.resolve("SimConnect_Open");
+ if (simconnect_open == NULL) {
+ qDebug() << "SCServer::run() says: SimConnect_Open function not found in DLL!";
+ return;
+ }
+ simconnect_set6DOF = (importSimConnect_CameraSetRelative6DOF) SCClientLib.resolve("SimConnect_CameraSetRelative6DOF");
+ if (simconnect_set6DOF == NULL) {
+ qDebug() << "SCServer::run() says: SimConnect_CameraSetRelative6DOF function not found in DLL!";
+ return;
+ }
+ simconnect_close = (importSimConnect_Close) SCClientLib.resolve("SimConnect_Close");
+ if (simconnect_close == NULL) {
+ qDebug() << "SCServer::run() says: SimConnect_Close function not found in DLL!";
+ return;
+ }
+
+ qDebug() << "SCServer::run() says: SimConnect functions resolved in DLL!";
+
+ forever
+ {
+ // Check event for stop thread
+ if(::WaitForSingleObject(m_StopThread, 0) == WAIT_OBJECT_0)
+ {
+ // Set event
+ simconnect_close( hSimConnect );
+ ::SetEvent(m_WaitThread);
+ return;
+ }
+
+ if (!blnSimConnectActive) {
+ if (SUCCEEDED(simconnect_open(&hSimConnect, "FaceTrackNoIR", NULL, 0, 0, 0))) {
+ qDebug() << "SCServer::run() says: SimConnect active!";
+ blnSimConnectActive = true;
+ }
+ else {
+ msleep(5000);
+ yieldCurrentThread();
+ }
+ }
+ else {
+ //
+ // Write the 6DOF-data to FSX
+ //
+ if (S_OK == simconnect_set6DOF(hSimConnect, virtPosX, virtPosY, virtPosZ, virtRotX, virtRotZ, virtRotY)) {
+ qDebug() << "SCServer::run() says: SimConnect data written!";
+ }
+
+ // just for lower cpu load
+ msleep(15);
+ yieldCurrentThread();
+ }
+ }
+}
+
+//
+// Check if the Client DLL exists and load it (to test it), if so.
+// Returns 'true' if all seems OK.
+//
+bool SCServer::SCCheckClientDLL()
+{
+ QString aFileName; // File Path and Name
+
+ // Code to activate the context for the SimConnect DLL
+ ACTCTX act = { 0 };
+ HANDLE hctx;
+ ULONG_PTR ulCookie;
+
+
+ qDebug() << "FTCheckClientDLL says: Starting Function";
+
+ try {
+
+ act.cbSize = sizeof(act);
+ act.dwFlags = ACTCTX_FLAG_RESOURCE_NAME_VALID;
+
+ QString manifest(QCoreApplication::applicationDirPath());
+ manifest += "\\FaceTrackNoIR.exe";
+ const wchar_t * encodedName = reinterpret_cast<const wchar_t *>(manifest.utf16());
+
+ act.lpSource = encodedName;
+ act.lpResourceName = MAKEINTRESOURCE(101);
+
+ hctx = CreateActCtx (&act);
+
+ if (hctx != INVALID_HANDLE_VALUE) {
+ if (!ActivateActCtx(hctx, &ulCookie)) {
+ ReleaseActCtx(hctx);
+ QMessageBox::information(0, "FaceTrackNoIR error", "SimConnect DLL not found!");
+ }
+ }
+ else {
+ qDebug() << "FTCheckClientDLL says: Error INVALID_HANDLE: " << GetLastError();
+ return false;
+ }
+
+ //
+ // Just try to load the DLL. Let Windows handle the PATH's and such trivialities...
+ //
+ aFileName = SC_CLIENT_FILENAME;
+
+ //
+ // Load the DLL.
+ //
+ SCClientLib.setFileName(aFileName);
+ if (SCClientLib.load() != true) {
+ QMessageBox::information(0, "FaceTrackNoIR error", SCClientLib.errorString());
+ return false;
+ }
+
+ //
+ // Deactivate the context again: the function-references should stay in-tact...
+ //
+ DeactivateActCtx(0, ulCookie);
+ ReleaseActCtx(hctx);
+
+ } catch(...) {
+ return false;
+ }
+ return true;
+}
+
+//END
diff --git a/FaceTrackNoIR/SCServer.h b/FaceTrackNoIR/SCServer.h
new file mode 100644
index 00000000..568cfe77
--- /dev/null
+++ b/FaceTrackNoIR/SCServer.h
@@ -0,0 +1,99 @@
+/********************************************************************************
+* SCServer SCServer is the Class, that communicates headpose-data *
+* to games, using the SimConnect.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_SCSERVER_H
+#define INCLUDED_SCSERVER_H
+
+//
+// Prevent the SimConnect manifest from being merged in the application-manifest
+// This is necessary to run FaceTrackNoIR on a PC without FSX
+//
+#define SIMCONNECT_H_NOMANIFEST
+#include "Windows.h"
+#include "SimConnect.h"
+#include <QString>
+#include <QMessageBox>
+#include <QSettings>
+#include <QFile>
+#include <QApplication>
+#include <QDebug>
+#include <QThread>
+#include <QMutex>
+#include <QLibrary>
+#include <QUdpSocket>
+
+typedef HRESULT (WINAPI *importSimConnect_Open)(HANDLE * phSimConnect, LPCSTR szName, HWND hWnd, DWORD UserEventWin32, HANDLE hEventHandle, DWORD ConfigIndex);
+typedef HRESULT (WINAPI *importSimConnect_Close)(HANDLE hSimConnect);
+typedef HRESULT (WINAPI *importSimConnect_CameraSetRelative6DOF)(HANDLE hSimConnect, float fDeltaX, float fDeltaY, float fDeltaZ, float fPitchDeg, float fBankDeg, float fHeadingDeg);
+
+using namespace std;
+
+static const char* SC_CLIENT_FILENAME = "SimConnect.dll";
+
+class SCServer : public QThread {
+ Q_OBJECT
+
+public:
+
+ // public member methods
+ SCServer();
+ ~SCServer();
+
+ bool SCCheckClientDLL();
+
+ // protected member methods
+protected:
+ void run();
+
+private:
+ // Handles to neatly terminate thread...
+ HANDLE m_StopThread;
+ HANDLE m_WaitThread;
+
+ // Private properties
+ QString ProgramName;
+ QLibrary SCClientLib;
+
+public:
+
+ // Settings for calculating the Virtual Pose
+ static float virtPosX;
+ static float virtPosY;
+ static float virtPosZ;
+
+ static float virtRotX;
+ static float virtRotY;
+ static float virtRotZ;
+
+ static void setVirtRotX(float rot) { virtRotX = rot; } // degrees
+ static void setVirtRotY(float rot) { virtRotY = rot; }
+ static void setVirtRotZ(float rot) { virtRotZ = rot; }
+
+ static void setVirtPosX(float pos) { virtPosX = pos/100.f; } // cm to meters
+ static void setVirtPosY(float pos) { virtPosY = pos/100.f; }
+ static void setVirtPosZ(float pos) { virtPosZ = pos/100.f; }
+
+};
+
+
+#endif//INCLUDED_SCSERVER_H
+//END
diff --git a/FaceTrackNoIR/SCServer.manifest b/FaceTrackNoIR/SCServer.manifest
new file mode 100644
index 00000000..19b123ba
--- /dev/null
+++ b/FaceTrackNoIR/SCServer.manifest
@@ -0,0 +1,13 @@
+<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
+<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type='win32' name='Microsoft.FlightSimulator.SimConnect ' version='10.0.60905.0' processorArchitecture='x86' publicKeyToken='67c7c14424d61b5b' />
+ </dependentAssembly>
+ </dependency>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type='win32' name='Microsoft.VC80.CRT' version='8.0.50608.0' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
+ </dependentAssembly>
+ </dependency>
+</assembly>
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/tracker.cpp b/FaceTrackNoIR/tracker.cpp
index 82f26fc2..1eeb2c88 100644
--- a/FaceTrackNoIR/tracker.cpp
+++ b/FaceTrackNoIR/tracker.cpp
@@ -23,6 +23,9 @@
*********************************************************************************/
/*
Modifications (last one on top):
+ 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
@@ -98,6 +101,7 @@ Tracker::Tracker( int clientID ) {
server_FG = 0;
server_PPJoy = 0;
server_FTIR = 0;
+ server_SC = 0;
switch (selectedClient) {
case FREE_TRACK:
server_FT = new FTServer; // Create Free-track protocol-server
@@ -118,6 +122,10 @@ Tracker::Tracker( int clientID ) {
server_FTIR = new FTIRServer; // Create Fake-TIR protocol-server
break;
+ case SIMCONNECT:
+ server_SC = new SCServer; // Create SimConnect protocol-server
+ break;
+
default:
// should never be reached
break;
@@ -142,6 +150,9 @@ Tracker::~Tracker() {
if (server_FTIR) {
server_FTIR->deleteLater();
}
+ if (server_SC) {
+ server_SC->deleteLater();
+ }
// Trigger thread to stop
::SetEvent(m_StopThread);
@@ -217,6 +228,23 @@ void Tracker::setup(QWidget *head, FaceTrackNoIR *parent) {
server_FTIR->start(); // Start the thread
}
+ //
+ // Check if the SimConnect DLL is available, load it if so.
+ //
+ if (server_SC) {
+ DLL_Ok = server_SC->SCCheckClientDLL();
+
+ if (DLL_Ok) {
+ server_SC->start(); // Start the thread
+ }
+ else {
+ QMessageBox::information(0, "FaceTrackNoIR error", "This SimConnect version is not installed!");
+ }
+ ////else {
+ //// server_SC->~SCServer();
+ //// server_SC = 0;
+ ////}
+ }
}
@@ -458,11 +486,11 @@ void Tracker::run() {
// X
if (Tracker::useFilter) {
- posX = lowPassFilter ( getSmoothFromList( &X.rawList ) - X.offset_headPos,
+ posX = lowPassFilter ( getSmoothFromList( &X.rawList ) - X.offset_headPos - X.initial_headPos,
&X.prevPos, dT, Tracker::X.red );
}
else {
- posX = getSmoothFromList( &X.rawList ) - X.offset_headPos;
+ posX = getSmoothFromList( &X.rawList ) - X.offset_headPos - X.initial_headPos;
}
posX = X.invert * getOutputFromCurve(&X.curve, posX, X.NeutralZone, X.MaxInput);
@@ -533,14 +561,6 @@ void Tracker::run() {
// Fake-trackIR
if (server_FTIR) {
-
- // For some reason (not yet understood) the values only came through after being copied to locals...
- // Trying again?!
- //float rotX = getDegreesFromRads ( Tracker::Pitch.invert * Tracker::Pitch.sens * rotX );
- //float rotY = getDegreesFromRads ( Tracker::Yaw.invert * Tracker::Yaw.sens * rotY );
- //float rotZ = getDegreesFromRads ( Tracker::Roll.invert * Tracker::Roll.sens * rotZ );
- qDebug() << "Tracker::run() says: virtRotX =" << rotX << " virtRotY =" << rotY;
-
server_FTIR->setVirtRotX ( rotX ); // degrees
server_FTIR->setVirtRotY ( rotY );
server_FTIR->setVirtRotZ ( rotZ );
@@ -550,6 +570,17 @@ void Tracker::run() {
server_FTIR->setVirtPosZ ( posZ );
}
+ // SimConnect
+ if (server_SC) {
+ server_SC->setVirtRotX ( rotX ); // degrees
+ server_SC->setVirtRotY ( rotY );
+ server_SC->setVirtRotZ ( rotZ );
+
+ server_SC->setVirtPosX ( posX ); // centimeters
+ server_SC->setVirtPosY ( posY );
+ server_SC->setVirtPosZ ( posZ );
+ }
+
}
else {
//
@@ -590,6 +621,15 @@ void Tracker::run() {
server_FTIR->setVirtPosY ( 0.0f );
server_FTIR->setVirtPosZ ( 0.0f );
}
+
+ if (server_SC) {
+ server_SC->setVirtRotX ( 0.0f );
+ server_SC->setVirtRotY ( 0.0f );
+ server_SC->setVirtRotZ ( 0.0f );
+ server_SC->setVirtPosX ( 0.0f );
+ server_SC->setVirtPosY ( 0.0f );
+ server_SC->setVirtPosZ ( 0.0f );
+ }
}
//for lower cpu load
@@ -852,41 +892,70 @@ QPointF point1, point2, point3, point4;
// Read the curve-settings from the file. Use the (deprecated) settings, if the curves are not there.
//
iniFile.beginGroup ( "Curves" );
+
+ //
+ // Create a new path and assign it to the curve.
+ //
getCurvePoints( &iniFile, "Yaw_", &point1, &point2, &point3, &point4, NeutralZone, sensYaw, 50, 180 );
- Yaw.curve.moveTo( QPointF(0,0) );
+ QPainterPath newYawCurve;
+ newYawCurve.moveTo( QPointF(0,0) );
+ newYawCurve.cubicTo(point2, point3, point4);
+
Yaw.NeutralZone = point1.y(); // Get the Neutral Zone
Yaw.MaxInput = point4.y(); // Get Maximum Input
- Yaw.curve.cubicTo(point2, point3, point4);
+ Yaw.curve = newYawCurve;
+ qDebug() << "loadSettings says: curve-elementcount = " << Yaw.curve.elementCount();
+
+ // Pitch
getCurvePoints( &iniFile, "Pitch_", &point1, &point2, &point3, &point4, NeutralZone, sensPitch, 50, 180 );
- Pitch.curve.moveTo( QPointF(0,0) );
+ QPainterPath newPitchCurve;
+ newPitchCurve.moveTo( QPointF(0,0) );
+ newPitchCurve.cubicTo(point2, point3, point4);
+
Pitch.NeutralZone = point1.y(); // Get the Neutral Zone
Pitch.MaxInput = point4.y(); // Get Maximum Input
- Pitch.curve.cubicTo(point2, point3, point4);
+ Pitch.curve = newPitchCurve;
+ // Roll
getCurvePoints( &iniFile, "Roll_", &point1, &point2, &point3, &point4, NeutralZone, sensRoll, 50, 180 );
- Roll.curve.moveTo( QPointF(0,0) );
+ QPainterPath newRollCurve;
+ newRollCurve.moveTo( QPointF(0,0) );
+ newRollCurve.cubicTo(point2, point3, point4);
+
Roll.NeutralZone = point1.y(); // Get the Neutral Zone
Roll.MaxInput = point4.y(); // Get Maximum Input
- Roll.curve.cubicTo(point2, point3, point4);
+ Roll.curve = newRollCurve;
+ // X
getCurvePoints( &iniFile, "X_", &point1, &point2, &point3, &point4, NeutralZone, sensX, 50, 180 );
- X.curve.moveTo( QPointF(0,0) );
+ QPainterPath newXCurve;
+ newXCurve.moveTo( QPointF(0,0) );
+ newXCurve.cubicTo(point2, point3, point4);
+
X.NeutralZone = point1.y(); // Get the Neutral Zone
X.MaxInput = point4.y(); // Get Maximum Input
- X.curve.cubicTo(point2, point3, point4);
+ X.curve = newXCurve;
+ // Y
getCurvePoints( &iniFile, "Y_", &point1, &point2, &point3, &point4, NeutralZone, sensY, 50, 180 );
- Y.curve.moveTo( QPointF(0,0) );
+ QPainterPath newYCurve;
+ newYCurve.moveTo( QPointF(0,0) );
+ newYCurve.cubicTo(point2, point3, point4);
+
Y.NeutralZone = point1.y(); // Get the Neutral Zone
Y.MaxInput = point4.y(); // Get Maximum Input
- Y.curve.cubicTo(point2, point3, point4);
+ Y.curve = newYCurve;
+ // Z
getCurvePoints( &iniFile, "Z_", &point1, &point2, &point3, &point4, NeutralZone, sensZ, 50, 180 );
- Z.curve.moveTo( QPointF(0,0) );
+ QPainterPath newZCurve;
+ newZCurve.moveTo( QPointF(0,0) );
+ newZCurve.cubicTo(point2, point3, point4);
+
Z.NeutralZone = point1.y(); // Get the Neutral Zone
Z.MaxInput = point4.y(); // Get Maximum Input
- Z.curve.cubicTo(point2, point3, point4);
+ Z.curve = newZCurve;
iniFile.endGroup ();
diff --git a/FaceTrackNoIR/tracker.h b/FaceTrackNoIR/tracker.h
index e3d6063f..a04b8ef4 100644
--- a/FaceTrackNoIR/tracker.h
+++ b/FaceTrackNoIR/tracker.h
@@ -40,6 +40,7 @@
#include "FGServer.h" // FlightGear-server
#include "PPJoyServer.h" // Virtual Joystick
#include "FTIRServer.h" // FakeTIR-server
+#include "SCServer.h" // SimConnect-server (for MS Flight Simulator X)
// include the DirectX Library files
#pragma comment (lib, "dinput8.lib")
@@ -62,7 +63,8 @@ enum FTNoIR_Client {
FLIGHTGEAR = 1,
FTNOIR = 2,
PPJOY = 3,
- TRACKIR = 4
+ TRACKIR = 4,
+ SIMCONNECT = 5
};
class FaceTrackNoIR; // pre-define parent-class to avoid circular includes
@@ -154,6 +156,7 @@ private:
FGServer *server_FG; // FlightGear Server
PPJoyServer *server_PPJoy; // PPJoy Server
FTIRServer *server_FTIR; // Fake TIR Server
+ SCServer *server_SC; // SimConnect Server
protected:
// qthread override run method
@@ -172,22 +175,6 @@ public:
QSharedPointer<EngineBase> getEngine() { return _engine; };
- //static float getHeadPosX() {return X.headPos;}
- //static float getHeadPosY() {return Y.headPos;}
- //static float getHeadPosZ() {return Z.headPos;}
-
- //static void setHeadPosX(float x) { X.headPos = x; }
- //static void setHeadPosY(float y) { Y.headPos = y; }
- //static void setHeadPosZ(float z) { Z.headPos = z; }
-
- //static float getHeadRotX() {return Pitch.headPos;}
- //static float getHeadRotY() {return Yaw.headPos;}
- //static float getHeadRotZ() {return Roll.headPos;}
-
- //static void setHeadRotX(float x) { Pitch.headPos = x; }
- //static void setHeadRotY(float y) { Yaw.headPos = y; }
- //static void setHeadRotZ(float z) { Roll.headPos = z; }
-
static bool getConfid() { return confid; }
static void setInvertPitch(bool invert) { Pitch.invert = invert?-1.0f:+1.0f; }
diff --git a/bin/FaceTrackNoIR.exe b/bin/FaceTrackNoIR.exe
index 775c7a68..12a74897 100644
--- a/bin/FaceTrackNoIR.exe
+++ b/bin/FaceTrackNoIR.exe
Binary files differ
diff --git a/bin/Settings/ArmA.ini b/bin/Settings/ArmA.ini
index db548ff1..b8913b5c 100644
--- a/bin/Settings/ArmA.ini
+++ b/bin/Settings/ArmA.ini
@@ -10,14 +10,14 @@ sensZ=70
invertYaw=false
invertPitch=false
invertRoll=true
-invertX=false
+invertX=true
invertY=false
invertZ=false
useEWMA=true
redYaw=60
redPitch=60
redRoll=60
-redX=70
+redX=71
redY=70
redZ=70
@@ -26,21 +26,21 @@ Selection=0
[Curves]
Roll_point1=@Variant(\0\0\0\x1a\0\0\0\0\0\0\0\0@\b\0\0\0\0\0\0)
-Roll_point2=@Variant(\0\0\0\x1a@\x14\0\0\0\0\0\0@F\0\0\0\0\0\0)
-Roll_point3=@Variant(\0\0\0\x1a@\x14\0\0\0\0\0\0@C\x80\0\0\0\0\0)
+Roll_point2=@Variant(\0\0\0\x1a@6\x80\0\0\0\0\0@B\xc0\0\0\0\0\0)
+Roll_point3=@Variant(\0\0\0\x1a@9\x80\0\0\0\0\0@B\x80\0\0\0\0\0)
Roll_point4=@Variant(\0\0\0\x1a@F\0\0\0\0\0\0@I\0\0\0\0\0\0)
Yaw_point1=@Variant(\0\0\0\x1a\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0)
-Yaw_point2="@Variant(\0\0\0\x1a@2\0\0\0\0\0\0@;\0\0\0\0\0\0)"
-Yaw_point3=@Variant(\0\0\0\x1a@>\0\0\0\0\0\0@E\x80\0\0\0\0\0)
-Yaw_point4=@Variant(\0\0\0\x1a@K\0\0\0\0\0\0@I\0\0\0\0\0\0)
+Yaw_point2=@Variant(\0\0\0\x1a@2\0\0\0\0\0\0@8\0\0\0\0\0\0)
+Yaw_point3=@Variant(\0\0\0\x1a@5\0\0\0\0\0\0@9\0\0\0\0\0\0)
+Yaw_point4=@Variant(\0\0\0\x1a@G\0\0\0\0\0\0@I\0\0\0\0\0\0)
Pitch_point1=@Variant(\0\0\0\x1a\0\0\0\0\0\0\0\0@\b\0\0\0\0\0\0)
-Pitch_point2=@Variant(\0\0\0\x1a@3\0\0\0\0\0\0@D\0\0\0\0\0\0)
-Pitch_point3=@Variant(\0\0\0\x1a@4\0\0\0\0\0\0@E\x80\0\0\0\0\0)
+Pitch_point2=@Variant(\0\0\0\x1a@<\x80\0\0\0\0\0@@\0\0\0\0\0\0)
+Pitch_point3=@Variant(\0\0\0\x1a@<\x80\0\0\0\0\0@@\x80\0\0\0\0\0)
Pitch_point4=@Variant(\0\0\0\x1a@D\x80\0\0\0\0\0@I\0\0\0\0\0\0)
X_point1=@Variant(\0\0\0\x1a\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0)
-X_point2=@Variant(\0\0\0\x1a@P\xc0\0\0\0\0\0@1\x80\0\0\0\0\0)
-X_point3=@Variant(\0\0\0\x1a@M\xc0\0\0\0\0\0@2\x80\0\0\0\0\0)
-X_point4=@Variant(\0\0\0\x1a@U \0\0\0\0\0@I\0\0\0\0\0\0)
+X_point2=@Variant(\0\0\0\x1a@Z@\0\0\0\0\0@1\0\0\0\0\0\0)
+X_point3=@Variant(\0\0\0\x1a@a@\0\0\0\0\0@?\0\0\0\0\0\0)
+X_point4=@Variant(\0\0\0\x1a@d\xa0\0\0\0\0\0@I\0\0\0\0\0\0)
Y_point1=@Variant(\0\0\0\x1a\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0)
Y_point2=@Variant(\0\0\0\x1a@F\x80\0\0\0\0\0@E\0\0\0\0\0\0)
Y_point3=@Variant(\0\0\0\x1a@6\0\0\0\0\0\0@9\0\0\0\0\0\0)
@@ -51,11 +51,11 @@ Z_point3=@Variant(\0\0\0\x1a@6\0\0\0\0\0\0@D\x80\0\0\0\0\0)
Z_point4=@Variant(\0\0\0\x1a@K\x80\0\0\0\0\0@I\0\0\0\0\0\0)
[KB_Shortcuts]
-Keycode_Center=59
+Keycode_Center=199
Shift_Center=false
Ctrl_Center=false
-Alt_Center=true
-Keycode_StartStop=60
+Alt_Center=false
+Keycode_StartStop=211
Shift_StartStop=false
Ctrl_StartStop=false
-Alt_StartStop=true
+Alt_StartStop=false
diff --git a/bin/Settings/FF5.ini b/bin/Settings/FF5.ini
new file mode 100644
index 00000000..db4901fd
--- /dev/null
+++ b/bin/Settings/FF5.ini
@@ -0,0 +1,25 @@
+[Tracking]
+Smooth=15
+NeutralZone=5
+sensYaw=200
+sensPitch=200
+sensRoll=100
+sensX=100
+sensY=100
+sensZ=100
+invertYaw=true
+invertPitch=false
+invertRoll=false
+invertX=true
+invertY=false
+invertZ=false
+useEWMA=true
+redYaw=75
+redPitch=75
+redRoll=75
+redX=75
+redY=75
+redZ=75
+
+[GameProtocol]
+Selection=4
diff --git a/bin/Settings/GlovePIE.ini b/bin/Settings/GlovePIE.ini
new file mode 100644
index 00000000..d6949d39
--- /dev/null
+++ b/bin/Settings/GlovePIE.ini
@@ -0,0 +1,25 @@
+[Tracking]
+Smooth=15
+NeutralZone=5
+sensYaw=200
+sensPitch=200
+sensRoll=100
+sensX=100
+sensY=100
+sensZ=100
+invertYaw=true
+invertPitch=false
+invertRoll=false
+invertX=true
+invertY=false
+invertZ=false
+useEWMA=true
+redYaw=75
+redPitch=75
+redRoll=75
+redX=75
+redY=75
+redZ=75
+
+[GameProtocol]
+Selection=3
diff --git a/bin/Settings/SimConnect.ini b/bin/Settings/SimConnect.ini
new file mode 100644
index 00000000..3d69dde0
--- /dev/null
+++ b/bin/Settings/SimConnect.ini
@@ -0,0 +1,28 @@
+[Tracking]
+Smooth=5
+invertYaw=true
+invertPitch=true
+invertRoll=false
+invertX=false
+invertY=false
+invertZ=true
+useEWMA=true
+redYaw=60
+redPitch=60
+redRoll=60
+redX=71
+redY=70
+redZ=70
+
+[GameProtocol]
+Selection=5
+
+[KB_Shortcuts]
+Keycode_Center=59
+Shift_Center=false
+Ctrl_Center=false
+Alt_Center=true
+Keycode_StartStop=60
+Shift_StartStop=false
+Ctrl_StartStop=false
+Alt_StartStop=true