From: Michel Pollet Date: Sat, 16 Jun 2012 08:08:25 +0000 (+0100) Subject: c3camera: Added a field-of-view X-Git-Tag: v1.0~71 X-Git-Url: https://git.htl-mechatronik.at/public/?a=commitdiff_plain;h=fbd7e689e5952b33533ce2c40d9ee26616b6925f;p=sx%2Fsimavr.git c3camera: Added a field-of-view For calculating perspective matrix --- 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() ***********/