metasurf

view 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 source
1 #ifndef CAM_H_
2 #define CAM_H_
4 enum {
5 CAM_CENTER,
6 CAM_LEFT,
7 CAM_RIGHT
8 };
10 /* reset to the initial state */
11 void cam_reset(void); /* all */
12 void cam_reset_view(void); /* view parameters */
13 void cam_reset_proj(void); /* projection parameters */
14 void cam_reset_stereo(void); /* stereo parameters */
16 void cam_set_vrange(float min_deg, float max_deg);
18 void cam_move(float x, float y, float z);
19 void cam_rotate(float theta, float phi);
20 void cam_dolly(float dist);
22 /* camera input handling */
23 void cam_inp_pan_speed(float speed);
24 void cam_inp_rotate_speed(float speed);
25 void cam_inp_zoom_speed(float speed);
27 void cam_inp_pan(int dx, int dy); /* pan across X/Z plane */
28 void cam_inp_height(int dh); /* move verticaly */
29 void cam_inp_rotate(int dx, int dy); /* rotate around local Y and X axis */
30 void cam_inp_zoom(int dz); /* dolly the camera fwd/back */
32 /* camera projection parameters */
33 void cam_clip(float n, float f); /* set clipping planes */
34 void cam_fov(float f); /* vertical field of view in degrees */
35 void cam_aspect(float a); /* aspect ratio (width / height) */
37 /* stereo parameters */
38 void cam_separation(float s);
39 void cam_focus_dist(float d);
42 /* multiply the camera view matrix on top of the current matrix stack
43 * (which should be GL_MODELVIEW)
44 */
45 void cam_view_matrix(void);
46 void cam_stereo_view_matrix(int eye);
48 /* multiply the camera projection matrix on top of the current matrix stack
49 * (which should be GL_PROJECTION)
50 */
51 void cam_proj_matrix(void);
52 void cam_stereo_proj_matrix(int eye);
54 #endif /* CAM_H_ */