metasurf

diff examples/metaballs/src/cam.h @ 0:7aa4627e492b

first commit
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 25 Oct 2011 07:34:31 +0300
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/examples/metaballs/src/cam.h	Tue Oct 25 07:34:31 2011 +0300
     1.3 @@ -0,0 +1,54 @@
     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 +void cam_set_vrange(float min_deg, float max_deg);
    1.20 +
    1.21 +void cam_move(float x, float y, float z);
    1.22 +void cam_rotate(float theta, float phi);
    1.23 +void cam_dolly(float dist);
    1.24 +
    1.25 +/* camera input handling */
    1.26 +void cam_inp_pan_speed(float speed);
    1.27 +void cam_inp_rotate_speed(float speed);
    1.28 +void cam_inp_zoom_speed(float speed);
    1.29 +
    1.30 +void cam_inp_pan(int dx, int dy);		/* pan across X/Z plane */
    1.31 +void cam_inp_height(int dh);			/* move verticaly */
    1.32 +void cam_inp_rotate(int dx, int dy);	/* rotate around local Y and X axis */
    1.33 +void cam_inp_zoom(int dz);				/* dolly the camera fwd/back */
    1.34 +
    1.35 +/* camera projection parameters */
    1.36 +void cam_clip(float n, float f);	/* set clipping planes */
    1.37 +void cam_fov(float f);				/* vertical field of view in degrees */
    1.38 +void cam_aspect(float a);			/* aspect ratio (width / height) */
    1.39 +
    1.40 +/* stereo parameters */
    1.41 +void cam_separation(float s);
    1.42 +void cam_focus_dist(float d);
    1.43 +
    1.44 +
    1.45 +/* multiply the camera view matrix on top of the current matrix stack
    1.46 + * (which should be GL_MODELVIEW)
    1.47 + */
    1.48 +void cam_view_matrix(void);
    1.49 +void cam_stereo_view_matrix(int eye);
    1.50 +
    1.51 +/* multiply the camera projection matrix on top of the current matrix stack
    1.52 + * (which should be GL_PROJECTION)
    1.53 + */
    1.54 +void cam_proj_matrix(void);
    1.55 +void cam_stereo_proj_matrix(int eye);
    1.56 +
    1.57 +#endif	/* CAM_H_ */