Blender V2.61 - r43446

DNA_world_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_WORLD_TYPES_H
00033 #define DNA_WORLD_TYPES_H
00034 
00035 #include "DNA_defs.h"
00036 #include "DNA_ID.h"
00037 
00038 struct AnimData;
00039 struct bNodeTree;
00040 struct Ipo;
00041 struct MTex;
00042 
00043 #ifndef MAX_MTEX
00044 #define MAX_MTEX    18
00045 #endif
00046 
00047 
00052 typedef struct World {
00053     ID id;
00054     struct AnimData *adt;   /* animation data (must be immediately after id for utilities to use it) */ 
00055     
00056     short colormodel, totex;
00057     short texact, mistype;
00058 
00059     float horr, horg, horb;
00060     float zenr, zeng, zenb;
00061     float ambr, ambg, ambb;
00062     float pad2;
00063 
00064     unsigned int fastcol;   
00065     
00071     float exposure, exp, range; 
00072     float linfac, logfac;
00073 
00077     float gravity; // XXX moved to scene->gamedata in 2.5
00078 
00082     float activityBoxRadius; // XXX moved to scene->gamedata in 2.5
00083     
00084     short skytype;
00094     short mode;                                             // partially moved to scene->gamedata in 2.5
00095     short occlusionRes;     /* resolution of occlusion Z buffer in pixel */ // XXX moved to scene->gamedata in 2.5
00096     short physicsEngine;    /* here it's aligned */                 // XXX moved to scene->gamedata in 2.5
00097     short ticrate, maxlogicstep, physubstep, maxphystep;    // XXX moved to scene->gamedata in 2.5
00098     
00099     float misi, miststa, mistdist, misthi;
00100     
00101     float starr  DNA_DEPRECATED, starg  DNA_DEPRECATED, starb  DNA_DEPRECATED, stark  DNA_DEPRECATED; /* Deprecated */
00102     float starsize, starmindist;
00103     float stardist, starcolnoise;
00104     
00105     /* unused now: DOF */
00106     short dofsta, dofend, dofmin, dofmax;
00107     
00108     /* ambient occlusion */
00109     float aodist, aodistfac, aoenergy, aobias;
00110     short aomode, aosamp, aomix, aocolor;
00111     float ao_adapt_thresh, ao_adapt_speed_fac;
00112     float ao_approx_error, ao_approx_correction;
00113     float ao_indirect_energy, ao_env_energy, ao_pad2;
00114     short ao_indirect_bounces, ao_pad;
00115     short ao_samp_method, ao_gather_method, ao_approx_passes;
00116     
00117     /* assorted settings (in the middle of ambient occlusion settings for padding reasons) */
00118     short flag;
00119     
00120     /* ambient occlusion (contd...) */
00121     float *aosphere, *aotables;
00122     
00123     
00124     struct Ipo *ipo  DNA_DEPRECATED;  /* old animation system, deprecated for 2.5 */
00125     struct MTex *mtex[18];      /* MAX_MTEX */
00126     short pr_texture, use_nodes, pad[2];
00127 
00128     /* previews */
00129     struct PreviewImage *preview;
00130 
00131     /* nodes */
00132     struct bNodeTree *nodetree; 
00133 
00134 } World;
00135 
00136 /* **************** WORLD ********************* */
00137 
00138 /* skytype */
00139 #define WO_SKYBLEND     1
00140 #define WO_SKYREAL      2
00141 #define WO_SKYPAPER     4
00142 /* while render: */
00143 #define WO_SKYTEX       8
00144 #define WO_ZENUP        16
00145 
00146 /* mode */
00147 #define WO_MIST                1
00148 #define WO_STARS               2
00149 /*#define WO_DOF                 4*/
00150 #define WO_ACTIVITY_CULLING    8
00151 #define WO_ENV_LIGHT          16
00152 #define WO_DBVT_CULLING       32
00153 #define WO_AMB_OCC            64
00154 #define WO_INDIRECT_LIGHT     128
00155 
00156 /* aomix */
00157 #define WO_AOADD    0
00158 #define WO_AOSUB    1 /* deprecated */
00159 #define WO_AOADDSUB 2 /* deprecated */
00160 #define WO_AOMUL    3
00161 
00162 /* ao_samp_method - methods for sampling the AO hemi */
00163 #define WO_AOSAMP_CONSTANT          0
00164 #define WO_AOSAMP_HALTON            1
00165 #define WO_AOSAMP_HAMMERSLEY        2
00166 
00167 /* aomode (use distances & random sampling modes) */
00168 #define WO_AODIST       1
00169 #define WO_AORNDSMP     2
00170 #define WO_AOCACHE      4
00171 
00172 /* aocolor */
00173 #define WO_AOPLAIN  0
00174 #define WO_AOSKYCOL 1
00175 #define WO_AOSKYTEX 2
00176 
00177 /* ao_gather_method */
00178 #define WO_AOGATHER_RAYTRACE    0
00179 #define WO_AOGATHER_APPROX      1
00180 
00181 /* texco (also in DNA_material_types.h) */
00182 #define TEXCO_ANGMAP    64
00183 #define TEXCO_H_SPHEREMAP   256
00184 #define TEXCO_H_TUBEMAP 1024
00185 #define TEXCO_EQUIRECTMAP 2048
00186 
00187 /* mapto */
00188 #define WOMAP_BLEND     1
00189 #define WOMAP_HORIZ     2
00190 #define WOMAP_ZENUP     4
00191 #define WOMAP_ZENDOWN   8
00192 #define WOMAP_MIST      16 /* Deprecated */
00193 
00194 /* flag */
00195 #define WO_DS_EXPAND    (1<<0)
00196     /* NOTE: this must have the same value as MA_DS_SHOW_TEXS, 
00197      * otherwise anim-editors will not read correctly
00198      */
00199 #define WO_DS_SHOW_TEXS (1<<2)
00200 
00201 #endif
00202