aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Turvey <mwturvey@users.noreply.github.com>2017-05-21 20:33:31 -0700
committerGitHub <noreply@github.com>2017-05-21 20:33:31 -0700
commitbce7ee736e99f2a4f6c6744cad26e79af896ad92 (patch)
tree79adbae4010147ebccdbcd8a4d1c5e16f7b0d33d /src
parentae66f593a3b929ebe8f7212d0a33a616289a3a39 (diff)
parentfd7d4f53145fb691a8a1d636af3b38abc36e6516 (diff)
downloadlibsurvive-bce7ee736e99f2a4f6c6744cad26e79af896ad92.tar.gz
libsurvive-bce7ee736e99f2a4f6c6744cad26e79af896ad92.tar.bz2
Merge pull request #72 from mwturvey/FixToriPoserOrientation
Fix the orientation from ToriPoser
Diffstat (limited to 'src')
-rw-r--r--src/poser_turveytori.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/poser_turveytori.c b/src/poser_turveytori.c
index 4837f94..b4f685c 100644
--- a/src/poser_turveytori.c
+++ b/src/poser_turveytori.c
@@ -1342,7 +1342,8 @@ static Point SolveForLighthouse(FLT posOut[3], FLT quatOut[4], TrackedObject *ob
quatrotatevector(wcPos, so->ctx->bsd[lh].Pose.Rot, objPos);
FLT newOrientation[4];
- quatrotateabout(newOrientation, rotQuat, so->ctx->bsd[lh].Pose.Rot );
+ //quatrotateabout(newOrientation, rotQuat, so->ctx->bsd[lh].Pose.Rot);
+ quatrotateabout(newOrientation, so->ctx->bsd[lh].Pose.Rot, rotQuat);
wcPos[0] += so->ctx->bsd[lh].Pose.Pos[0];
wcPos[1] += so->ctx->bsd[lh].Pose.Pos[1];
@@ -1357,6 +1358,15 @@ static Point SolveForLighthouse(FLT posOut[3], FLT quatOut[4], TrackedObject *ob
so->OutPose.Rot[2] = newOrientation[2];
so->OutPose.Rot[3] = newOrientation[3];
+ so->FromLHPose[lh].Pos[0] = so->OutPose.Pos[0];
+ so->FromLHPose[lh].Pos[1] = so->OutPose.Pos[1];
+ so->FromLHPose[lh].Pos[2] = so->OutPose.Pos[2];
+
+ so->FromLHPose[lh].Rot[0] = so->OutPose.Rot[0];
+ so->FromLHPose[lh].Rot[1] = so->OutPose.Rot[1];
+ so->FromLHPose[lh].Rot[2] = so->OutPose.Rot[2];
+ so->FromLHPose[lh].Rot[3] = so->OutPose.Rot[3];
+
printf(" <% 04.4f, % 04.4f, % 04.4f > ", wcPos[0], wcPos[1], wcPos[2]);
if (logFile)