diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2015-04-19 15:21:28 +0200 | 
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-04-19 15:21:28 +0200 | 
| commit | 0dbfd34bab63170915b9bdd0f456f39def4ea43e (patch) | |
| tree | a65c244128abd73c35b0cdd81e9ac495d041febc | |
| parent | d09445062d5eebbe54b7e8da4f7dc1814625d867 (diff) | |
hatire: actually don't do any degree to radian conversion
| -rw-r--r-- | ftnoir_tracker_hatire/ftnoir_tracker_hat.cpp | 19 | 
1 files changed, 8 insertions, 11 deletions
diff --git a/ftnoir_tracker_hatire/ftnoir_tracker_hat.cpp b/ftnoir_tracker_hatire/ftnoir_tracker_hat.cpp index bbd2f7c8..9f73067d 100644 --- a/ftnoir_tracker_hatire/ftnoir_tracker_hat.cpp +++ b/ftnoir_tracker_hatire/ftnoir_tracker_hat.cpp @@ -402,23 +402,20 @@ bool FTNoIR_Tracker::GiveHeadPoseData(THeadPoseData *data)  	}      if  (new_frame) {  #ifdef OPENTRACK_API -         -    static constexpr double pi = 3.14159265359; -    static constexpr double d2r = pi / 180.; - -	if (bEnableYaw) { -        if (bInvertYaw )	data[Yaw] =  HAT.Rot[iYawAxe] *  -1.0f * d2r; -        else 	data[Yaw] = HAT.Rot[iYawAxe] * d2r; +        +    if (bEnableYaw) { +        if (bInvertYaw )	data[Yaw] =  HAT.Rot[iYawAxe] *  -1.0f; +        else 	data[Yaw] = HAT.Rot[iYawAxe];      } else 	data[Yaw] =0;  	if (bEnablePitch) { -        if (bInvertPitch) data[Pitch] =  HAT.Rot[iPitchAxe] *  -1.0f * d2r; -        else data[Pitch] =   HAT.Rot[iPitchAxe] * d2r; +        if (bInvertPitch) data[Pitch] =  HAT.Rot[iPitchAxe] *  -1.0f; +        else data[Pitch] =   HAT.Rot[iPitchAxe];      } else data[Pitch] = 0;  	if (bEnableRoll) { -        if (bInvertRoll) data[Roll] =  HAT.Rot[iRollAxe] *  -1.0f * d2r; -        else data[Roll] =  HAT.Rot[iRollAxe] * d2r; +        if (bInvertRoll) data[Roll] =  HAT.Rot[iRollAxe] *  -1.0f; +        else data[Roll] =  HAT.Rot[iRollAxe];      } else data[Roll] =0;  	if (bEnableX) {  | 
