diff options
Diffstat (limited to 'facetracknoir')
-rw-r--r-- | facetracknoir/facetracknoir.h | 4 | ||||
-rw-r--r-- | facetracknoir/main-settings.hpp | 1 | ||||
-rw-r--r-- | facetracknoir/plugin-api.hpp | 87 | ||||
-rw-r--r-- | facetracknoir/plugin-support.h | 21 | ||||
-rw-r--r-- | facetracknoir/tracker.h | 1 | ||||
-rw-r--r-- | facetracknoir/tracker_types.cpp | 1 | ||||
-rw-r--r-- | facetracknoir/tracker_types.h | 7 |
7 files changed, 91 insertions, 31 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__ |