summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2014-09-22 09:39:40 +0200
committerStanislaw Halik <sthalik@misaki.pl>2014-09-22 09:39:40 +0200
commit1c07a40d12aee0dc1a0167fbfcfe62a2d7142d79 (patch)
tree0e9f48b4f6a42f8d711011cabdf89e06b90c1b39
parent35d3f9b53f9ee409ef39621e5579699ebf2f645a (diff)
core: plugin-api.hpp now exclusively provides interface
-rw-r--r--facetracknoir/facetracknoir.h4
-rw-r--r--facetracknoir/main-settings.hpp1
-rw-r--r--facetracknoir/plugin-api.hpp87
-rw-r--r--facetracknoir/plugin-support.h21
-rw-r--r--facetracknoir/tracker.h1
-rw-r--r--facetracknoir/tracker_types.cpp1
-rw-r--r--facetracknoir/tracker_types.h7
-rw-r--r--ftnoir_filter_base/ftnoir_filter_base.h19
-rw-r--r--ftnoir_filter_base/ftnoir_filter_base_global.h4
-rw-r--r--ftnoir_posewidget/glwidget.h10
-rw-r--r--ftnoir_protocol_base/ftnoir_protocol_base.h20
-rw-r--r--ftnoir_protocol_base/ftnoir_protocol_base_global.h4
-rw-r--r--ftnoir_tracker_base/ftnoir_tracker_base.h21
-rw-r--r--ftnoir_tracker_base/ftnoir_tracker_base_global.h18
-rw-r--r--ftnoir_tracker_base/ftnoir_tracker_types.h4
-rw-r--r--qfunctionconfigurator/functionconfig.h4
-rw-r--r--qfunctionconfigurator/qfunctionconfigurator.h4
17 files changed, 98 insertions, 132 deletions
diff --git a/facetracknoir/facetracknoir.h b/facetracknoir/facetracknoir.h
index 50f68825..bdec333f 100644
--- a/facetracknoir/facetracknoir.h
+++ b/facetracknoir/facetracknoir.h
@@ -52,10 +52,6 @@ using namespace options;
#include "tracker.h"
#include "facetracknoir/shortcuts.h"
-#include "ftnoir_protocol_base/ftnoir_protocol_base.h"
-#include "ftnoir_tracker_base/ftnoir_tracker_base.h"
-#include "ftnoir_filter_base/ftnoir_filter_base.h"
-
class Tracker; // pre-define class to avoid circular includes
class FaceTrackNoIR;
diff --git a/facetracknoir/main-settings.hpp b/facetracknoir/main-settings.hpp
index b45c5d9c..0a1fb968 100644
--- a/facetracknoir/main-settings.hpp
+++ b/facetracknoir/main-settings.hpp
@@ -2,7 +2,6 @@
#include <QString>
#include "facetracknoir/options.h"
-#include "ftnoir_tracker_base/ftnoir_tracker_types.h"
using namespace options;
struct key_opts {
diff --git a/facetracknoir/plugin-api.hpp b/facetracknoir/plugin-api.hpp
new file mode 100644
index 00000000..1610c5d8
--- /dev/null
+++ b/facetracknoir/plugin-api.hpp
@@ -0,0 +1,87 @@
+#pragma once
+
+#include <QtGlobal>
+#include <QFrame>
+
+#if defined(_WIN32)
+# define CALLING_CONVENTION __stdcall
+#else
+# define CALLING_CONVENTION
+#endif
+
+enum Axis {
+ TX = 0, TY, TZ, Yaw, Pitch, Roll
+};
+
+struct Metadata
+{
+ Metadata() {}
+ virtual ~Metadata() {}
+
+ virtual void getFullName(QString *strToBeFilled) = 0;
+ virtual void getShortName(QString *strToBeFilled) = 0;
+ virtual void getDescription(QString *strToBeFilled) = 0;
+ virtual void getIcon(QIcon *icon) = 0;
+};
+
+struct IFilter
+{
+ virtual ~IFilter() = 0;
+ virtual void FilterHeadPoseData(const double *target_camera_position, double *new_camera_position) = 0;
+ virtual void reset() = 0;
+};
+
+inline IFilter::~IFilter() {}
+
+struct IFilterDialog
+{
+ virtual ~IFilterDialog() {}
+ virtual void registerFilter(IFilter* tracker) = 0;
+ virtual void unregisterFilter() = 0;
+};
+
+struct IProtocol
+{
+ virtual ~IProtocol() = 0;
+ virtual bool checkServerInstallationOK() = 0;
+ virtual void sendHeadposeToGame( const double* headpose ) = 0;
+ virtual QString getGameName() = 0;
+};
+
+inline IProtocol::~IProtocol() {}
+
+struct IProtocolDialog
+{
+ virtual ~IProtocolDialog() {}
+ virtual void registerProtocol(IProtocol *protocol) = 0;
+ virtual void unRegisterProtocol() = 0;
+};
+
+struct ITracker
+{
+ virtual ~ITracker() = 0;
+ virtual void StartTracker( QFrame* frame ) = 0;
+ virtual void GetHeadPoseData(double *data) = 0;
+ virtual int preferredHz() { return 200; }
+};
+
+inline ITracker::~ITracker() {}
+
+struct ITrackerDialog
+{
+ virtual ~ITrackerDialog() {}
+ virtual void registerTracker(ITracker *tracker) = 0;
+ virtual void unRegisterTracker() = 0;
+};
+
+#ifndef OPENTRACK_EXPORT
+# ifdef IN_OPENTRACK
+# if !defined(_MSC_VER)
+# define OPENTRACK_EXPORT __attribute__ ((visibility ("default"))) Q_DECL_EXPORT
+# else
+# error "MSVC support removed"
+# endif
+# else
+# define OPENTRACK_EXPORT Q_DECL_IMPORT
+# endif
+#endif
diff --git a/facetracknoir/plugin-support.h b/facetracknoir/plugin-support.h
index 931f0fa1..bb7b3c02 100644
--- a/facetracknoir/plugin-support.h
+++ b/facetracknoir/plugin-support.h
@@ -1,5 +1,7 @@
#pragma once
+#include "facetracknoir/plugin-api.hpp"
+
#if defined(_WIN32)
# define CALLING_CONVENTION_SUFFIX_VOID_FUNCTION "@0"
# ifdef _MSC_VER
@@ -19,15 +21,6 @@
#include <QString>
#include <QLibrary>
#include <QFrame>
-#include "ftnoir_tracker_base/ftnoir_tracker_base.h"
-#include "ftnoir_filter_base/ftnoir_filter_base.h"
-#include "ftnoir_protocol_base/ftnoir_protocol_base.h"
-
-#if defined(_WIN32)
-# define CALLING_CONVENTION __stdcall
-#else
-# define CALLING_CONVENTION
-#endif
class IDynamicLibraryProvider;
@@ -66,16 +59,6 @@ private:
#endif
};
-struct Metadata
-{
- Metadata() {}
- virtual ~Metadata() {}
-
- virtual void getFullName(QString *strToBeFilled) = 0;
- virtual void getShortName(QString *strToBeFilled) = 0;
- virtual void getDescription(QString *strToBeFilled) = 0;
- virtual void getIcon(QIcon *icon) = 0;
-};
// merely to break a circular header dependency -sh
class IDynamicLibraryProvider {
diff --git a/facetracknoir/tracker.h b/facetracknoir/tracker.h
index d06ac9d2..54350164 100644
--- a/facetracknoir/tracker.h
+++ b/facetracknoir/tracker.h
@@ -11,7 +11,6 @@
#include <QDebug>
#include <QMutex>
#include "plugin-support.h"
-#include <ftnoir_tracker_base/ftnoir_tracker_types.h>
#include <vector>
#include <qfunctionconfigurator/functionconfig.h>
diff --git a/facetracknoir/tracker_types.cpp b/facetracknoir/tracker_types.cpp
index ba3ac552..2d7ec45a 100644
--- a/facetracknoir/tracker_types.cpp
+++ b/facetracknoir/tracker_types.cpp
@@ -1,5 +1,6 @@
#include "tracker_types.h"
#include "rotation.h"
+#include "facetracknoir/plugin-api.hpp"
#define PI 3.14159265358979323846264
#define D2R PI/180.0
diff --git a/facetracknoir/tracker_types.h b/facetracknoir/tracker_types.h
index 043c0420..80b74759 100644
--- a/facetracknoir/tracker_types.h
+++ b/facetracknoir/tracker_types.h
@@ -1,7 +1,4 @@
-#ifndef __TRACKER_TYPES_H__
-#define __TRACKER_TYPES_H__
-
-#include "ftnoir_tracker_base/ftnoir_tracker_types.h"
+#pragma once
struct T6DOF {
public:
@@ -12,5 +9,3 @@ public:
T6DOF operator-(const T6DOF& A, const T6DOF& B); // get new pose with respect to reference pose B
T6DOF operator+(const T6DOF& A, const T6DOF& B); // get new pose with respect to reference pose B^-1
-
-#endif //__TRACKER_TYPES_H__
diff --git a/ftnoir_filter_base/ftnoir_filter_base.h b/ftnoir_filter_base/ftnoir_filter_base.h
deleted file mode 100644
index 366ff149..00000000
--- a/ftnoir_filter_base/ftnoir_filter_base.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#pragma once
-#include "ftnoir_filter_base_global.h"
-#include "ftnoir_tracker_base/ftnoir_tracker_base.h"
-
-struct IFilter
-{
- virtual ~IFilter() = 0;
- virtual void FilterHeadPoseData(const double *target_camera_position, double *new_camera_position) = 0;
- virtual void reset() = 0;
-};
-
-inline IFilter::~IFilter() { }
-
-struct IFilterDialog
-{
- virtual ~IFilterDialog() {}
- virtual void registerFilter(IFilter* tracker) = 0;
- virtual void unregisterFilter() = 0;
-};
diff --git a/ftnoir_filter_base/ftnoir_filter_base_global.h b/ftnoir_filter_base/ftnoir_filter_base_global.h
deleted file mode 100644
index 09172756..00000000
--- a/ftnoir_filter_base/ftnoir_filter_base_global.h
+++ /dev/null
@@ -1,4 +0,0 @@
-#pragma once
-#include "ftnoir_tracker_base/ftnoir_tracker_base.h"
-
-#define FTNOIR_FILTER_BASE_EXPORT FTNOIR_TRACKER_BASE_EXPORT
diff --git a/ftnoir_posewidget/glwidget.h b/ftnoir_posewidget/glwidget.h
index c4b2e09d..eef238ec 100644
--- a/ftnoir_posewidget/glwidget.h
+++ b/ftnoir_posewidget/glwidget.h
@@ -5,12 +5,11 @@
* copyright notice and this permission notice appear in all copies.
*/
-#ifndef GLWIDGET_H
-#define GLWIDGET_H
+#pragma once
#include <QtGui>
#include <QPixmap>
-#include "ftnoir_tracker_base/ftnoir_tracker_base.h"
+#include "facetracknoir/plugin-api.hpp"
struct Point {
Point(int x, int y) :
@@ -48,7 +47,7 @@ struct Vec2f {
}
};
-class FTNOIR_TRACKER_BASE_EXPORT GLWidget : public QWidget
+class OPENTRACK_EXPORT GLWidget : public QWidget
{
Q_OBJECT
@@ -56,7 +55,6 @@ public:
GLWidget(QWidget *parent);
~GLWidget();
void rotateBy(double xAngle, double yAngle, double zAngle);
-
protected:
void paintEvent ( QPaintEvent * event );
@@ -93,5 +91,3 @@ private:
QImage back;
QImage texture;
};
-
-#endif
diff --git a/ftnoir_protocol_base/ftnoir_protocol_base.h b/ftnoir_protocol_base/ftnoir_protocol_base.h
deleted file mode 100644
index 84f1c0e5..00000000
--- a/ftnoir_protocol_base/ftnoir_protocol_base.h
+++ /dev/null
@@ -1,20 +0,0 @@
-#pragma once
-#include "ftnoir_protocol_base_global.h"
-#include "ftnoir_tracker_base/ftnoir_tracker_types.h"
-
-struct IProtocol
-{
- virtual ~IProtocol() = 0;
- virtual bool checkServerInstallationOK() = 0;
- virtual void sendHeadposeToGame( const double* headpose ) = 0;
- virtual QString getGameName() = 0;
-};
-
-inline IProtocol::~IProtocol() { }
-
-struct IProtocolDialog
-{
- virtual ~IProtocolDialog() {}
- virtual void registerProtocol(IProtocol *protocol) = 0;
- virtual void unRegisterProtocol() = 0;
-};
diff --git a/ftnoir_protocol_base/ftnoir_protocol_base_global.h b/ftnoir_protocol_base/ftnoir_protocol_base_global.h
deleted file mode 100644
index 24f3f6c9..00000000
--- a/ftnoir_protocol_base/ftnoir_protocol_base_global.h
+++ /dev/null
@@ -1,4 +0,0 @@
-#pragma once
-#include "ftnoir_tracker_base/ftnoir_tracker_base.h"
-
-#define FTNOIR_PROTOCOL_BASE_EXPORT FTNOIR_TRACKER_BASE_EXPORT
diff --git a/ftnoir_tracker_base/ftnoir_tracker_base.h b/ftnoir_tracker_base/ftnoir_tracker_base.h
deleted file mode 100644
index 8415e38c..00000000
--- a/ftnoir_tracker_base/ftnoir_tracker_base.h
+++ /dev/null
@@ -1,21 +0,0 @@
-#pragma once
-#include "ftnoir_tracker_base_global.h"
-#include "ftnoir_tracker_types.h"
-#include <QFrame>
-
-struct ITracker
-{
- virtual ~ITracker() = 0;
- virtual void StartTracker( QFrame* frame ) = 0;
- virtual void GetHeadPoseData(double *data) = 0;
- virtual int preferredHz() { return 200; }
-};
-
-inline ITracker::~ITracker() { }
-
-struct ITrackerDialog
-{
- virtual ~ITrackerDialog() {}
- virtual void registerTracker(ITracker *tracker) = 0;
- virtual void unRegisterTracker() = 0;
-};
diff --git a/ftnoir_tracker_base/ftnoir_tracker_base_global.h b/ftnoir_tracker_base/ftnoir_tracker_base_global.h
deleted file mode 100644
index 5b53ba82..00000000
--- a/ftnoir_tracker_base/ftnoir_tracker_base_global.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef FTNOIR_TRACKER_BASE_GLOBAL_H
-#define FTNOIR_TRACKER_BASE_GLOBAL_H
-
-#include <QtGlobal>
-
-#ifndef FTNOIR_TRACKER_BASE_EXPORT
-# ifdef IN_OPENTRACK
-# if !defined(_MSC_VER)
-# define FTNOIR_TRACKER_BASE_EXPORT __attribute__ ((visibility ("default"))) Q_DECL_EXPORT
-# else
-# error "MSVC support removed"
-# endif
-# else
-# define FTNOIR_TRACKER_BASE_EXPORT Q_DECL_IMPORT
-# endif
-#endif
-
-#endif // FTNOIR_TRACKER_BASE_GLOBAL_H
diff --git a/ftnoir_tracker_base/ftnoir_tracker_types.h b/ftnoir_tracker_base/ftnoir_tracker_types.h
deleted file mode 100644
index d38baee4..00000000
--- a/ftnoir_tracker_base/ftnoir_tracker_types.h
+++ /dev/null
@@ -1,4 +0,0 @@
-#pragma once
-enum Axis {
- TX = 0, TY, TZ, Yaw, Pitch, Roll
-};
diff --git a/qfunctionconfigurator/functionconfig.h b/qfunctionconfigurator/functionconfig.h
index ee2087a0..66e7f3e8 100644
--- a/qfunctionconfigurator/functionconfig.h
+++ b/qfunctionconfigurator/functionconfig.h
@@ -13,7 +13,7 @@
#include <QString>
#include <QSettings>
#include <QMutex>
-#include "ftnoir_tracker_base/ftnoir_tracker_base.h"
+#include "facetracknoir/plugin-api.hpp"
#include <vector>
#define MEMOIZE_PRECISION 100
@@ -52,7 +52,7 @@ public:
}
};
-class FTNOIR_TRACKER_BASE_EXPORT FunctionConfig {
+class OPENTRACK_EXPORT FunctionConfig {
private:
void reload();
float getValueInternal(int x);
diff --git a/qfunctionconfigurator/qfunctionconfigurator.h b/qfunctionconfigurator/qfunctionconfigurator.h
index bb2f09ce..facc5bbe 100644
--- a/qfunctionconfigurator/qfunctionconfigurator.h
+++ b/qfunctionconfigurator/qfunctionconfigurator.h
@@ -11,9 +11,9 @@
#include <QPointF>
#include <QElapsedTimer>
#include "qfunctionconfigurator/functionconfig.h"
-#include "ftnoir_tracker_base/ftnoir_tracker_base.h"
+#include "facetracknoir/plugin-api.hpp"
-class FTNOIR_TRACKER_BASE_EXPORT QFunctionConfigurator : public QWidget
+class OPENTRACK_EXPORT QFunctionConfigurator : public QWidget
{
Q_OBJECT
Q_PROPERTY(QColor colorBezier READ colorBezier WRITE setColorBezier)