summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_tracker_sm
diff options
context:
space:
mode:
Diffstat (limited to 'ftnoir_tracker_sm')
-rw-r--r--ftnoir_tracker_sm/ftnoir_tracker_faceapi.cpp14
-rw-r--r--ftnoir_tracker_sm/ftnoir_tracker_sm.h2
2 files changed, 8 insertions, 8 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;
}
//
diff --git a/ftnoir_tracker_sm/ftnoir_tracker_sm.h b/ftnoir_tracker_sm/ftnoir_tracker_sm.h
index ae79436d..665507e6 100644
--- a/ftnoir_tracker_sm/ftnoir_tracker_sm.h
+++ b/ftnoir_tracker_sm/ftnoir_tracker_sm.h
@@ -45,7 +45,7 @@ public:
void StartTracker( QFrame* parent_window );
void StopTracker( bool exit );
- bool GiveHeadPoseData(THeadPoseData *data); // Returns true if confidence is good
+ bool GiveHeadPoseData(double *data); // Returns true if confidence is good
void WaitForExit();
void loadSettings();