summaryrefslogtreecommitdiffhomepage
path: root/bin
diff options
context:
space:
mode:
authorWim Vriend <facetracknoir@gmail.com>2012-07-21 13:15:16 +0000
committerWim Vriend <facetracknoir@gmail.com>2012-07-21 13:15:16 +0000
commita3500eef8d37a644df41c5c232a1a53aea783181 (patch)
treebf5a87d2c100e64b2342c0794ef39d7a8f44bcbc /bin
parenta4185da82f9c438df1ce200a1e31a199ed82d2a0 (diff)
BezierConfigurator replaced bt FunctionConfig
git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@114 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb
Diffstat (limited to 'bin')
-rw-r--r--bin/FunctionConfig.hbin0 -> 3182 bytes
-rw-r--r--bin/QBezierConfigurator.dllbin49152 -> 0 bytes
-rw-r--r--bin/QBezierConfigurator.libbin22348 -> 0 bytes
-rw-r--r--bin/QFunctionConfigurator.libbin0 -> 27136 bytes
-rw-r--r--bin/Settings/ArmA.ini72
-rw-r--r--bin/Settings/FreeFalcon.ini4
-rw-r--r--bin/qbezierconfigurator.h130
-rw-r--r--bin/qfunctionconfigurator.h177
-rw-r--r--bin/zlib1.dllbin61952 -> 70656 bytes
9 files changed, 247 insertions, 136 deletions
diff --git a/bin/FunctionConfig.h b/bin/FunctionConfig.h
new file mode 100644
index 00000000..9777d887
--- /dev/null
+++ b/bin/FunctionConfig.h
Binary files differ
diff --git a/bin/QBezierConfigurator.dll b/bin/QBezierConfigurator.dll
deleted file mode 100644
index a550b132..00000000
--- a/bin/QBezierConfigurator.dll
+++ /dev/null
Binary files differ
diff --git a/bin/QBezierConfigurator.lib b/bin/QBezierConfigurator.lib
deleted file mode 100644
index df3cc4e9..00000000
--- a/bin/QBezierConfigurator.lib
+++ /dev/null
Binary files differ
diff --git a/bin/QFunctionConfigurator.lib b/bin/QFunctionConfigurator.lib
new file mode 100644
index 00000000..05f4afa1
--- /dev/null
+++ b/bin/QFunctionConfigurator.lib
Binary files differ
diff --git a/bin/Settings/ArmA.ini b/bin/Settings/ArmA.ini
index e7ef044c..7777dbfc 100644
--- a/bin/Settings/ArmA.ini
+++ b/bin/Settings/ArmA.ini
@@ -33,12 +33,12 @@ Roll_point2=@Variant(\0\0\0\x1a@R\xc0\0\0\0\0\0@A\x80\0\0\0\0\0)
Roll_point3=@Variant(\0\0\0\x1a@e`\0\0\0\0\0@G\0\0\0\0\0\0)
Roll_point4=@Variant(\0\0\0\x1a@e`\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)
-Yaw_point2=@Variant(\0\0\0\x1a@@@\0\0\0\0\0@:\x80\0\0\0\0\0)
+Yaw_point2="@Variant(\0\0\0\x1a@@\x80\0\0\0\0\0@;\0\0\0\0\0\0)"
Yaw_point3=@Variant(\0\0\0\x1a@L\x80\0\0\0\0\0@C\0\0\0\0\0\0)
Yaw_point4=@Variant(\0\0\0\x1a@U\0\0\0\0\0\0@I\0\0\0\0\0\0)
Pitch_point1=@Variant(\0\0\0\x1a@\x1c\0\0\0\0\0\0@ \0\0\0\0\0\0)
-Pitch_point2=@Variant(\0\0\0\x1a@C\xc0\0\0\0\0\0@>\x80\0\0\0\0\0)
-Pitch_point3=@Variant(\0\0\0\x1a@P \0\0\0\0\0@D\x80\0\0\0\0\0)
+Pitch_point2=@Variant(\0\0\0\x1a@D\0\0\0\0\0\0@?\0\0\0\0\0\0)
+Pitch_point3=@Variant(\0\0\0\x1a@P@\0\0\0\0\0@D\x80\0\0\0\0\0)
Pitch_point4=@Variant(\0\0\0\x1a@T\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@Z@\0\0\0\0\0@1\0\0\0\0\0\0)
@@ -49,9 +49,15 @@ 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)
Y_point4=@Variant(\0\0\0\x1a@P@\0\0\0\0\0@I\0\0\0\0\0\0)
Z_point1=@Variant(\0\0\0\x1a\0\0\0\0\0\0\0\0@&\0\0\0\0\0\0)
-Z_point2=@Variant(\0\0\0\x1a@1\0\0\0\0\0\0@H@\0\0\0\0\0)
+Z_point2=@Variant(\0\0\0\x1a@1\0\0\0\0\0\0@H\x80\0\0\0\0\0)
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)
+fixup_mx=0
+fixup_my=0
+fixup_mz=0
+fixup_x=0
+fixup_y=0
+fixup_z=0
[KB_Shortcuts]
Keycode_Center=199
@@ -78,10 +84,64 @@ Keycode_GameZero=0
Shift_GameZero=false
Ctrl_GameZero=false
Alt_GameZero=false
-Enable_ReverseAxis=true
+Enable_ReverseAxis=false
RA_Yaw=40
RA_ZPos=0
RA_ToZPos=100
[TrackerSource]
-Selection=0
+Selection=2
+
+[Curves-Yaw]
+point-count=1
+point-0-x=44.7297297297297
+point-0-y=134.357142857143
+
+[Curves-PitchUp]
+point-count=1
+point-0-x=45.2702702702703
+point-0-y=169.714285714286
+point-1-x=22.1621621621622
+point-1-y=164.571428571429
+point-2-x=32.027027027027
+point-2-y=118.285714285714
+point-3-x=37.8378378378378
+point-3-y=150.428571428571
+
+[Curves-PitchDown]
+point-count=1
+point-0-x=47.2972972972973
+point-0-y=169.714285714286
+point-1-x=24.4594594594595
+point-1-y=70.7142857142857
+point-2-x=25.1351351351351
+point-2-y=137.571428571429
+
+[Curves-Roll]
+point-count=1
+point-0-x=37.7027027027027
+point-0-y=135
+
+[Curves-X]
+point-count=1
+point-0-x=37.4324324324324
+point-0-y=83.5714285714286
+
+[Curves-Y]
+point-count=1
+point-0-x=34.1891891891892
+point-0-y=82.9285714285714
+
+[Curves-Z]
+point-count=1
+point-0-x=34.3243243243243
+point-0-y=75.2142857142857
+
+[FTIR]
+useTIRViews=false
+useDummyExe=true
+
+[FaceDetectTracker]
+RedetectMs=500
+CameraId=0
+VideoWidget=1
diff --git a/bin/Settings/FreeFalcon.ini b/bin/Settings/FreeFalcon.ini
index 5b486b11..928a74ce 100644
--- a/bin/Settings/FreeFalcon.ini
+++ b/bin/Settings/FreeFalcon.ini
@@ -79,3 +79,7 @@ Enable_ReverseAxis=false
RA_Yaw=40
RA_ZPos=-20
RA_ToZPos=50
+
+[FTIR]
+useTIRViews=true
+useDummyExe=true
diff --git a/bin/qbezierconfigurator.h b/bin/qbezierconfigurator.h
deleted file mode 100644
index 81ce013a..00000000
--- a/bin/qbezierconfigurator.h
+++ /dev/null
@@ -1,130 +0,0 @@
-#ifndef QBEZIERCONFIGURATOR_H
-#define QBEZIERCONFIGURATOR_H
-
-#include <QtGui>
-#include <QtDesigner/QDesignerExportWidget>
-#include <QPointF>
-
-class QDESIGNER_WIDGET_EXPORT QBezierConfigurator : public QWidget
-{
- Q_OBJECT
- Q_PROPERTY(int maxInputEGU READ maxInputEGU WRITE setmaxInputEGU);
- Q_PROPERTY(int maxOutputEGU READ maxOutputEGU WRITE setmaxOutputEGU);
- Q_PROPERTY(int pixPerEGU READ pixPerEGU WRITE setpixPerEGU);
-
- Q_PROPERTY(QColor colorBezier READ colorBezier WRITE setColorBezier);
- Q_PROPERTY(QColor colorBackground READ colorBackground WRITE setColorBackground);
- Q_PROPERTY(QString stringInputEGU READ stringInputEGU WRITE setInputEGU);
- Q_PROPERTY(QString stringOutputEGU READ stringOutputEGU WRITE setOutputEGU);
- Q_PROPERTY(QString stringCaption READ stringCaption WRITE setCaption);
-
- // Return the current value to Designer
- int maxInputEGU() const
- {
- return MaxInput;
- }
- int maxOutputEGU() const
- {
- return MaxOutput;
- }
- int pixPerEGU() const
- {
- return pPerEGU;
- }
-
- // Return the current color to Designer
- QColor colorBezier() const
- {
- return colBezier;
- }
- // Return the current color to Designer
- QColor colorBackground() const
- {
- return colBackground;
- }
- // Return the current string to Designer
- QString stringInputEGU() const
- {
- return strInputEGU;
- }
- // Return the current string to Designer
- QString stringOutputEGU() const
- {
- return strOutputEGU;
- }
- // Return the current string to Designer
- QString stringCaption() const
- {
- return strCaption;
- }
-
-public:
- QBezierConfigurator(QWidget *parent = 0);
- ~QBezierConfigurator();
-
-signals:
- void valueNeutralZoneChanged(int);
- void BezierCurveChanged(bool);
-
-public slots:
- void setmaxInputEGU(int);
- void setmaxOutputEGU(int);
- void setpixPerEGU(int);
-
- QPointF getPointOne();
- QPointF getPointTwo();
- QPointF getPointThree();
- QPointF getPointFour();
-
- void setPointOne(QPointF);
- void setPointTwo(QPointF);
- void setPointThree(QPointF);
- void setPointFour(QPointF);
-
- void setNeutralZone(int zone);
-
- void setColorBezier(QColor);
- void setColorBackground(QColor);
- void setInputEGU(QString);
- void setOutputEGU(QString);
- void setCaption(QString);
-
-protected slots:
- void paintEvent(QPaintEvent *e);
- void mousePressEvent(QMouseEvent *e);
- void mouseMoveEvent(QMouseEvent *e);
- void mouseReleaseEvent(QMouseEvent *e);
-
-protected:
- void drawBackground(QPainter *painter, const QRectF &rect);
- void drawPoint(QPainter *painter, const QPointF &pt);
- void drawLine(QPainter *painter, const QPointF &start, const QPointF &end, QPen pen);
- bool markContains(const QPointF &pt, const QPointF &coord) const;
- bool withinRange( const QPointF &coord ) const;
-
-protected:
- virtual void resizeEvent(QResizeEvent *);
-
-private:
- QRectF range; // The actual rectangle for the Bezier-curve
- QPointF one, two, three, four; // The four points, that define the curve
- QPointF normalizePoint (QPointF point) const; // Convert the graphical Point to a real-life Point
- QPointF graphicalizePoint (QPointF point) const; // Convert the Point to a graphical Point
-
- QPointF mouseStart;
- QPointF *moving;
- int movingPoint;
-
- int MaxInput; // Maximum input limit
- int MaxOutput; // Maximum output limit
- int pPerEGU; // Number of pixels, per EGU
-
- QColor colBezier; // Color of Bezier curve
- QColor colBackground; // Color of widget background
- QString strInputEGU; // Engineering Units input (vertical axis)
- QString strOutputEGU; // Engineering Units output (horizontal axis)
- QString strCaption; // Caption of the graph
-
-};
-
-#endif // QBEZIERCONFIGURATOR_H
diff --git a/bin/qfunctionconfigurator.h b/bin/qfunctionconfigurator.h
new file mode 100644
index 00000000..c2a2f25b
--- /dev/null
+++ b/bin/qfunctionconfigurator.h
@@ -0,0 +1,177 @@
+/********************************************************************************
+* FaceTrackNoIR This program is a private project of some enthusiastic *
+* gamers from Holland, who don't like to pay much for *
+* head-tracking. *
+* *
+* Copyright (C) 2012 Wim Vriend (Developing) *
+* Ron Hendriks (Researching and Testing) *
+* *
+* Homepage http://facetracknoir.sourceforge.net/home/default.htm *
+* *
+* This program is free software; you can redistribute it and/or modify it *
+* under the terms of the GNU General Public License as published by the *
+* Free Software Foundation; either version 3 of the License, or (at your *
+* option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, but *
+* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
+* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for *
+* more details. *
+* *
+* You should have received a copy of the GNU General Public License along *
+* with this program; if not, see <http://www.gnu.org/licenses/>. *
+* *
+* The FunctionConfigurator was made by Stanislaw Halik, and adapted to *
+* FaceTrackNoIR. *
+* *
+* All credits for this nice piece of code should go to Stanislaw. *
+* *
+* Copyright (c) 2011-2012, Stanislaw Halik <sthalik@misaki.pl> *
+* Permission to use, copy, modify, and/or distribute this *
+* software for any purpose with or without fee is hereby granted, *
+* provided that the above copyright notice and this permission *
+* notice appear in all copies. *
+********************************************************************************/
+#ifndef QFUNCTIONCONFIGURATOR_H
+#define QFUNCTIONCONFIGURATOR_H
+
+#include <QtGui>
+#include <QtDesigner/QDesignerExportWidget>
+#include <QPointF>
+#include "FunctionConfig.h"
+
+//
+// The FunctionConfigurator Widget is used to display and configure a function (curve).
+// The Function is used by FaceTrackNoIR to 'translate' the actual head-pose to the virtual headpose. Every axis is configured by a separate Function.
+//
+// The Function is coded in a separate Class and can exists, without the Widget. When the widget is displayed (therefore 'created'), the Function can be attached to the
+// Widget and the Widget used to change the Function.
+//
+class QDESIGNER_WIDGET_EXPORT QFunctionConfigurator : public QWidget
+{
+ Q_OBJECT
+ Q_PROPERTY(int maxInputEGU READ maxInputEGU WRITE setmaxInputEGU);
+ Q_PROPERTY(int maxOutputEGU READ maxOutputEGU WRITE setmaxOutputEGU);
+ Q_PROPERTY(int pixPerEGU_Input READ pixPerEGU_Input WRITE setpixPerEGU_Input);
+
+ Q_PROPERTY(QColor colorBezier READ colorBezier WRITE setColorBezier);
+ Q_PROPERTY(QColor colorBackground READ colorBackground WRITE setColorBackground);
+ Q_PROPERTY(QString stringInputEGU READ stringInputEGU WRITE setInputEGU);
+ Q_PROPERTY(QString stringOutputEGU READ stringOutputEGU WRITE setOutputEGU);
+ Q_PROPERTY(QString stringCaption READ stringCaption WRITE setCaption);
+
+ // Return the current value to Designer
+ int maxInputEGU() const
+ {
+ return MaxInput;
+ }
+ int maxOutputEGU() const
+ {
+ return MaxOutput;
+ }
+ int pixPerEGU_Input() const
+ {
+ return pPerEGU_Input;
+ }
+ int pixPerEGU_Output() const
+ {
+ return pPerEGU_Output;
+ }
+
+ // Return the current color to Designer
+ QColor colorBezier() const
+ {
+ return colBezier;
+ }
+ // Return the current color to Designer
+ QColor colorBackground() const
+ {
+ return colBackground;
+ }
+ // Return the current string to Designer
+ QString stringInputEGU() const
+ {
+ return strInputEGU;
+ }
+ // Return the current string to Designer
+ QString stringOutputEGU() const
+ {
+ return strOutputEGU;
+ }
+ // Return the current string to Designer
+ QString stringCaption() const
+ {
+ return strCaption;
+ }
+
+public:
+ QFunctionConfigurator(QWidget *parent = 0);
+ ~QFunctionConfigurator();
+ FunctionConfig* config();
+
+ void setConfig(FunctionConfig* config); // Connect the FunctionConfig to the Widget.
+ void loadSettings(QSettings& settings); // Load the FunctionConfig (points) from the INI-file
+ void saveSettings(QSettings& settings); // Save the FunctionConfig (points) to the INI-file
+
+signals:
+ void CurveChanged(bool);
+
+public slots:
+ void setmaxInputEGU(int);
+ void setmaxOutputEGU(int);
+ void setpixPerEGU_Input(int);
+ void setpixPerEGU_Output(int);
+
+ void setColorBezier(QColor);
+ void setColorBackground(QColor);
+ void setInputEGU(QString);
+ void setOutputEGU(QString);
+ void setCaption(QString);
+
+protected slots:
+ void paintEvent(QPaintEvent *e);
+ void mousePressEvent(QMouseEvent *e);
+ void mouseMoveEvent(QMouseEvent *e);
+ void mouseReleaseEvent(QMouseEvent *e);
+
+protected:
+ void drawBackground(QPainter *painter, const QRectF &rect);
+ void drawPoint(QPainter *painter, const QPointF &pt, QColor colBG );
+ void drawLine(QPainter *painter, const QPointF &start, const QPointF &end, QPen pen);
+ bool markContains(const QPointF &pt, const QPointF &coord) const;
+ bool withinRange( const QPointF &coord ) const;
+
+protected:
+ virtual void resizeEvent(QResizeEvent *);
+
+private:
+ QRectF range; // The actual rectangle for the Bezier-curve
+ QPointF lastPoint; // The right-most point of the Function
+ QPointF normalizePoint (QPointF point) const; // Convert the graphical Point to a real-life Point
+ QPointF graphicalizePoint (QPointF point) const; // Convert the Point to a graphical Point
+
+ QPointF *moving;
+ int movingPoint;
+
+ int MaxInput; // Maximum input limit
+ int MaxOutput; // Maximum output limit
+ int pPerEGU_Input; // Number of pixels, per EGU of Input
+ int pPerEGU_Output; // Number of pixels, per EGU of Output
+
+ QColor colBezier; // Color of Bezier curve
+ QColor colBackground; // Color of widget background
+ QString strInputEGU; // Engineering Units input (vertical axis)
+ QString strOutputEGU; // Engineering Units output (horizontal axis)
+ QString strCaption; // Caption of the graph
+
+ //
+ // Properties of the CurveConfigurator Widget
+ //
+ QString _title; // Title do display in Widget and to load Settings
+ FunctionConfig* _config;
+ QList<QPointF> _points; // Function-points
+ QList<QPointF> _draw_points; // Curve-points needed for drawing
+ HANDLE _mutex;
+};
+
+#endif // QFUNCTIONCONFIGURATOR_H
diff --git a/bin/zlib1.dll b/bin/zlib1.dll
index 81704ab9..4eb8adb9 100644
--- a/bin/zlib1.dll
+++ b/bin/zlib1.dll
Binary files differ