2 * ***** BEGIN GPL LICENSE BLOCK *****
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software Foundation,
16 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
19 * All rights reserved.
21 * The Original Code is: all of this file.
23 * Contributor(s): none yet.
25 * ***** END GPL LICENSE BLOCK *****
28 /** \file DNA_world_types.h
32 #ifndef __DNA_WORLD_TYPES_H__
33 #define __DNA_WORLD_TYPES_H__
49 * World defines general modeling data such as a background fill,
50 * gravity, color model etc. It mixes game-data, rendering
51 * data and modeling data. */
52 typedef struct World {
54 struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */
56 short colormodel, totex;
57 short texact, mistype;
59 float horr, horg, horb;
60 float zenr, zeng, zenb;
61 float ambr, ambg, ambb;
64 * Exposure= mult factor. unused now, but maybe back later. Kept in to be upward compat.
65 * New is exp/range control. linfac & logfac are constants... don't belong in
66 * file, but allocating 8 bytes for temp mem isn't useful either.
68 float exposure, exp, range;
72 * Gravitation constant for the game world
74 float gravity; // XXX moved to scene->gamedata in 2.5
77 * Radius of the activity bubble, in Manhattan length. Objects
78 * outside the box are activity-culled. */
79 float activityBoxRadius; // XXX moved to scene->gamedata in 2.5
86 * bit 2: (reserved) depth of field
87 * bit 3: (gameengine): Activity culling is enabled.
88 * bit 4: ambient occlusion
89 * bit 5: (gameengine) : enable Bullet DBVT tree for view frustum culling
91 short mode; // partially moved to scene->gamedata in 2.5
92 short occlusionRes; /* resolution of occlusion Z buffer in pixel */ // XXX moved to scene->gamedata in 2.5
93 short physicsEngine; /* here it's aligned */ // XXX moved to scene->gamedata in 2.5
94 short ticrate, maxlogicstep, physubstep, maxphystep; // XXX moved to scene->gamedata in 2.5
96 float misi, miststa, mistdist, misthi;
98 float starr DNA_DEPRECATED, starg DNA_DEPRECATED, starb DNA_DEPRECATED, stark DNA_DEPRECATED; /* Deprecated */
99 float starsize DNA_DEPRECATED, starmindist DNA_DEPRECATED;
100 float stardist DNA_DEPRECATED, starcolnoise DNA_DEPRECATED;
102 /* unused now: DOF */
103 short dofsta, dofend, dofmin, dofmax;
105 /* ambient occlusion */
106 float aodist, aodistfac, aoenergy, aobias;
107 short aomode, aosamp, aomix, aocolor;
108 float ao_adapt_thresh, ao_adapt_speed_fac;
109 float ao_approx_error, ao_approx_correction;
110 float ao_indirect_energy, ao_env_energy, ao_pad2;
111 short ao_indirect_bounces, ao_pad;
112 short ao_samp_method, ao_gather_method, ao_approx_passes;
114 /* assorted settings (in the middle of ambient occlusion settings for padding reasons) */
117 /* ambient occlusion (contd...) */
118 float *aosphere, *aotables;
121 struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */
122 struct MTex *mtex[18]; /* MAX_MTEX */
123 short pr_texture, use_nodes, pad[2];
126 struct PreviewImage *preview;
129 struct bNodeTree *nodetree;
131 ListBase gpumaterial; /* runtime */
134 /* **************** WORLD ********************* */
137 #define WO_SKYBLEND 1
139 #define WO_SKYPAPER 4
146 //#define WO_STARS 2 /* deprecated */
148 #define WO_ACTIVITY_CULLING 8
149 #define WO_ENV_LIGHT 16
150 #define WO_DBVT_CULLING 32
151 #define WO_AMB_OCC 64
152 #define WO_INDIRECT_LIGHT 128
157 #ifdef DNA_DEPRECATED
158 WO_AOSUB = 1, /* deprecated */
159 WO_AOADDSUB = 2, /* deprecated */
164 /* ao_samp_method - methods for sampling the AO hemi */
165 #define WO_AOSAMP_CONSTANT 0
166 #define WO_AOSAMP_HALTON 1
167 #define WO_AOSAMP_HAMMERSLEY 2
169 /* aomode (use distances & random sampling modes) */
171 #define WO_AORNDSMP 2
176 #define WO_AOSKYCOL 1
177 #define WO_AOSKYTEX 2
179 /* ao_gather_method */
180 #define WO_AOGATHER_RAYTRACE 0
181 #define WO_AOGATHER_APPROX 1
183 /* texco (also in DNA_material_types.h) */
184 #define TEXCO_ANGMAP 64
185 #define TEXCO_H_SPHEREMAP 256
186 #define TEXCO_H_TUBEMAP 1024
187 #define TEXCO_EQUIRECTMAP 2048
190 #define WOMAP_BLEND 1
191 #define WOMAP_HORIZ 2
192 #define WOMAP_ZENUP 4
193 #define WOMAP_ZENDOWN 8
194 // #define WOMAP_MIST 16 /* Deprecated */
197 #define WO_DS_EXPAND (1<<0)
198 /* NOTE: this must have the same value as MA_DS_SHOW_TEXS,
199 * otherwise anim-editors will not read correctly
201 #define WO_DS_SHOW_TEXS (1<<2)