From 445ebbfa3edc12bd79469a61c25257fe853c3768 Mon Sep 17 00:00:00 2001 From: Wim Vriend Date: Sat, 22 Jan 2011 15:21:34 +0000 Subject: Work on DLL-FTNoir-Tracker. git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@41 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb --- FTNoIR_Tracker_UDP/ftnoir_tracker_base.h | 48 ++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 FTNoIR_Tracker_UDP/ftnoir_tracker_base.h (limited to 'FTNoIR_Tracker_UDP/ftnoir_tracker_base.h') diff --git a/FTNoIR_Tracker_UDP/ftnoir_tracker_base.h b/FTNoIR_Tracker_UDP/ftnoir_tracker_base.h new file mode 100644 index 00000000..60c26ee1 --- /dev/null +++ b/FTNoIR_Tracker_UDP/ftnoir_tracker_base.h @@ -0,0 +1,48 @@ +#ifndef FTNOIR_TRACKER_BASE_H +#define FTNOIR_TRACKER_BASE_H + +#include "ftnoir_tracker_base_global.h" + +// +// x,y,z position in centimetres, yaw, pitch and roll in degrees... +// +#pragma pack(push, 2) +struct THeadPoseData { + double x, y, z, yaw, pitch, roll; +}; +#pragma pack(pop) + +// COM-Like abstract interface. +// This interface doesn't require __declspec(dllexport/dllimport) specifier. +// Method calls are dispatched via virtual table. +// Any C++ compiler can use it. +// Instances are obtained via factory function. +struct ITracker +{ + virtual int Foo(int n) = 0; + virtual void Release() = 0; + virtual void Initialize() = 0; + virtual void StartTracker() = 0; + virtual void GiveHeadPoseData(THeadPoseData *data) = 0; +}; + +// Handle type. In C++ language the iterface type is used. +typedef ITracker* TRACKERHANDLE; + +//////////////////////////////////////////////////////////////////////////////// +// +#ifdef __cplusplus +# define EXTERN_C extern "C" +#else +# define EXTERN_C +#endif // __cplusplus + +// Factory function that creates instances of the Xyz object. +EXTERN_C +FTNOIR_TRACKER_BASE_EXPORT +TRACKERHANDLE +__stdcall +GetTracker( + void); + +#endif // FTNOIR_TRACKER_BASE_H -- cgit v1.2.3