diff options
author | Wim Vriend <facetracknoir@gmail.com> | 2011-04-26 19:15:59 +0000 |
---|---|---|
committer | Wim Vriend <facetracknoir@gmail.com> | 2011-04-26 19:15:59 +0000 |
commit | 16fc21fdc3d849de801064b06c507cb504ae314c (patch) | |
tree | 9ead79ebfd1b5c686f7a1c4e3efcf53d6fdf4a90 /FaceTrackNoIR | |
parent | f79e3f588e8bb112420da3a3912ee83dc28370c7 (diff) |
Start on Mouse Look
git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@76 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb
Diffstat (limited to 'FaceTrackNoIR')
-rw-r--r-- | FaceTrackNoIR/FTNoIR_KeyboardShortcuts.ui | 131 | ||||
-rw-r--r-- | FaceTrackNoIR/FaceTrackNoIR.cpp | 49 | ||||
-rw-r--r-- | FaceTrackNoIR/FaceTrackNoIR.qrc | 31 | ||||
-rw-r--r-- | FaceTrackNoIR/FaceTrackNoIR.ui | 2 | ||||
-rw-r--r-- | FaceTrackNoIR/tracker.cpp | 41 | ||||
-rw-r--r-- | FaceTrackNoIR/tracker.h | 8 |
6 files changed, 196 insertions, 66 deletions
diff --git a/FaceTrackNoIR/FTNoIR_KeyboardShortcuts.ui b/FaceTrackNoIR/FTNoIR_KeyboardShortcuts.ui index 3a8b98a8..2de9eede 100644 --- a/FaceTrackNoIR/FTNoIR_KeyboardShortcuts.ui +++ b/FaceTrackNoIR/FTNoIR_KeyboardShortcuts.ui @@ -7,7 +7,7 @@ <x>0</x>
<y>0</y>
<width>558</width>
- <height>270</height>
+ <height>308</height>
</rect>
</property>
<property name="windowTitle">
@@ -28,14 +28,14 @@ <layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<layout class="QGridLayout" name="gridLayout">
- <item row="2" column="6">
+ <item row="3" column="6">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Disables:</string>
</property>
</widget>
</item>
- <item row="1" column="6">
+ <item row="2" column="6">
<widget class="QLabel" name="label_5">
<property name="text">
<string>When OFF:</string>
@@ -58,7 +58,7 @@ </property>
</widget>
</item>
- <item row="2" column="0">
+ <item row="3" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Axis Inhibitor</string>
@@ -78,7 +78,7 @@ </property>
</widget>
</item>
- <item row="1" column="1">
+ <item row="2" column="1">
<widget class="QCheckBox" name="chkStartStopShift">
<property name="maximumSize">
<size>
@@ -91,7 +91,7 @@ </property>
</widget>
</item>
- <item row="2" column="1">
+ <item row="3" column="1">
<widget class="QCheckBox" name="chkInhibitShift">
<property name="maximumSize">
<size>
@@ -117,7 +117,7 @@ </property>
</widget>
</item>
- <item row="1" column="2">
+ <item row="2" column="2">
<widget class="QCheckBox" name="chkStartStopCtrl">
<property name="maximumSize">
<size>
@@ -130,7 +130,7 @@ </property>
</widget>
</item>
- <item row="2" column="2">
+ <item row="3" column="2">
<widget class="QCheckBox" name="chkInhibitCtrl">
<property name="maximumSize">
<size>
@@ -143,20 +143,7 @@ </property>
</widget>
</item>
- <item row="0" column="3">
- <widget class="QCheckBox" name="chkCenterAlt">
- <property name="maximumSize">
- <size>
- <width>50</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="text">
- <string>Alt</string>
- </property>
- </widget>
- </item>
- <item row="1" column="3">
+ <item row="2" column="3">
<widget class="QCheckBox" name="chkStartStopAlt">
<property name="maximumSize">
<size>
@@ -169,7 +156,7 @@ </property>
</widget>
</item>
- <item row="2" column="3">
+ <item row="3" column="3">
<widget class="QCheckBox" name="chkInhibitAlt">
<property name="maximumSize">
<size>
@@ -198,7 +185,7 @@ </property>
</widget>
</item>
- <item row="1" column="4">
+ <item row="2" column="4">
<widget class="QComboBox" name="cbxStartStopKey">
<property name="minimumSize">
<size>
@@ -208,7 +195,7 @@ </property>
</widget>
</item>
- <item row="2" column="4">
+ <item row="3" column="4">
<widget class="QComboBox" name="cbxInhibitKey">
<property name="minimumSize">
<size>
@@ -218,7 +205,7 @@ </property>
</widget>
</item>
- <item row="2" column="7">
+ <item row="3" column="7">
<widget class="QGroupBox" name="groupBox">
<property name="minimumSize">
<size>
@@ -291,7 +278,7 @@ </widget>
</widget>
</item>
- <item row="1" column="7">
+ <item row="2" column="7">
<widget class="QGroupBox" name="groupBox_2">
<property name="minimumSize">
<size>
@@ -333,7 +320,7 @@ </widget>
</widget>
</item>
- <item row="1" column="0">
+ <item row="2" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Start/stop</string>
@@ -343,7 +330,7 @@ </property>
</widget>
</item>
- <item row="2" column="8">
+ <item row="3" column="8">
<widget class="QGroupBox" name="groupBox_3">
<property name="styleSheet">
<string notr="true">color: rgb(0, 0, 0);</string>
@@ -410,7 +397,7 @@ </widget>
</widget>
</item>
- <item row="1" column="8">
+ <item row="2" column="8">
<widget class="QGroupBox" name="groupBox_4">
<property name="minimumSize">
<size>
@@ -452,6 +439,90 @@ </widget>
</widget>
</item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="textLabel2_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Game Zero</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QCheckBox" name="chkGameZeroShift">
+ <property name="maximumSize">
+ <size>
+ <width>50</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Shift</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2">
+ <widget class="QCheckBox" name="chkGameZeroCtrl">
+ <property name="maximumSize">
+ <size>
+ <width>50</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Ctrl</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="3">
+ <widget class="QCheckBox" name="chkCenterAlt">
+ <property name="maximumSize">
+ <size>
+ <width>50</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Alt</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="3">
+ <widget class="QCheckBox" name="chkGameZeroAlt">
+ <property name="maximumSize">
+ <size>
+ <width>50</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Alt</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="4">
+ <widget class="QComboBox" name="cbxGameZeroKey">
+ <property name="minimumSize">
+ <size>
+ <width>90</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string>Select Number</string>
+ </property>
+ <property name="insertPolicy">
+ <enum>QComboBox::InsertAlphabetically</enum>
+ </property>
+ </widget>
+ </item>
</layout>
</item>
</layout>
diff --git a/FaceTrackNoIR/FaceTrackNoIR.cpp b/FaceTrackNoIR/FaceTrackNoIR.cpp index 8646c248..79c3969b 100644 --- a/FaceTrackNoIR/FaceTrackNoIR.cpp +++ b/FaceTrackNoIR/FaceTrackNoIR.cpp @@ -852,6 +852,10 @@ QString libName; libName = QString("FTNoIR_Protocol_FTN.dll");
break;
+ case MOUSE:
+ libName = QString("FTNoIR_Protocol_MOUSE.dll");
+ break;
+
default:
break;
}
@@ -939,16 +943,17 @@ void FaceTrackNoIR::exit() { //
void FaceTrackNoIR::createIconGroupBox()
{
- ui.iconcomboBox->addItem(QIcon(QCoreApplication::applicationDirPath() + "/images/Freetrack.ico"), tr("Freetrack"));
- ui.iconcomboBox->addItem(QIcon(QCoreApplication::applicationDirPath() + "/images/FlightGear.ico"), tr("FlightGear"));
- 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 (FSX)"));
- ui.iconcomboBox->addItem(QIcon(QCoreApplication::applicationDirPath() + "/images/FS9.ico"), tr("FS2002/FS2004"));
+ ui.iconcomboBox->addItem(QIcon(":/images/Freetrack.ico"), tr("Freetrack"));
+ ui.iconcomboBox->addItem(QIcon(":/images/FlightGear.ico"), tr("FlightGear"));
+ ui.iconcomboBox->addItem(QIcon(":/images/FaceTrackNoIR.ico"), tr("FTNoir client"));
+ ui.iconcomboBox->addItem(QIcon(":/images/PPJoy.ico"), tr("Virtual Joystick"));
+ ui.iconcomboBox->addItem(QIcon(":/images/TrackIR.ico"), tr("Fake TrackIR"));
+ ui.iconcomboBox->addItem(QIcon(":/images/FSX.ico"), tr("SimConnect (FSX)"));
+ ui.iconcomboBox->addItem(QIcon(":/images/FS9.ico"), tr("FS2002/FS2004"));
+ ui.iconcomboBox->addItem(QIcon(":/images/Mouse.ico"), tr("Mouse look"));
- ui.iconcomboTrackerSource->addItem(QIcon(QCoreApplication::applicationDirPath() + "/images/SeeingMachines.ico"), tr("Face API"));
- ui.iconcomboTrackerSource->addItem(QIcon(QCoreApplication::applicationDirPath() + "/images/FaceTrackNoIR.ico"), tr("FTNoir server"));
+ ui.iconcomboTrackerSource->addItem(QIcon(":/images/SeeingMachines.ico"), tr("Face API"));
+ ui.iconcomboTrackerSource->addItem(QIcon(":/images/FaceTrackNoIR.ico"), tr("FTNoir server"));
}
//
@@ -1000,7 +1005,7 @@ void FaceTrackNoIR::setIcon(int index) trayIcon->show();
trayIcon->showMessage( "FaceTrackNoIR", ui.iconcomboBox->itemText(index));
}
- setWindowIcon(QIcon(QCoreApplication::applicationDirPath() + "/images/FaceTrackNoIR.ico"));
+ setWindowIcon(QIcon(":/images/FaceTrackNoIR.ico"));
ui.btnShowServerControls->setIcon(icon);
settingsDirty = true;
@@ -1016,6 +1021,7 @@ void FaceTrackNoIR::setIcon(int index) case TRACKIR:
case FLIGHTGEAR:
case FTNOIR:
+ case MOUSE:
ui.btnShowServerControls->show();
ui.btnShowServerControls->setEnabled ( true );
break;
@@ -1219,6 +1225,11 @@ QWidget( parent , f) connect(ui.chkCenterCtrl, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int)));
connect(ui.chkCenterAlt, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int)));
+ connect(ui.cbxGameZeroKey, SIGNAL(currentIndexChanged(int)), this, SLOT(keyChanged( int )));
+ connect(ui.chkGameZeroShift, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int)));
+ connect(ui.chkGameZeroCtrl, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int)));
+ connect(ui.chkGameZeroAlt, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int)));
+
connect(ui.cbxStartStopKey, SIGNAL(currentIndexChanged(int)), this, SLOT(keyChanged( int )));
connect(ui.chkStartStopShift, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int)));
connect(ui.chkStartStopCtrl, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int)));
@@ -1376,6 +1387,7 @@ QWidget( parent , f) //
for ( int i = 0; i < stringList.size(); i++) {
ui.cbxCenterKey->addItem(stringList.at(i));
+ ui.cbxGameZeroKey->addItem(stringList.at(i));
ui.cbxStartStopKey->addItem(stringList.at(i));
ui.cbxInhibitKey->addItem(stringList.at(i));
}
@@ -1465,6 +1477,18 @@ int keyindex; ui.chkCenterCtrl->setChecked (iniFile.value ( "Ctrl_Center", 0 ).toBool());
ui.chkCenterAlt->setChecked (iniFile.value ( "Alt_Center", 0 ).toBool());
+ // GameZero key
+ keyindex = keyList.indexOf ( iniFile.value ( "Keycode_GameZero", 1 ).toInt() );
+ if ( keyindex > 0 ) {
+ ui.cbxGameZeroKey->setCurrentIndex( keyindex );
+ }
+ else {
+ ui.cbxGameZeroKey->setCurrentIndex( 0 );
+ }
+ ui.chkGameZeroShift->setChecked (iniFile.value ( "Shift_GameZero", 0 ).toBool());
+ ui.chkGameZeroCtrl->setChecked (iniFile.value ( "Ctrl_GameZero", 0 ).toBool());
+ ui.chkGameZeroAlt->setChecked (iniFile.value ( "Alt_GameZero", 0 ).toBool());
+
// Start/stop key
keyindex = keyList.indexOf ( iniFile.value ( "Keycode_StartStop", 1 ).toInt() );
if ( keyindex > 0 ) {
@@ -1524,6 +1548,11 @@ void KeyboardShortcutDialog::save() { iniFile.setValue ( "Ctrl_Center", ui.chkCenterCtrl->isChecked() );
iniFile.setValue ( "Alt_Center", ui.chkCenterAlt->isChecked() );
+ iniFile.setValue ( "Keycode_GameZero", keyList.at( ui.cbxGameZeroKey->currentIndex() ) );
+ iniFile.setValue ( "Shift_GameZero", ui.chkGameZeroShift->isChecked() );
+ iniFile.setValue ( "Ctrl_GameZero", ui.chkGameZeroCtrl->isChecked() );
+ iniFile.setValue ( "Alt_GameZero", ui.chkGameZeroAlt->isChecked() );
+
iniFile.setValue ( "Keycode_StartStop", keyList.at( ui.cbxStartStopKey->currentIndex() ) );
iniFile.setValue ( "Shift_StartStop", ui.chkStartStopShift->isChecked() );
iniFile.setValue ( "Ctrl_StartStop", ui.chkStartStopCtrl->isChecked() );
diff --git a/FaceTrackNoIR/FaceTrackNoIR.qrc b/FaceTrackNoIR/FaceTrackNoIR.qrc index 17aa1be6..10cdcd14 100644 --- a/FaceTrackNoIR/FaceTrackNoIR.qrc +++ b/FaceTrackNoIR/FaceTrackNoIR.qrc @@ -1,15 +1,20 @@ <RCC> - <qresource prefix="/"> - <file>images/Settings16.png</file> - <file>images/SettingsOpen16.png</file> - <file>UIElements/Donate.png</file> - <file>UIElements/Curves.png</file> - <file>images/rotation_DOFs.png</file> - <file>images/translation_DOFs.png</file> - <file>images/FlightGear.ico</file> - <file>images/330px-6DOF_en.png</file> - <file>images/Freetrack.ico</file> - <file>images/FaceTrackNoIR.ico</file> - <file>images/SeeingMachines.ico</file> - </qresource> + <qresource prefix="/"> + <file>images/Settings16.png</file> + <file>images/SettingsOpen16.png</file> + <file>UIElements/Donate.png</file> + <file>UIElements/Curves.png</file> + <file>images/rotation_DOFs.png</file> + <file>images/translation_DOFs.png</file> + <file>images/FlightGear.ico</file> + <file>images/330px-6DOF_en.png</file> + <file>images/Freetrack.ico</file> + <file>images/FaceTrackNoIR.ico</file> + <file>images/SeeingMachines.ico</file> + <file>images/Mouse.ico</file> + <file>images/FS9.ico</file> + <file>images/FSX.ico</file> + <file>images/PPJoy.ico</file> + <file>images/TrackIR.ico</file> + </qresource> </RCC> diff --git a/FaceTrackNoIR/FaceTrackNoIR.ui b/FaceTrackNoIR/FaceTrackNoIR.ui index 2cfe5fbc..c4c6b228 100644 --- a/FaceTrackNoIR/FaceTrackNoIR.ui +++ b/FaceTrackNoIR/FaceTrackNoIR.ui @@ -1108,7 +1108,7 @@ color: rgb(0, 255, 0);</string> <number>-1</number>
</property>
<property name="maxVisibleItems">
- <number>6</number>
+ <number>7</number>
</property>
</widget>
<widget class="QPushButton" name="btnShowServerControls">
diff --git a/FaceTrackNoIR/tracker.cpp b/FaceTrackNoIR/tracker.cpp index 223d6d28..e88c2634 100644 --- a/FaceTrackNoIR/tracker.cpp +++ b/FaceTrackNoIR/tracker.cpp @@ -66,6 +66,7 @@ bool Tracker::confid = false; bool Tracker::do_tracking = true;
bool Tracker::do_center = false;
bool Tracker::do_inhibit = false;
+bool Tracker::do_game_zero = false;
bool Tracker::do_axis_reverse = false;
bool Tracker::useFilter = false;
@@ -89,6 +90,7 @@ THeadPoseDOF Tracker::Z; TShortKey Tracker::CenterKey; // ShortKey to Center headposition
TShortKey Tracker::StartStopKey; // ShortKey to Start/stop tracking
TShortKey Tracker::InhibitKey; // ShortKey to inhibit axis while tracking
+TShortKey Tracker::GameZeroKey; // ShortKey to Set Game Zero
TShortKey Tracker::AxisReverseKey; // ShortKey to start/stop axis reverse while tracking
ITrackerPtr Tracker::pTracker; // Pointer to Tracker instance (in DLL)
@@ -332,10 +334,13 @@ HRESULT retAcquire; bool lastCenterKey = false; // Remember state, to detect rising edge
bool lastStartStopKey = false;
bool lastInhibitKey = false;
+bool lastGameZeroKey = false;
bool waitAxisReverse = false;
bool waitThroughZero = false;
double actualYaw = 0.0f;
T6DOF offset_camera(0,0,0,0,0,0);
+T6DOF gamezero_camera(0,0,0,0,0,0);
+T6DOF gameoutput_camera(0,0,0,0,0,0);
Tracker::do_center = true; // Center initially
@@ -459,6 +464,15 @@ T6DOF offset_camera(0,0,0,0,0,0); lastCenterKey = isShortKeyPressed( &CenterKey, &keystate[0] ); // Remember
//
+ // Check the state of the GameZero key
+ //
+ if ( isShortKeyPressed( &GameZeroKey, &keystate[0] ) && (!lastGameZeroKey) ) {
+ Tracker::do_game_zero = true;
+ qDebug() << "Tracker::run() says GameZero pressed";
+ }
+ lastGameZeroKey = isShortKeyPressed( &GameZeroKey, &keystate[0] ); // Remember
+
+ //
// Check the state of the Inhibit key
//
if ( isShortKeyPressed( &InhibitKey, &keystate[0] ) && (!lastInhibitKey) ) {
@@ -504,12 +518,6 @@ T6DOF offset_camera(0,0,0,0,0,0); // If Center is pressed, copy the current values to the offsets.
//
if (Tracker::confid && Tracker::do_center) {
- //Pitch.offset_headPos = getSmoothFromList( &Pitch.rawList );
- //Yaw.offset_headPos = getSmoothFromList( &Yaw.rawList );
- //Roll.offset_headPos = getSmoothFromList( &Roll.rawList );
- //X.offset_headPos = getSmoothFromList( &X.rawList );
- //Y.offset_headPos = getSmoothFromList( &Y.rawList );
- //Z.offset_headPos = getSmoothFromList( &Z.rawList );
MessageBeep (MB_ICONASTERISK);
offset_camera.position.x = getSmoothFromList( &X.rawList );
@@ -522,6 +530,15 @@ T6DOF offset_camera(0,0,0,0,0,0); Tracker::do_center = false;
}
+ //
+ // If Set Game Zero is pressed, copy the current values to the offsets.
+ //
+ if (Tracker::confid && Tracker::do_game_zero) {
+ gamezero_camera.position = gameoutput_camera.position;
+
+ Tracker::do_game_zero = false;
+ }
+
if (Tracker::do_tracking && Tracker::confid) {
// Pitch
@@ -592,7 +609,8 @@ T6DOF offset_camera(0,0,0,0,0,0); // All Protocol server(s)
if (pProtocol) {
- pProtocol->sendHeadposeToGame( &output_camera ); // degrees & centimeters
+ gameoutput_camera = output_camera + gamezero_camera;
+ pProtocol->sendHeadposeToGame( &gameoutput_camera ); // degrees & centimeters
}
# ifdef USE_DEBUG_CLIENT
@@ -625,7 +643,8 @@ T6DOF offset_camera(0,0,0,0,0,0); output_camera.position.x = 0.0f;
output_camera.position.y = 0.0f;
output_camera.position.z = 0.0f;
- pProtocol->sendHeadposeToGame( &output_camera ); // degrees & centimeters
+ gameoutput_camera = output_camera + gamezero_camera;
+ pProtocol->sendHeadposeToGame( &gameoutput_camera ); // degrees & centimeters
}
}
}
@@ -1037,6 +1056,12 @@ QPointF point1, point2, point3, point4; InhibitKey.doY = iniFile.value ( "Inhibit_Y", 0 ).toBool();
InhibitKey.doZ = iniFile.value ( "Inhibit_Z", 0 ).toBool();
+ // Game Zero key
+ GameZeroKey.keycode = iniFile.value ( "Keycode_GameZero", 0 ).toInt();
+ GameZeroKey.shift = iniFile.value ( "Shift_GameZero", 0 ).toBool();
+ GameZeroKey.ctrl = iniFile.value ( "Ctrl_GameZero", 0 ).toBool();
+ GameZeroKey.alt = iniFile.value ( "Alt_GameZero", 0 ).toBool();
+
// Axis Reverse key
AxisReverseKey.keycode = DIK_R;
AxisReverseKey.shift = false;
diff --git a/FaceTrackNoIR/tracker.h b/FaceTrackNoIR/tracker.h index a46bfa2e..924f5542 100644 --- a/FaceTrackNoIR/tracker.h +++ b/FaceTrackNoIR/tracker.h @@ -73,7 +73,8 @@ enum FTNoIR_Client { PPJOY = 3,
TRACKIR = 4,
SIMCONNECT = 5,
- FSUIPC = 6
+ FSUIPC = 6,
+ MOUSE = 7
};
enum FTNoIR_Face_Tracker {
@@ -95,7 +96,6 @@ class THeadPoseDOF { public:
void initHeadPoseData(){
headPos = 0.0f;
-// initial_headPos = 0.0f;
offset_headPos = 0.0f;
invert = 0.0f;
red = 0.0f;
@@ -103,14 +103,12 @@ public: maxItems = 10.0f;
prevPos = 0.0f;
prevRawPos = 0.0f;
-// curve.???
NeutralZone = 0;
MaxInput = 0;
confidence = 0.0f;
newSample = FALSE;
}
float headPos; // Current position (from faceTracker, radials or meters)
-// float initial_headPos; // Position on startup (first valid value)
float offset_headPos; // Offset for centering
float invert; // Invert measured value (= 1.0f or -1.0f)
float red; // Reduction factor (used for EWMA-filtering, between 0.0f and 1.0f)
@@ -178,6 +176,7 @@ private: static TShortKey CenterKey; // ShortKey to Center headposition
static TShortKey StartStopKey; // ShortKey to Start/stop tracking
static TShortKey InhibitKey; // ShortKey to disable one or more axis during tracking
+ static TShortKey GameZeroKey; // ShortKey to Set Game Zero
static TShortKey AxisReverseKey; // ShortKey to reverse axis during tracking
// Flags to start/stop/reset tracking
@@ -185,6 +184,7 @@ private: static bool do_tracking; // Start/stop tracking, using the shortkey
static bool do_center; // Center head-position, using the shortkey
static bool do_inhibit; // Inhibit DOF-axis, using the shortkey
+ static bool do_game_zero; // Set in-game zero, using the shortkey
static bool do_axis_reverse; // Axis reverse, using the shortkey
static HANDLE hTrackMutex; // Prevent reading/writing the headpose simultaneously
|