2 * blenlib/DNA_world_types.h (mar-2001 nzc)
6 * ***** BEGIN GPL LICENSE BLOCK *****
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software Foundation,
20 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
23 * All rights reserved.
25 * The Original Code is: all of this file.
27 * Contributor(s): none yet.
29 * ***** END GPL LICENSE BLOCK *****
31 #ifndef DNA_WORLD_TYPES_H
32 #define DNA_WORLD_TYPES_H
35 #include "DNA_scriptlink_types.h"
47 * World defines general modeling data such as a background fill,
48 * gravity, color model, stars, etc. It mixes game-data, rendering
49 * data and modeling data. */
50 typedef struct World {
52 struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */
54 short colormodel, totex;
55 short texact, mistype;
57 /* TODO - hork, zenk and ambk are not used, should remove at some point (Campbell) */
58 float horr, horg, horb, hork;
59 float zenr, zeng, zenb, zenk;
60 float ambr, ambg, ambb, ambk;
65 * Exposure= mult factor. unused now, but maybe back later. Kept in to be upward compat.
66 * New is exp/range control. linfac & logfac are constants... don't belong in
67 * file, but allocating 8 bytes for temp mem isnt useful either.
69 float exposure, exp, range;
73 * Gravitation constant for the game world
75 float gravity; // moved to scene->gamedata in 2.5
78 * Radius of the activity bubble, in Manhattan length. Objects
79 * outside the box are activity-culled. */
80 float activityBoxRadius; // moved to scene->gamedata in 2.5
87 * bit 2: (reserved) depth of field
88 * bit 3: (gameengine): Activity culling is enabled.
89 * bit 4: ambient occlusion
90 * bit 5: (gameengine) : enable Bullet DBVT tree for view frustrum culling
92 short mode; // partially moved to scene->gamedata in 2.5
93 short occlusionRes; /* resolution of occlusion Z buffer in pixel */ // moved to scene->gamedata in 2.5
94 short physicsEngine; /* here it's aligned */ // moved to scene->gamedata in 2.5
95 short ticrate, maxlogicstep, physubstep, maxphystep; // moved to scene->gamedata in 2.5
97 float misi, miststa, mistdist, misthi;
99 float starr, starg, starb, stark;
100 float starsize, starmindist;
101 float stardist, starcolnoise;
103 /* unused now: DOF */
104 short dofsta, dofend, dofmin, dofmax;
106 /* ambient occlusion */
107 float aodist, aodistfac, aoenergy, aobias;
108 short aomode, aosamp, aomix, aocolor;
109 float ao_adapt_thresh, ao_adapt_speed_fac;
110 float ao_approx_error, ao_approx_correction;
111 short ao_samp_method, ao_gather_method, ao_approx_passes;
113 /* assorted settings (in the middle of ambient occlusion settings for padding reasons) */
116 /* ambient occlusion (contd...) */
117 float *aosphere, *aotables;
120 struct Ipo *ipo; // XXX depreceated... old animation system
121 struct MTex *mtex[18]; /* MAX_MTEX */
124 struct PreviewImage *preview;
126 ScriptLink scriptlink;
130 /* **************** WORLD ********************* */
133 #define WO_SKYBLEND 1
135 #define WO_SKYPAPER 4
144 #define WO_ACTIVITY_CULLING 8
145 #define WO_AMB_OCC 16
146 #define WO_DBVT_CULLING 32
151 #define WO_AOADDSUB 2
153 /* ao_samp_method - methods for sampling the AO hemi */
154 #define WO_AOSAMP_CONSTANT 0
155 #define WO_AOSAMP_HALTON 1
156 #define WO_AOSAMP_HAMMERSLEY 2
158 /* aomode (use distances & random sampling modes) */
160 #define WO_AORNDSMP 2
165 #define WO_AOSKYCOL 1
166 #define WO_AOSKYTEX 2
168 /* ao_gather_method */
169 #define WO_AOGATHER_RAYTRACE 0
170 #define WO_AOGATHER_APPROX 1
172 /* texco (also in DNA_material_types.h) */
173 #define TEXCO_ANGMAP 64
174 #define TEXCO_H_SPHEREMAP 256
175 #define TEXCO_H_TUBEMAP 1024
178 #define WOMAP_BLEND 1
179 #define WOMAP_HORIZ 2
180 #define WOMAP_ZENUP 4
181 #define WOMAP_ZENDOWN 8
182 #define WOMAP_MIST 16
185 #define WO_DS_EXPAND (1<<0)