Blender V2.61 - r43446

DNA_camera_types.h

Go to the documentation of this file.
00001 /*
00002  * ***** BEGIN GPL LICENSE BLOCK *****
00003  *
00004  * This program is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU General Public License
00006  * as published by the Free Software Foundation; either version 2
00007  * of the License, or (at your option) any later version.
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software Foundation,
00016  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00017  *
00018  * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
00019  * All rights reserved.
00020  *
00021  * The Original Code is: all of this file.
00022  *
00023  * Contributor(s): none yet.
00024  *
00025  * ***** END GPL LICENSE BLOCK *****
00026  */
00027 
00032 #ifndef DNA_CAMERA_TYPES_H
00033 #define DNA_CAMERA_TYPES_H
00034 
00035 #include "DNA_defs.h"
00036 
00037 #include "DNA_ID.h"
00038 
00039 #ifdef __cplusplus
00040 extern "C" {
00041 #endif
00042 
00043 struct Object;
00044 struct AnimData;
00045 struct Ipo;
00046 
00047 typedef struct Camera {
00048     ID id;
00049     struct AnimData *adt;   /* animation data (must be immediately after id for utilities to use it) */ 
00050     
00051     char type; /* CAM_PERSP or CAM_ORTHO */
00052     char dtx; /* draw type extra */
00053     short flag;
00054     float passepartalpha;
00055     float clipsta, clipend;
00056     float lens, ortho_scale, drawsize;
00057     float sensor_x, sensor_y;
00058     float shiftx, shifty;
00059     
00060     /* yafray: dof params */
00061     /* qdn: yafray var 'YF_dofdist' now enabled for defocus composit node as well.
00062             The name was not changed so that no other files need to be modified */
00063     float YF_dofdist;
00064 
00065     struct Ipo *ipo  DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */
00066     
00067     struct Object *dof_ob;
00068 
00069     char sensor_fit;
00070     char pad[7];
00071 } Camera;
00072 
00073 /* **************** CAMERA ********************* */
00074 
00075 /* type */
00076 #define CAM_PERSP       0
00077 #define CAM_ORTHO       1
00078 
00079 /* dtx */
00080 #define CAM_DTX_CENTER          1
00081 #define CAM_DTX_CENTER_DIAG     2
00082 #define CAM_DTX_THIRDS          4
00083 #define CAM_DTX_GOLDEN          8
00084 #define CAM_DTX_GOLDEN_TRI_A    16
00085 #define CAM_DTX_GOLDEN_TRI_B    32
00086 #define CAM_DTX_HARMONY_TRI_A   64
00087 #define CAM_DTX_HARMONY_TRI_B   128
00088 
00089 /* flag */
00090 #define CAM_SHOWLIMITS  1
00091 #define CAM_SHOWMIST    2
00092 #define CAM_SHOWPASSEPARTOUT    4
00093 #define CAM_SHOWTITLESAFE   8
00094 #define CAM_SHOWNAME        16
00095 #define CAM_ANGLETOGGLE     32
00096 #define CAM_DS_EXPAND       64
00097 #define CAM_PANORAMA        128
00098 #define CAM_SHOWSENSOR      256
00099 
00100 /* yafray: dof sampling switch */
00101 /* #define CAM_YF_NO_QMC    512 */ /* depreceated */
00102 
00103 /* Sensor fit */
00104 #define CAMERA_SENSOR_FIT_AUTO  0
00105 #define CAMERA_SENSOR_FIT_HOR   1
00106 #define CAMERA_SENSOR_FIT_VERT  2
00107 
00108 #define DEFAULT_SENSOR_WIDTH    32.0f
00109 #define DEFAULT_SENSOR_HEIGHT   18.0f
00110 
00111 #ifdef __cplusplus
00112 }
00113 #endif
00114 
00115 #endif