diff options
author | Donovan Baarda <abo@minkirri.apana.org.au> | 2014-06-12 14:53:43 +1000 |
---|---|---|
committer | Donovan Baarda <abo@minkirri.apana.org.au> | 2014-06-12 14:53:43 +1000 |
commit | 0669a40347ffa233bc6042b0f65d244509a61394 (patch) | |
tree | 36a4577bdaa1ed28ca1ad222a54777012dd2dda8 /opentrack-api/opentrack.h | |
parent | 72540e0a96a3120a5d02271e714aba29e136ab78 (diff) | |
parent | 7454496476ba17ea622781d280606161581c9544 (diff) |
Merge branch 'master' of https://github.com/opentrack/opentrack into dev/ewma2
Resolved conflicts manually in files:
ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp
ftnoir_filter_ewma2/ftnoir_filter_ewma2.h
Diffstat (limited to 'opentrack-api/opentrack.h')
-rw-r--r-- | opentrack-api/opentrack.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/opentrack-api/opentrack.h b/opentrack-api/opentrack.h new file mode 100644 index 00000000..88ba6cf0 --- /dev/null +++ b/opentrack-api/opentrack.h @@ -0,0 +1,58 @@ +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif +#ifndef IN_OPENTRACK +/* opaque pointers, forward definitions */ +struct opentrack_opaque_ctx; +typedef struct opentrack_opaque_ctx* opentrack; +struct opentrack_opaque_tracker; +typedef struct opentrack_opaque_tracker* opentrack_tracker; +#endif + +#ifdef IN_OPENTRACK +# ifdef _WIN32 +# define OPENTRACK_EXPORT __declspec(dllexport) +# else +# define OPENTRACK_EXPORT +# endif +#else +# ifdef _WIN32 +# define OPENTRACK_EXPORT __declspec(dllimport) +# else +# define OPENTRACK_EXPORT +# endif +#endif + +/* for `opentrack_tracker_tick', individual headpose elts */ +#ifndef IN_OPENTRACK +enum opentrack_dof { + TX = 0, + TY, + TZ, + Yaw, + Pitch, + Roll, + DOF_count +}; +#endif + +OPENTRACK_EXPORT opentrack opentrack_make_ctx(int argc, char** argv, void* window_parent); +OPENTRACK_EXPORT void opentrack_finalize_ctx(opentrack self); + +/* no need to free the return value; invalid to modify it */ +OPENTRACK_EXPORT const char** opentrack_enum_trackers(opentrack self); + +/* + * don't `opentrack_tracker_tick an unstarted tracker, it's invalid to do so + * it's also invalid to start a finalized tracker + */ +OPENTRACK_EXPORT opentrack_tracker opentrack_make_tracker(opentrack ctx, const char* name); +OPENTRACK_EXPORT void opentrack_tracker_start(opentrack self, opentrack_tracker tracker); +OPENTRACK_EXPORT void opentrack_tracker_tick(opentrack_tracker tracker, double* headpose); +OPENTRACK_EXPORT void opentrack_finalize_tracker(opentrack_tracker tracker); +#ifdef __cplusplus +} +#endif + |