aboutsummaryrefslogtreecommitdiff
path: root/src/survive.c
diff options
context:
space:
mode:
authorCNLohr <charles@cnlohr.com>2018-03-12 12:29:14 -0400
committerGitHub <noreply@github.com>2018-03-12 12:29:14 -0400
commite456a3ec1b0e1f04d55cdad7d95898f20bd26c89 (patch)
treec651c71625a8dbecc0b8293a1701a648eb836984 /src/survive.c
parent7fadeeff29074520224be385ecd6c50271a07220 (diff)
parentee0fd0be34cd6715b704be534b7e97087905571f (diff)
downloadlibsurvive-e456a3ec1b0e1f04d55cdad7d95898f20bd26c89.tar.gz
libsurvive-e456a3ec1b0e1f04d55cdad7d95898f20bd26c89.tar.bz2
Merge pull request #112 from cnlohr/poser_callbacks
Poser callbacks
Diffstat (limited to 'src/survive.c')
-rwxr-xr-xsrc/survive.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/survive.c b/src/survive.c
index 5d0d35f..61bfc86 100755
--- a/src/survive.c
+++ b/src/survive.c
@@ -148,7 +148,7 @@ SurviveContext * survive_init_internal( int headless )
ctx->lightproc = survive_default_light_process;
ctx->imuproc = survive_default_imu_process;
ctx->angleproc = survive_default_angle_process;
-
+ ctx->lighthouseposeproc = survive_default_lighthouse_pose_process;
// initialize the button queue
memset(&(ctx->buttonQueue), 0, sizeof(ctx->buttonQueue));
@@ -260,6 +260,14 @@ void survive_install_raw_pose_fn(SurviveContext * ctx, raw_pose_func fbp)
else
ctx->rawposeproc = survive_default_raw_pose_process;
}
+
+void survive_install_lighthouse_pose_fn(SurviveContext *ctx, lighthouse_pose_func fbp) {
+ if (fbp)
+ ctx->lighthouseposeproc = fbp;
+ else
+ ctx->lighthouseposeproc = survive_default_lighthouse_pose_process;
+}
+
int survive_add_object( SurviveContext * ctx, SurviveObject * obj )
{
int oldct = ctx->objs_ct;