summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_protocol_sc
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_protocol_sc
parent29cf8b9ddf89a42d72ca1c0fbdc9fa93f0c5d189 (diff)
Don't use axes as class/struct members. Use an array instead, and iterate over them where applicable.
Diffstat (limited to 'ftnoir_protocol_sc')
-rw-r--r--ftnoir_protocol_sc/ftnoir_protocol_sc.cpp14
-rw-r--r--ftnoir_protocol_sc/ftnoir_protocol_sc.h2
2 files changed, 8 insertions, 8 deletions
diff --git a/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp b/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp
index 90ca3dba..39c98ea7 100644
--- a/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp
+++ b/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp
@@ -86,17 +86,17 @@ void FTNoIR_Protocol::loadSettings() {
//
// Update Headpose in Game.
//
-void FTNoIR_Protocol::sendHeadposeToGame( THeadPoseData *headpose, THeadPoseData *rawheadpose ) {
+void FTNoIR_Protocol::sendHeadposeToGame( double *headpose, double *rawheadpose ) {
PDWORD_PTR MsgResult = 0;
- virtSCRotX = -1.0f * headpose->pitch; // degrees
- virtSCRotY = -1.0f * headpose->yaw;
- virtSCRotZ = headpose->roll;
+ virtSCRotX = -headpose[RY]; // degrees
+ virtSCRotY = -headpose[RX];
+ virtSCRotZ = headpose[RZ];
- virtSCPosX = headpose->x/100.f; // cm to meters
- virtSCPosY = headpose->y/100.f;
- virtSCPosZ = -1.0f * headpose->z/100.f;
+ virtSCPosX = headpose[TX]/100.f; // cm to meters
+ virtSCPosY = headpose[TY]/100.f;
+ virtSCPosZ = -headpose[TZ]/100.f;
//
// It's only useful to send data, if the connection was made.
diff --git a/ftnoir_protocol_sc/ftnoir_protocol_sc.h b/ftnoir_protocol_sc/ftnoir_protocol_sc.h
index 57919193..f49860b7 100644
--- a/ftnoir_protocol_sc/ftnoir_protocol_sc.h
+++ b/ftnoir_protocol_sc/ftnoir_protocol_sc.h
@@ -85,7 +85,7 @@ public:
~FTNoIR_Protocol();
void Initialize() {}
bool checkServerInstallationOK();
- void sendHeadposeToGame( THeadPoseData *headpose, THeadPoseData *rawheadpose );
+ void sendHeadposeToGame( double *headpose, double *rawheadpose );
void getNameFromGame( char *dest ); // Take care dest can handle up to 100 chars...
private: