From 351e844f6a3c5484acfcf4fb0154bcab6f1780a0 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 13 Apr 2013 05:45:07 +0200 Subject: Don't use axes as class/struct members. Use an array instead, and iterate over them where applicable. --- ftnoir_tracker_base/ftnoir_tracker_base.h | 2 +- ftnoir_tracker_base/ftnoir_tracker_types.h | 18 ++---------------- 2 files changed, 3 insertions(+), 17 deletions(-) (limited to 'ftnoir_tracker_base') diff --git a/ftnoir_tracker_base/ftnoir_tracker_base.h b/ftnoir_tracker_base/ftnoir_tracker_base.h index 416d3944..b72be93e 100644 --- a/ftnoir_tracker_base/ftnoir_tracker_base.h +++ b/ftnoir_tracker_base/ftnoir_tracker_base.h @@ -56,7 +56,7 @@ struct ITracker { virtual ~ITracker() {} virtual void StartTracker( QFrame* frame ) = 0; - virtual bool GiveHeadPoseData(THeadPoseData *data) = 0; + virtual bool GiveHeadPoseData(double *data) = 0; virtual void WaitForExit() = 0; }; diff --git a/ftnoir_tracker_base/ftnoir_tracker_types.h b/ftnoir_tracker_base/ftnoir_tracker_types.h index ee443b95..d2981701 100644 --- a/ftnoir_tracker_base/ftnoir_tracker_types.h +++ b/ftnoir_tracker_base/ftnoir_tracker_types.h @@ -30,22 +30,8 @@ #ifndef FTNOIR_TRACKER_TYPES_H #define FTNOIR_TRACKER_TYPES_H -// -// x,y,z position in centimetres, yaw, pitch and roll in degrees... -// -#pragma pack(push, 2) -struct THeadPoseData { - - THeadPoseData() - : x(0.0), y(0.0), z(0.0), yaw(0.0), pitch(0.0), roll(0.0), frame_number(0) {} - - THeadPoseData(double x, double y, double z, - double yaw, double pitch, double roll ) - : x(x), y(y), z(z), yaw(yaw), pitch(pitch), roll(roll), frame_number(0) {} - - double x, y, z, yaw, pitch, roll; - unsigned char frame_number; +enum Axis { + TX = 0, TY, TZ, RX, RY, RZ }; -#pragma pack(pop) #endif // FTNOIR_TRACKER_TYPES_H -- cgit v1.2.3