summaryrefslogtreecommitdiffhomepage
path: root/FTNoIR_Tracker_Base
diff options
context:
space:
mode:
authorPatrick Ruoff <c14-radioactive@19e81ba0-9b1a-49c3-bd6c-561e1906d5fb>2012-09-25 17:02:38 +0000
committerPatrick Ruoff <c14-radioactive@19e81ba0-9b1a-49c3-bd6c-561e1906d5fb>2012-09-25 17:02:38 +0000
commit0948938ea70784b7b0607a709a199d1acefda949 (patch)
treee869eb21d046e1a4f33199471eeb42751d938abf /FTNoIR_Tracker_Base
parent72d392a3741a854847351d44fa551751ffd9480f (diff)
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
Diffstat (limited to 'FTNoIR_Tracker_Base')
-rw-r--r--FTNoIR_Tracker_Base/ftnoir_tracker_types.h53
1 files changed, 9 insertions, 44 deletions
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