aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Turvey <mturvey6@gmail.com>2017-12-28 08:56:43 -0700
committerMike Turvey <mturvey6@gmail.com>2017-12-28 08:56:43 -0700
commit8eda10ed94b66a8bb388cc5710dc6b45b1901993 (patch)
tree59e237db42481f79acae0eee79d81f345eb7e105 /src
parent6dea9ec51d21c9f58a6c82837b6dea0e67c20207 (diff)
downloadlibsurvive-8eda10ed94b66a8bb388cc5710dc6b45b1901993.tar.gz
libsurvive-8eda10ed94b66a8bb388cc5710dc6b45b1901993.tar.bz2
Use accelerometer to determine "up"
The accelerometer will be used to determine "up" instead of blindly using +z during calibration
Diffstat (limited to 'src')
-rw-r--r--src/poser_turveytori.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/poser_turveytori.c b/src/poser_turveytori.c
index bd165ec..ac979c7 100644
--- a/src/poser_turveytori.c
+++ b/src/poser_turveytori.c
@@ -1777,8 +1777,8 @@ int PoserTurveyTori( SurviveObject * so, PoserData * poserData )
FLT norm[3] = { so->sensor_normals[i * 3 + 0] , so->sensor_normals[i * 3 + 1] , so->sensor_normals[i * 3 + 2] };
FLT point[3] = { so->sensor_locations[i * 3 + 0] , so->sensor_locations[i * 3 + 1] , so->sensor_locations[i * 3 + 2] };
- //quatrotatevector(norm, downQuat, norm);
- //quatrotatevector(point, downQuat, point);
+ quatrotatevector(norm, downQuat, norm);
+ quatrotatevector(point, downQuat, point);
//rotatearoundaxis(norm, norm, axis, angle);
//rotatearoundaxis(point, point, axis, angle);
@@ -1813,8 +1813,8 @@ int PoserTurveyTori( SurviveObject * so, PoserData * poserData )
FLT norm[3] = { so->sensor_normals[i * 3 + 0] , so->sensor_normals[i * 3 + 1] , so->sensor_normals[i * 3 + 2] };
FLT point[3] = { so->sensor_locations[i * 3 + 0] , so->sensor_locations[i * 3 + 1] , so->sensor_locations[i * 3 + 2] };
- //quatrotatevector(norm, downQuat, norm);
- //quatrotatevector(point, downQuat, point);
+ quatrotatevector(norm, downQuat, norm);
+ quatrotatevector(point, downQuat, point);
//rotatearoundaxis(norm, norm, axis, angle);
//rotatearoundaxis(point, point, axis, angle);
@@ -1840,9 +1840,9 @@ int PoserTurveyTori( SurviveObject * so, PoserData * poserData )
}
- // This code block rotates the lighthouse fixes to accound for any time the tracked object
+ // This code block rotates the lighthouse fixes to account for any time the tracked object
// is oriented other than +z = up
- // This REALLY DOESN'T WORK!!!
+ //This REALLY DOESN'T WORK!!!
//{
// for (int lh = 0; lh < 2; lh++)
// {