diff options
author | CNLohr <charles@cnlohr.com> | 2018-03-11 21:32:49 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-11 21:32:49 -0400 |
commit | 9c7823c17219c659cf12eab9cc8bb2b3f68bbc5e (patch) | |
tree | 550d3faabe5a22ccd099d55290682bd0b01bc1d1 /src/poser_charlesslow.c | |
parent | 6ba96f31c51cbfc8b57cfe87c129eba125bf793d (diff) | |
parent | 89f37774395530ef7267d4115f1a6242e0e9ce49 (diff) | |
download | libsurvive-9c7823c17219c659cf12eab9cc8bb2b3f68bbc5e.tar.gz libsurvive-9c7823c17219c659cf12eab9cc8bb2b3f68bbc5e.tar.bz2 |
Merge pull request #110 from cnlohr/reprojection
This adds reprojection functionality to the library
Diffstat (limited to 'src/poser_charlesslow.c')
-rw-r--r-- | src/poser_charlesslow.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/poser_charlesslow.c b/src/poser_charlesslow.c index 080ad6a..96442b3 100644 --- a/src/poser_charlesslow.c +++ b/src/poser_charlesslow.c @@ -169,6 +169,7 @@ int PoserCharlesSlow( SurviveObject * so, PoserData * pd ) copy3d( ctx->bsd[lh].Pose.Pos, LighthousePos ); quatcopy( ctx->bsd[lh].Pose.Rot, LighthouseQuat ); #define ALT_COORDS + #ifdef ALT_COORDS so->FromLHPose[lh].Pos[0] = LighthousePos[0]; so->FromLHPose[lh].Pos[1] = LighthousePos[1]; @@ -188,6 +189,11 @@ int PoserCharlesSlow( SurviveObject * so, PoserData * pd ) so->FromLHPose[lh].Rot[2] = LighthouseQuat[2]; so->FromLHPose[lh].Rot[3] = LighthouseQuat[3]; #endif + + const FLT rt[4] = {0, 0, 1, 0}; + FLT tmp[4]; + quatrotateabout(tmp, so->ctx->bsd[lh].Pose.Rot, rt); + memcpy(so->ctx->bsd[lh].Pose.Rot, tmp, sizeof(FLT) * 4); } return 0; |