summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_tracker_ht
diff options
context:
space:
mode:
Diffstat (limited to 'ftnoir_tracker_ht')
-rw-r--r--ftnoir_tracker_ht/ftnoir_tracker_ht.cpp26
-rw-r--r--ftnoir_tracker_ht/ftnoir_tracker_ht.h2
2 files changed, 14 insertions, 14 deletions
diff --git a/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp b/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp
index d37ab9b2..224fff4a 100644
--- a/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp
+++ b/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp
@@ -218,7 +218,7 @@ void Tracker::paint_widget() {
}
}
-bool Tracker::GiveHeadPoseData(THeadPoseData* data)
+bool Tracker::GiveHeadPoseData(double *data)
{
bool ret = false;
@@ -233,25 +233,25 @@ bool Tracker::GiveHeadPoseData(THeadPoseData* data)
}
if (shm->result.filled) {
if (enableRX)
- data->yaw = shm->result.rotx;
+ data[RX] = shm->result.rotx;
if (enableRY) {
- data->pitch = shm->result.roty;
- double sign = data->pitch >= 0 ? 1 : -1;
- if (fabs(fabs(data->pitch) - 180) < fabs(data->pitch))
- data->pitch = fabs(fabs(data->pitch) - 180) * sign;
+ data[RY] = shm->result.roty;
+ double sign = data[RY] >= 0 ? 1 : -1;
+ if (fabs(fabs(data[RY]) - 180) < fabs(data[RY]))
+ data[RY] = fabs(fabs(data[RY]) - 180) * sign;
}
if (enableRZ) {
- data->roll = shm->result.rotz;
- double sign = data->roll >= 0 ? 1 : -1;
- if (fabs(fabs(data->roll) - 180) < fabs(data->roll))
- data->roll = fabs(fabs(data->roll) - 180) * sign;
+ data[RZ] = shm->result.rotz;
+ double sign = data[RZ] >= 0 ? 1 : -1;
+ if (fabs(fabs(data[RZ]) - 180) < fabs(data[RZ]))
+ data[RZ] = fabs(fabs(data[RZ]) - 180) * sign;
}
if (enableTX)
- data->x = shm->result.tx;
+ data[TX] = shm->result.tx;
if (enableTY)
- data->y = shm->result.ty;
+ data[TY] = shm->result.ty;
if (enableTZ)
- data->z = shm->result.tz;
+ data[TZ] = shm->result.tz;
ret = true;
}
lck_shm.unlock();
diff --git a/ftnoir_tracker_ht/ftnoir_tracker_ht.h b/ftnoir_tracker_ht/ftnoir_tracker_ht.h
index 5a17e4af..a08f2437 100644
--- a/ftnoir_tracker_ht/ftnoir_tracker_ht.h
+++ b/ftnoir_tracker_ht/ftnoir_tracker_ht.h
@@ -24,7 +24,7 @@ public:
Tracker();
~Tracker();
void StartTracker(QFrame* frame);
- bool GiveHeadPoseData(THeadPoseData *data);
+ bool GiveHeadPoseData(double *data);
bool enableTX, enableTY, enableTZ, enableRX, enableRY, enableRZ;
ht_shm_t* shm;
bool NeedsTimeToFinish() {