istereo2
view src/cam.h @ 30:900651a2f401
foo
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Thu, 08 Oct 2015 06:54:18 +0300 |
parents | |
children |
line source
1 /*
2 Stereoscopic tunnel for iOS.
3 Copyright (C) 2011 John Tsiombikas <nuclear@member.fsf.org>
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
19 #ifndef CAM_H_
20 #define CAM_H_
22 enum {
23 CAM_CENTER,
24 CAM_LEFT,
25 CAM_RIGHT
26 };
28 /* reset to the initial state */
29 void cam_reset(void); /* all */
30 void cam_reset_view(void); /* view parameters */
31 void cam_reset_proj(void); /* projection parameters */
32 void cam_reset_stereo(void); /* stereo parameters */
34 /* camera viewing parameters */
35 void cam_pan(int dx, int dy); /* pan across X/Z plane */
36 void cam_height(int dh); /* move verticaly */
37 void cam_rotate(int dx, int dy); /* rotate around local Y and X axis */
38 void cam_zoom(int dz); /* dolly the camera fwd/back */
40 /* camera projection parameters */
41 void cam_clip(float n, float f); /* set clipping planes */
42 void cam_fov(float f); /* vertical field of view in degrees */
43 void cam_aspect(float a); /* aspect ratio (width / height) */
45 /* stereo parameters */
46 void cam_separation(float s);
47 void cam_focus_dist(float d);
49 /* multiply the camera view matrix on top of the current matrix stack
50 * (which should be GL_MODELVIEW)
51 */
52 void cam_view_matrix(void);
53 void cam_stereo_view_matrix(int eye);
55 /* multiply the camera projection matrix on top of the current matrix stack
56 * (which should be GL_PROJECTION)
57 */
58 void cam_proj_matrix(void);
59 void cam_stereo_proj_matrix(int eye);
61 #endif /* CAM_H_ */