From 0948938ea70784b7b0607a709a199d1acefda949 Mon Sep 17 00:00:00 2001 From: Patrick Ruoff Date: Tue, 25 Sep 2012 17:02:38 +0000 Subject: Changed centering algorithm to use proper matrix algebra. Cleaned up T6DOF structure. Updated vc_9 project files. git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@169 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb --- FTNoIR_Tracker_Base/ftnoir_tracker_types.h | 53 +++++------------------------- 1 file changed, 9 insertions(+), 44 deletions(-) (limited to 'FTNoIR_Tracker_Base') diff --git a/FTNoIR_Tracker_Base/ftnoir_tracker_types.h b/FTNoIR_Tracker_Base/ftnoir_tracker_types.h index 93007b54..ace7a6e3 100644 --- a/FTNoIR_Tracker_Base/ftnoir_tracker_types.h +++ b/FTNoIR_Tracker_Base/ftnoir_tracker_types.h @@ -24,6 +24,7 @@ *********************************************************************************/ /* Modifications (last one on top): + 20120924 - C14: Moved T6DOF to separate file (not pulic interface) 20110415 - WVR: Added overloaded operator - and -= */ #ifndef FTNOIR_TRACKER_TYPES_H @@ -34,53 +35,17 @@ // #pragma pack(push, 2) struct THeadPoseData { - double x, y, z, yaw, pitch, roll; - long frame_number; -}; -#pragma pack(pop) -// -// Structure to hold all 6 DOF's -// -class T6DOF { -public: - T6DOF( double x, double y, double z, - double yaw, double pitch, double roll ) { - position.x = x; - position.y = y; - position.z = z; - position.yaw = yaw; - position.pitch = pitch; - position.roll = roll; - } + THeadPoseData() + : x(0.0), y(0.0), z(0.0), yaw(0.0), pitch(0.0), roll(0.0), frame_number(0) {} - void initHeadPoseData(){ - position.x = 0.0f; - position.y = 0.0f; - position.z = 0.0f; - position.yaw = 0.0f; - position.pitch = 0.0f; - position.roll = 0.0f; - position.frame_number = 0; - } - T6DOF operator-( T6DOF &other ) { - return T6DOF(position.x - other.position.x, position.y - other.position.y, position.z - other.position.z, - position.yaw - other.position.yaw, position.pitch - other.position.pitch, position.roll - other.position.roll); - } - T6DOF operator-=( T6DOF &other ) { - return T6DOF(position.x - other.position.x, position.y - other.position.y, position.z - other.position.z, - position.yaw - other.position.yaw, position.pitch - other.position.pitch, position.roll - other.position.roll); - } - T6DOF operator+( T6DOF &other ) { - return T6DOF(position.x + other.position.x, position.y + other.position.y, position.z + other.position.z, - position.yaw + other.position.yaw, position.pitch + other.position.pitch, position.roll + other.position.roll); - } - T6DOF operator+=( T6DOF &other ) { - return T6DOF(position.x + other.position.x, position.y + other.position.y, position.z + other.position.z, - position.yaw + other.position.yaw, position.pitch + other.position.pitch, position.roll + other.position.roll); - } + 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) {} - THeadPoseData position; + double x, y, z, yaw, pitch, roll; + long frame_number; }; +#pragma pack(pop) #endif // FTNOIR_TRACKER_TYPES_H -- cgit v1.2.3