Blender  V2.59
DNA_world_types.h
Go to the documentation of this file.
00001 /*
00002  * $Id: DNA_world_types.h 34941 2011-02-17 20:48:12Z jesterking $ 
00003  *
00004  * ***** BEGIN GPL LICENSE BLOCK *****
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU General Public License
00008  * as published by the Free Software Foundation; either version 2
00009  * of the License, or (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software Foundation,
00018  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00019  *
00020  * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
00021  * All rights reserved.
00022  *
00023  * The Original Code is: all of this file.
00024  *
00025  * Contributor(s): none yet.
00026  *
00027  * ***** END GPL LICENSE BLOCK *****
00028  */
00029 #ifndef DNA_WORLD_TYPES_H
00030 #define DNA_WORLD_TYPES_H
00031 
00036 #include "DNA_ID.h"
00037 
00038 struct AnimData;
00039 struct Ipo;
00040 struct MTex;
00041 
00042 #ifndef MAX_MTEX
00043 #define MAX_MTEX        18
00044 #endif
00045 
00046 
00051 typedef struct World {
00052         ID id;
00053         struct AnimData *adt;   /* animation data (must be immediately after id for utilities to use it) */ 
00054         
00055         short colormodel, totex;
00056         short texact, mistype;
00057 
00058         float horr, horg, horb;
00059         float zenr, zeng, zenb;
00060         float ambr, ambg, ambb;
00061         float pad2;
00062 
00063         unsigned int fastcol;   
00064         
00070         float exposure, exp, range;     
00071         float linfac, logfac;
00072 
00076         float gravity; // XXX moved to scene->gamedata in 2.5
00077 
00081         float activityBoxRadius; // XXX moved to scene->gamedata in 2.5
00082         
00083         short skytype;
00093         short mode;                                                                                             // partially moved to scene->gamedata in 2.5
00094         short occlusionRes;             /* resolution of occlusion Z buffer in pixel */ // XXX moved to scene->gamedata in 2.5
00095         short physicsEngine;    /* here it's aligned */                                 // XXX moved to scene->gamedata in 2.5
00096         short ticrate, maxlogicstep, physubstep, maxphystep;    // XXX moved to scene->gamedata in 2.5
00097         
00098         float misi, miststa, mistdist, misthi;
00099         
00100         float starr, starg, starb, stark;
00101         float starsize, starmindist;
00102         float stardist, starcolnoise;
00103         
00104         /* unused now: DOF */
00105         short dofsta, dofend, dofmin, dofmax;
00106         
00107         /* ambient occlusion */
00108         float aodist, aodistfac, aoenergy, aobias;
00109         short aomode, aosamp, aomix, aocolor;
00110         float ao_adapt_thresh, ao_adapt_speed_fac;
00111         float ao_approx_error, ao_approx_correction;
00112         float ao_indirect_energy, ao_env_energy, ao_pad2;
00113         short ao_indirect_bounces, ao_pad;
00114         short ao_samp_method, ao_gather_method, ao_approx_passes;
00115         
00116         /* assorted settings (in the middle of ambient occlusion settings for padding reasons) */
00117         short flag;
00118         
00119         /* ambient occlusion (contd...) */
00120         float *aosphere, *aotables;
00121         
00122         
00123         struct Ipo *ipo;                        // XXX depreceated... old animation system
00124         struct MTex *mtex[18];          /* MAX_MTEX */
00125         short pr_texture, pad[3];
00126 
00127         /* previews */
00128         struct PreviewImage *preview;
00129 
00130 } World;
00131 
00132 /* **************** WORLD ********************* */
00133 
00134 /* skytype */
00135 #define WO_SKYBLEND             1
00136 #define WO_SKYREAL              2
00137 #define WO_SKYPAPER             4
00138 /* while render: */
00139 #define WO_SKYTEX               8
00140 #define WO_ZENUP                16
00141 
00142 /* mode */
00143 #define WO_MIST                1
00144 #define WO_STARS               2
00145 /*#define WO_DOF                 4*/
00146 #define WO_ACTIVITY_CULLING        8
00147 #define WO_ENV_LIGHT              16
00148 #define WO_DBVT_CULLING           32
00149 #define WO_AMB_OCC                64
00150 #define WO_INDIRECT_LIGHT         128
00151 
00152 /* aomix */
00153 #define WO_AOADD        0
00154 #define WO_AOSUB        1 /* deprecated */
00155 #define WO_AOADDSUB     2 /* deprecated */
00156 #define WO_AOMUL        3
00157 
00158 /* ao_samp_method - methods for sampling the AO hemi */
00159 #define WO_AOSAMP_CONSTANT                      0
00160 #define WO_AOSAMP_HALTON                        1
00161 #define WO_AOSAMP_HAMMERSLEY            2
00162 
00163 /* aomode (use distances & random sampling modes) */
00164 #define WO_AODIST               1
00165 #define WO_AORNDSMP             2
00166 #define WO_AOCACHE              4
00167 
00168 /* aocolor */
00169 #define WO_AOPLAIN      0
00170 #define WO_AOSKYCOL     1
00171 #define WO_AOSKYTEX     2
00172 
00173 /* ao_gather_method */
00174 #define WO_AOGATHER_RAYTRACE    0
00175 #define WO_AOGATHER_APPROX              1
00176 
00177 /* texco (also in DNA_material_types.h) */
00178 #define TEXCO_ANGMAP    64
00179 #define TEXCO_H_SPHEREMAP       256
00180 #define TEXCO_H_TUBEMAP 1024
00181 
00182 /* mapto */
00183 #define WOMAP_BLEND             1
00184 #define WOMAP_HORIZ             2
00185 #define WOMAP_ZENUP             4
00186 #define WOMAP_ZENDOWN   8
00187 #define WOMAP_MIST              16
00188 
00189 /* flag */
00190 #define WO_DS_EXPAND    (1<<0)
00191         /* NOTE: this must have the same value as MA_DS_SHOW_TEXS, 
00192          * otherwise anim-editors will not read correctly
00193          */
00194 #define WO_DS_SHOW_TEXS (1<<2)
00195 
00196 #endif
00197