istereo

annotate src/cam.h @ 43:73813c1176de

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