summaryrefslogtreecommitdiffhomepage
path: root/facetracknoir
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2014-09-13 14:09:08 +0200
committerStanislaw Halik <sthalik@misaki.pl>2014-09-13 14:09:08 +0200
commitd4dd9675276093817756187c04d89f10da2df02e (patch)
tree3fefb989b5eb7cbacb39e242ecb05780dea7ff13 /facetracknoir
parent96e5dcb54b932d65c6d3bf9e9364226da21486ee (diff)
nix comment cancer
Diffstat (limited to 'facetracknoir')
-rw-r--r--facetracknoir/curve-config.cpp5
-rw-r--r--facetracknoir/facetracknoir.cpp4
-rw-r--r--facetracknoir/facetracknoir.h24
-rw-r--r--facetracknoir/plugin-support.cpp7
-rw-r--r--facetracknoir/plugin-support.h1
-rw-r--r--facetracknoir/rotation.h11
-rw-r--r--facetracknoir/shortcuts.cpp12
-rw-r--r--facetracknoir/tracker.cpp2
-rw-r--r--facetracknoir/tracker_types.cpp4
9 files changed, 16 insertions, 54 deletions
diff --git a/facetracknoir/curve-config.cpp b/facetracknoir/curve-config.cpp
index 2bff009a..ef63607d 100644
--- a/facetracknoir/curve-config.cpp
+++ b/facetracknoir/curve-config.cpp
@@ -11,7 +11,6 @@ CurveConfigurationDialog::CurveConfigurationDialog(FaceTrackNoIR *ftnoir, QWidge
QPoint offsetpos(120, 30);
this->move(parent->pos() + offsetpos);
- // Connect Qt signals to member-functions
connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(doOK()));
connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel()));
@@ -39,7 +38,6 @@ CurveConfigurationDialog::CurveConfigurationDialog(FaceTrackNoIR *ftnoir, QWidge
tie_setting(mainApp->s.a_y.invert, ui.chkInvertY);
tie_setting(mainApp->s.a_z.invert, ui.chkInvertZ);
- // Load the settings from the current .INI-file
loadSettings();
}
@@ -54,9 +52,6 @@ void CurveConfigurationDialog::doCancel() {
close();
}
-//
-// Load the current Settings from the currently 'active' INI-file.
-//
void CurveConfigurationDialog::loadSettings() {
QFunctionConfigurator* configs[6] = {
ui.txconfig,
diff --git a/facetracknoir/facetracknoir.cpp b/facetracknoir/facetracknoir.cpp
index d717b3be..8df368cd 100644
--- a/facetracknoir/facetracknoir.cpp
+++ b/facetracknoir/facetracknoir.cpp
@@ -26,7 +26,7 @@
#include "tracker.h"
#include "curve-config.h"
#include "opentrack-version.h"
-#include <QDebug>
+#include <QFileDialog>
#if defined(_WIN32)
# include <windows.h>
@@ -185,7 +185,6 @@ void FaceTrackNoIR::GetCameraNameDX() {
#if defined(_WIN32)
ui.cameraName->setText("No video-capturing device was found in your system: check if it's connected!");
- // Create the System Device Enumerator.
HRESULT hr;
ICreateDevEnum *pSysDevEnum = NULL;
hr = CoCreateInstance(CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC_SERVER, IID_ICreateDevEnum, (void **)&pSysDevEnum);
@@ -197,7 +196,6 @@ void FaceTrackNoIR::GetCameraNameDX() {
qDebug() << "GetWDM says: CoCreateInstance succeeded!";
- // Obtain a class enumerator for the video compressor category.
IEnumMoniker *pEnumCat = NULL;
hr = pSysDevEnum->CreateClassEnumerator(CLSID_VideoInputDeviceCategory, &pEnumCat, 0);
diff --git a/facetracknoir/facetracknoir.h b/facetracknoir/facetracknoir.h
index ca8084c2..1da2d6b8 100644
--- a/facetracknoir/facetracknoir.h
+++ b/facetracknoir/facetracknoir.h
@@ -22,24 +22,16 @@
* with this program; if not, see <http://www.gnu.org/licenses/>. *
*********************************************************************************/
-#ifndef FaceTrackNoIR_H
-#define FaceTrackNoIR_H
+#pragma once
#include <QMainWindow>
#include <QApplication>
-#include <QFileDialog>
-#include <QListView>
-#include <QPainter>
#include <QWidget>
#include <QDialog>
#include <QUrl>
#include <QList>
#include <QKeySequence>
-#include <QtGui>
-#include <QString>
-#include <QByteArray>
#include <QShortcut>
-#include <vector>
#if !defined(_WIN32)
# include "qxt-mini/QxtGlobalShortcut"
#else
@@ -78,7 +70,7 @@ public:
FaceTrackNoIR(QWidget *parent = 0);
~FaceTrackNoIR();
- QFrame *get_video_widget(); // Get a pointer to the video-widget, to use in the DLL
+ QFrame *get_video_widget();
Tracker *tracker;
void bindKeyboardShortcuts();
DynamicLibrary* current_tracker1() {
@@ -114,12 +106,12 @@ public slots:
private:
HeadPoseData pose;
Ui::OpentrackUI ui;
- QTimer timUpdateHeadPose; // Timer to display headpose
+ QTimer timUpdateHeadPose;
- ITrackerDialog* pTrackerDialog; // Pointer to Tracker dialog instance (in DLL)
- ITrackerDialog* pSecondTrackerDialog; // Pointer to the second Tracker dialog instance (in DLL)
- IProtocolDialog* pProtocolDialog; // Pointer to Protocol dialog instance (in DLL)
- IFilterDialog* pFilterDialog; // Pointer to Filter dialog instance (in DLL)
+ ITrackerDialog* pTrackerDialog;
+ ITrackerDialog* pSecondTrackerDialog;
+ IProtocolDialog* pProtocolDialog;
+ IFilterDialog* pFilterDialog;
QWidget *_keyboard_shortcuts;
QWidget *_curve_config;
@@ -161,5 +153,3 @@ private slots:
void startTracker();
void stopTracker();
};
-
-#endif // FaceTrackNoIR_H
diff --git a/facetracknoir/plugin-support.cpp b/facetracknoir/plugin-support.cpp
index 5d810ed1..2e80c5e4 100644
--- a/facetracknoir/plugin-support.cpp
+++ b/facetracknoir/plugin-support.cpp
@@ -1,4 +1,5 @@
#include "plugin-support.h"
+#include <QCoreApplication>
#if !(defined(_WIN32))
# include <dlfcn.h>
@@ -62,15 +63,9 @@ SelectedLibraries::SelectedLibraries(IDynamicLibraryProvider* mainApp) :
pFilter = (IFilter*) ptr();
}
- // Check if the Protocol-server files were installed OK.
- // Some servers also create a memory-mapping, for Inter Process Communication.
- // The handle of the MainWindow is sent to 'The Game', so it can send a message back.
-
if (pProtocol)
if(!pProtocol->checkServerInstallationOK())
return;
-
- // retrieve pointers to the User Interface and the main Application
if (pTracker) {
pTracker->StartTracker( mainApp->get_video_widget() );
}
diff --git a/facetracknoir/plugin-support.h b/facetracknoir/plugin-support.h
index 1c63151a..931f0fa1 100644
--- a/facetracknoir/plugin-support.h
+++ b/facetracknoir/plugin-support.h
@@ -77,6 +77,7 @@ struct Metadata
virtual void getIcon(QIcon *icon) = 0;
};
+// merely to break a circular header dependency -sh
class IDynamicLibraryProvider {
public:
virtual DynamicLibrary* current_tracker1() = 0;
diff --git a/facetracknoir/rotation.h b/facetracknoir/rotation.h
index 22f35abb..d40fb6cf 100644
--- a/facetracknoir/rotation.h
+++ b/facetracknoir/rotation.h
@@ -5,10 +5,9 @@
* copyright notice and this permission notice appear in all copies.
*/
-#ifndef ROTATION_H
-#define ROTATION_H
+#pragma once
#include <cmath>
-// ----------------------------------------------------------------------------
+
class RotationType {
public:
@@ -16,7 +15,7 @@ public:
RotationType(double yaw, double pitch, double roll) { fromEuler(yaw, pitch, roll); }
RotationType(double a, double b, double c, double d) : a(a),b(b),c(c),d(d) {}
- RotationType inv(){ // inverse
+ RotationType inv(){
return RotationType(a,-b,-c, -d);
}
@@ -58,7 +57,3 @@ public:
protected:
double a,b,c,d; // quaternion coefficients
};
-
-
-
-#endif //ROTATION_H
diff --git a/facetracknoir/shortcuts.cpp b/facetracknoir/shortcuts.cpp
index 601bbcc6..758617ca 100644
--- a/facetracknoir/shortcuts.cpp
+++ b/facetracknoir/shortcuts.cpp
@@ -9,9 +9,8 @@ KeyboardShortcutDialog::KeyboardShortcutDialog( FaceTrackNoIR *ftnoir, QWidget *
QPoint offsetpos(100, 100);
this->move(parent->pos() + offsetpos);
- mainApp = ftnoir; // Preserve a pointer to FTNoIR
+ mainApp = ftnoir;
- // Connect Qt signals to member-functions
connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(doOK()));
connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel()));
@@ -33,9 +32,6 @@ KeyboardShortcutDialog::KeyboardShortcutDialog( FaceTrackNoIR *ftnoir, QWidget *
tie_setting(mainApp->s.dingp, ui.ding);
}
-//
-// OK clicked on server-dialog
-//
void KeyboardShortcutDialog::doOK() {
mainApp->b->save();
this->close();
@@ -112,16 +108,10 @@ static bool isKeyPressed( const Key *key, const BYTE *keystate ) {
ctrl = ( (keystate[DIK_LCONTROL] & 0x80) || (keystate[DIK_RCONTROL] & 0x80) );
alt = ( (keystate[DIK_LALT] & 0x80) || (keystate[DIK_RALT] & 0x80) );
- //
- // If one of the modifiers is needed and not pressed, return false.
- //
if (key->shift && !shift) return false;
if (key->ctrl && !ctrl) return false;
if (key->alt && !alt) return false;
- //
- // All is well!
- //
return true;
}
return false;
diff --git a/facetracknoir/tracker.cpp b/facetracknoir/tracker.cpp
index dfe9bc1d..01fd0b4c 100644
--- a/facetracknoir/tracker.cpp
+++ b/facetracknoir/tracker.cpp
@@ -160,7 +160,7 @@ void Tracker::run() {
t_compensate(output_camera.axes, output_camera.axes, mainApp->s.tcomp_tz);
if (Libraries->pProtocol) {
- Libraries->pProtocol->sendHeadposeToGame( output_camera.axes ); // degrees & centimeters
+ Libraries->pProtocol->sendHeadposeToGame( output_camera.axes );
}
}
diff --git a/facetracknoir/tracker_types.cpp b/facetracknoir/tracker_types.cpp
index dec4ff81..ba3ac552 100644
--- a/facetracknoir/tracker_types.cpp
+++ b/facetracknoir/tracker_types.cpp
@@ -20,8 +20,7 @@ T6DOF operator-(const T6DOF& A, const T6DOF& B)
C.axes[TX] = A.axes[TX] - B.axes[TX];
C.axes[TY] = A.axes[TY] - B.axes[TY];
C.axes[TZ] = A.axes[TZ] - B.axes[TZ];
- //C.frame_number?
- return C;
+ return C;
}
T6DOF operator+(const T6DOF& A, const T6DOF& B)
@@ -39,6 +38,5 @@ T6DOF operator+(const T6DOF& A, const T6DOF& B)
C.axes[TX] = A.axes[TX] + B.axes[TX];
C.axes[TY] = A.axes[TY] + B.axes[TY];
C.axes[TZ] = A.axes[TZ] + B.axes[TZ];
- //C.frame_number?
return C;
}