From fbd7e689e5952b33533ce2c40d9ee26616b6925f Mon Sep 17 00:00:00 2001 From: Michel Pollet Date: Sat, 16 Jun 2012 09:08:25 +0100 Subject: [PATCH] c3camera: Added a field-of-view For calculating perspective matrix --- examples/shared/libc3/src/c3camera.c | 2 +- examples/shared/libc3/src/c3camera.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/shared/libc3/src/c3camera.c b/examples/shared/libc3/src/c3camera.c index f4eef0f..a4e6257 100644 --- a/examples/shared/libc3/src/c3camera.c +++ b/examples/shared/libc3/src/c3camera.c @@ -334,7 +334,7 @@ c3cam_reset( c->up = c3vec3f( 0.0, 1.0, 0.0 ); c->eye = c3vec3f(0.0, 0.0, 10.0); c->lookat = c3vec3f(0.0,0.0,0.0); - + c->fov = 50.0f; c->mtx = identity3D(); c3cam_update(c); diff --git a/examples/shared/libc3/src/c3camera.h b/examples/shared/libc3/src/c3camera.h index 5f47af7..a189f9d 100644 --- a/examples/shared/libc3/src/c3camera.h +++ b/examples/shared/libc3/src/c3camera.h @@ -30,6 +30,7 @@ typedef struct c3cam_t { c3vec3 up, side, forward; c3mat4 mtx; c3f distance; + c3f fov; } c3cam_t, *c3cam_p; /******************************* set_distance() ***********/ -- 2.39.5