stereoview

diff src/cam.h @ 0:dc1723a8bf6f

initial import
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 04 Mar 2011 06:51:16 +0200
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/cam.h	Fri Mar 04 06:51:16 2011 +0200
     1.3 @@ -0,0 +1,43 @@
     1.4 +#ifndef CAM_H_
     1.5 +#define CAM_H_
     1.6 +
     1.7 +enum {
     1.8 +	CAM_CENTER,
     1.9 +	CAM_LEFT,
    1.10 +	CAM_RIGHT
    1.11 +};
    1.12 +
    1.13 +/* reset to the initial state */
    1.14 +void cam_reset(void);			/* all */
    1.15 +void cam_reset_view(void);		/* view parameters */
    1.16 +void cam_reset_proj(void);		/* projection parameters */
    1.17 +void cam_reset_stereo(void);	/* stereo parameters */
    1.18 +
    1.19 +/* camera viewing parameters */
    1.20 +void cam_pan(int dx, int dy);		/* pan across X/Z plane */
    1.21 +void cam_height(int dh);			/* move verticaly */
    1.22 +void cam_rotate(int dx, int dy);	/* rotate around local Y and X axis */
    1.23 +void cam_zoom(int dz);				/* dolly the camera fwd/back */
    1.24 +
    1.25 +/* camera projection parameters */
    1.26 +void cam_clip(float n, float f);	/* set clipping planes */
    1.27 +void cam_fov(float f);				/* vertical field of view in degrees */
    1.28 +void cam_aspect(float a);			/* aspect ratio (width / height) */
    1.29 +
    1.30 +/* stereo parameters */
    1.31 +void cam_separation(float s);
    1.32 +void cam_focus_dist(float d);
    1.33 +
    1.34 +/* multiply the camera view matrix on top of the current matrix stack
    1.35 + * (which should be GL_MODELVIEW)
    1.36 + */
    1.37 +void cam_view_matrix(void);
    1.38 +void cam_stereo_view_matrix(int eye);
    1.39 +
    1.40 +/* multiply the camera projection matrix on top of the current matrix stack
    1.41 + * (which should be GL_PROJECTION)
    1.42 + */
    1.43 +void cam_proj_matrix(void);
    1.44 +void cam_stereo_proj_matrix(int eye);
    1.45 +
    1.46 +#endif	/* CAM_H_ */