diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2013-04-13 05:45:07 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2013-04-13 05:45:07 +0200 |
commit | 351e844f6a3c5484acfcf4fb0154bcab6f1780a0 (patch) | |
tree | e2b1fcb041ae3b763120e3ffb134d529006b0cb2 /ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc.cpp | |
parent | 29cf8b9ddf89a42d72ca1c0fbdc9fa93f0c5d189 (diff) |
Don't use axes as class/struct members. Use an array instead, and iterate over them where applicable.
Diffstat (limited to 'ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc.cpp')
-rw-r--r-- | ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc.cpp b/ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc.cpp index c750ae26..0c25e77e 100644 --- a/ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc.cpp +++ b/ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc.cpp @@ -104,7 +104,7 @@ void FTNoIR_Protocol::loadSettings() { //
// Update Headpose in Game.
//
-void FTNoIR_Protocol::sendHeadposeToGame( THeadPoseData *headpose, THeadPoseData *rawheadpose ) {
+void FTNoIR_Protocol::sendHeadposeToGame(double *headpose, double *rawheadpose ) {
DWORD result;
TFSState pitch;
TFSState yaw;
@@ -121,13 +121,13 @@ float virtRotZ; // qDebug() << "FSUIPCServer::run() says: started!";
- virtRotX = -1.0f * headpose->pitch; // degrees
- virtRotY = headpose->yaw;
- virtRotZ = headpose->roll;
+ virtRotX = -headpose[RY]; // degrees
+ virtRotY = headpose[RX];
+ virtRotZ = headpose[RZ];
virtPosX = 0.0f; // cm, X and Y are not working for FS2002/2004!
virtPosY = 0.0f;
- virtPosZ = -1.0f * headpose->z;
+ virtPosZ = headpose[TZ];
//
// Init. the FSUIPC offsets (derived from Free-track...)
|