stereoview
annotate src/cam.h @ 2:30c7a5df0523
- added focus distance cmdline argument
- changed the code to use the regular henge::Scene when using the zbuffer
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Fri, 04 Mar 2011 15:51:03 +0200 |
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 /* camera viewing parameters */ |
nuclear@0 | 17 void cam_pan(int dx, int dy); /* pan across X/Z plane */ |
nuclear@0 | 18 void cam_height(int dh); /* move verticaly */ |
nuclear@0 | 19 void cam_rotate(int dx, int dy); /* rotate around local Y and X axis */ |
nuclear@0 | 20 void cam_zoom(int dz); /* dolly the camera fwd/back */ |
nuclear@0 | 21 |
nuclear@0 | 22 /* camera projection parameters */ |
nuclear@0 | 23 void cam_clip(float n, float f); /* set clipping planes */ |
nuclear@0 | 24 void cam_fov(float f); /* vertical field of view in degrees */ |
nuclear@0 | 25 void cam_aspect(float a); /* aspect ratio (width / height) */ |
nuclear@0 | 26 |
nuclear@0 | 27 /* stereo parameters */ |
nuclear@0 | 28 void cam_separation(float s); |
nuclear@0 | 29 void cam_focus_dist(float d); |
nuclear@0 | 30 |
nuclear@0 | 31 /* multiply the camera view matrix on top of the current matrix stack |
nuclear@0 | 32 * (which should be GL_MODELVIEW) |
nuclear@0 | 33 */ |
nuclear@0 | 34 void cam_view_matrix(void); |
nuclear@0 | 35 void cam_stereo_view_matrix(int eye); |
nuclear@0 | 36 |
nuclear@0 | 37 /* multiply the camera projection matrix on top of the current matrix stack |
nuclear@0 | 38 * (which should be GL_PROJECTION) |
nuclear@0 | 39 */ |
nuclear@0 | 40 void cam_proj_matrix(void); |
nuclear@0 | 41 void cam_stereo_proj_matrix(int eye); |
nuclear@0 | 42 |
nuclear@0 | 43 #endif /* CAM_H_ */ |