summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_tracker_sm/ftnoir_tracker_faceapi.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-04-13 05:45:07 +0200
committerStanislaw Halik <sthalik@misaki.pl>2013-04-13 05:45:07 +0200
commit351e844f6a3c5484acfcf4fb0154bcab6f1780a0 (patch)
treee2b1fcb041ae3b763120e3ffb134d529006b0cb2 /ftnoir_tracker_sm/ftnoir_tracker_faceapi.cpp
parent29cf8b9ddf89a42d72ca1c0fbdc9fa93f0c5d189 (diff)
Don't use axes as class/struct members. Use an array instead, and iterate over them where applicable.
Diffstat (limited to 'ftnoir_tracker_sm/ftnoir_tracker_faceapi.cpp')
-rw-r--r--ftnoir_tracker_sm/ftnoir_tracker_faceapi.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/ftnoir_tracker_sm/ftnoir_tracker_faceapi.cpp b/ftnoir_tracker_sm/ftnoir_tracker_faceapi.cpp
index 09d7432b..81be669a 100644
--- a/ftnoir_tracker_sm/ftnoir_tracker_faceapi.cpp
+++ b/ftnoir_tracker_sm/ftnoir_tracker_faceapi.cpp
@@ -92,7 +92,7 @@ void FTNoIR_Tracker::WaitForExit()
}
}
-bool FTNoIR_Tracker::GiveHeadPoseData(THeadPoseData *data)
+bool FTNoIR_Tracker::GiveHeadPoseData(double *data)
{
//
// Check if the pointer is OK and wait for the Mutex.
@@ -103,22 +103,22 @@ bool FTNoIR_Tracker::GiveHeadPoseData(THeadPoseData *data)
// Copy the measurements to FaceTrackNoIR.
//
if (bEnableX) {
- data->x = pMemData->data.new_pose.head_pos.x * 100.0f; // From meters to centimeters
+ data[TX] = pMemData->data.new_pose.head_pos.x * 100.0f; // From meters to centimeters
}
if (bEnableY) {
- data->y = pMemData->data.new_pose.head_pos.y * 100.0f;
+ data[TY] = pMemData->data.new_pose.head_pos.y * 100.0f;
}
if (bEnableZ) {
- data->z = pMemData->data.new_pose.head_pos.z * 100.0f;
+ data[TZ] = pMemData->data.new_pose.head_pos.z * 100.0f;
}
if (bEnableYaw) {
- data->yaw = pMemData->data.new_pose.head_rot.y_rads * 57.295781f; // From rads to degrees
+ data[RX] = pMemData->data.new_pose.head_rot.y_rads * 57.295781f; // From rads to degrees
}
if (bEnablePitch) {
- data->pitch = pMemData->data.new_pose.head_rot.x_rads * 57.295781f;
+ data[RY] = pMemData->data.new_pose.head_rot.x_rads * 57.295781f;
}
if (bEnableRoll) {
- data->roll = pMemData->data.new_pose.head_rot.z_rads * 57.295781f;
+ data[RZ] = pMemData->data.new_pose.head_rot.z_rads * 57.295781f;
}
//