metasurf

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