aboutsummaryrefslogtreecommitdiff
path: root/src/poser_turveytori.c
diff options
context:
space:
mode:
authorMike Turvey <mturvey6@gmail.com>2018-01-05 03:54:29 -0700
committerMike Turvey <mturvey6@gmail.com>2018-01-05 03:54:29 -0700
commit735a8bd11070b0c563e891ff8b70ce297a52a367 (patch)
tree0907027c98ca28d2e13f1e66edd38135119946d5 /src/poser_turveytori.c
parent499b80ae7b538f8e66f5ec8bfa60c7136a3babf5 (diff)
downloadlibsurvive-735a8bd11070b0c563e891ff8b70ce297a52a367.tar.gz
libsurvive-735a8bd11070b0c563e891ff8b70ce297a52a367.tar.bz2
Add standard output mechanism for posers
Added a raw pose output/ callback that the posers can call when they have calculated a pose.
Diffstat (limited to 'src/poser_turveytori.c')
-rw-r--r--src/poser_turveytori.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/poser_turveytori.c b/src/poser_turveytori.c
index ac979c7..28e533e 100644
--- a/src/poser_turveytori.c
+++ b/src/poser_turveytori.c
@@ -1177,7 +1177,7 @@ static void RefineRotationEstimateQuaternion(FLT *rotOut, Point lhPoint, FLT *in
}
- printf("Ri=%3d Fitness=%3f ", i, lastMatchFitness);
+ if (ttDebug) printf("Ri=%3d Fitness=%3f ", i, lastMatchFitness);
}
@@ -1638,7 +1638,11 @@ static void QuickPose(SurviveObject *so, int lh)
SolveForLighthouse(pos, quat, to, so, 0, lh, 0);
- printf("P&O: [% 08.8f,% 08.8f,% 08.8f] [% 08.8f,% 08.8f,% 08.8f,% 08.8f]\n", pos[0], pos[1], pos[2], quat[0], quat[1], quat[2], quat[3]);
+ //printf("P&O: [% 08.8f,% 08.8f,% 08.8f] [% 08.8f,% 08.8f,% 08.8f,% 08.8f]\n", pos[0], pos[1], pos[2], quat[0], quat[1], quat[2], quat[3]);
+ if (so->ctx->rawposeproc)
+ {
+ so->ctx->rawposeproc(so, lh, pos, quat);
+ }
if (ttDebug) printf("!\n");
}