|
Blender
V2.59
|
00001 /* 00002 * $Id: DNA_smoke_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) 2006 by NaN Holding BV. 00021 * All rights reserved. 00022 * 00023 * The Original Code is: all of this file. 00024 * 00025 * Contributor(s): Daniel Genrich (Genscher) 00026 * 00027 * ***** END GPL LICENSE BLOCK ***** 00028 */ 00029 #ifndef DNA_SMOKE_TYPES_H 00030 #define DNA_SMOKE_TYPES_H 00031 00036 /* flags */ 00037 #define MOD_SMOKE_HIGHRES (1<<1) /* enable high resolution */ 00038 #define MOD_SMOKE_DISSOLVE (1<<2) /* let smoke dissolve */ 00039 #define MOD_SMOKE_DISSOLVE_LOG (1<<3) /* using 1/x for dissolve */ 00040 00041 #define MOD_SMOKE_HIGH_SMOOTH (1<<5) /* smoothens high res emission*/ 00042 #define MOD_SMOKE_FILE_LOAD (1<<6) /* flag for file load */ 00043 00044 /* noise */ 00045 #define MOD_SMOKE_NOISEWAVE (1<<0) 00046 #define MOD_SMOKE_NOISEFFT (1<<1) 00047 #define MOD_SMOKE_NOISECURL (1<<2) 00048 /* viewsettings */ 00049 #define MOD_SMOKE_VIEW_SHOWBIG (1<<0) 00050 00051 /* cache compression */ 00052 #define SM_CACHE_LIGHT 0 00053 #define SM_CACHE_HEAVY 1 00054 00055 /* domain border collision */ 00056 #define SM_BORDER_OPEN 0 00057 #define SM_BORDER_VERTICAL 1 00058 #define SM_BORDER_CLOSED 2 00059 00060 typedef struct SmokeDomainSettings { 00061 struct SmokeModifierData *smd; /* for fast RNA access */ 00062 struct FLUID_3D *fluid; 00063 struct Group *fluid_group; 00064 struct Group *eff_group; // UNUSED 00065 struct Group *coll_group; // collision objects group 00066 struct WTURBULENCE *wt; // WTURBULENCE object, if active 00067 struct GPUTexture *tex; 00068 struct GPUTexture *tex_wt; 00069 struct GPUTexture *tex_shadow; 00070 float *shadow; 00071 float p0[3]; /* start point of BB */ 00072 float p1[3]; /* end point of BB */ 00073 float dx; /* edge length of one cell */ 00074 float omega; /* smoke color - from 0 to 1 */ 00075 float temp; /* fluid temperature */ 00076 float tempAmb; /* ambient temperature */ 00077 float alpha; 00078 float beta; 00079 int res[3]; /* domain resolution */ 00080 int amplify; /* wavelet amplification */ 00081 int maxres; /* longest axis on the BB gets this resolution assigned */ 00082 int flags; /* show up-res or low res, etc */ 00083 int pad; 00084 int viewsettings; 00085 short noise; /* noise type: wave, curl, anisotropic */ 00086 short diss_percent; 00087 int diss_speed;/* in frames */ 00088 float strength; 00089 int res_wt[3]; 00090 float dx_wt; 00091 int v3dnum; 00092 int cache_comp; 00093 int cache_high_comp; 00094 00095 /* Smoke uses only one cache from now on (index [0]), but keeping the array for now for reading old files. */ 00096 struct PointCache *point_cache[2]; /* definition is in DNA_object_force.h */ 00097 struct ListBase ptcaches[2]; 00098 struct EffectorWeights *effector_weights; 00099 int border_collisions; /* How domain border collisions are handled */ 00100 float time_scale; 00101 float vorticity; 00102 int pad2; 00103 } SmokeDomainSettings; 00104 00105 00106 /* inflow / outflow */ 00107 00108 /* type */ 00109 #define MOD_SMOKE_FLOW_TYPE_OUTFLOW (1<<1) 00110 00111 /* flags */ 00112 #define MOD_SMOKE_FLOW_ABSOLUTE (1<<1) /*old style emission*/ 00113 #define MOD_SMOKE_FLOW_INITVELOCITY (1<<2) /* passes particles speed to 00114 the smoke*/ 00115 00116 00117 typedef struct SmokeFlowSettings { 00118 struct SmokeModifierData *smd; /* for fast RNA access */ 00119 struct ParticleSystem *psys; 00120 float density; 00121 float temp; /* delta temperature (temp - ambient temp) */ 00122 float velocity[2]; /* UNUSED, velocity taken from particles */ 00123 float vel_multi; // Multiplier for particle velocity 00124 float vgrp_heat_scale[2]; /* min and max scaling for vgroup_heat */ 00125 short vgroup_flow; /* where inflow/outflow happens - red=1=action */ 00126 short vgroup_density; 00127 short vgroup_heat; 00128 short type; /* inflow =0 or outflow = 1 */ 00129 int flags; /* absolute emission etc*/ 00130 } SmokeFlowSettings; 00131 00132 /* 00133 struct BVHTreeFromMesh *bvh; 00134 float mat[4][4]; 00135 float mat_old[4][4]; 00136 */ 00137 00138 /* collision objects (filled with smoke) */ 00139 typedef struct SmokeCollSettings { 00140 struct SmokeModifierData *smd; /* for fast RNA access */ 00141 struct BVHTree *bvhtree; /* bounding volume hierarchy for this cloth object */ 00142 struct DerivedMesh *dm; 00143 float *points; 00144 float *points_old; 00145 float *vel; 00146 float mat[4][4]; 00147 float mat_old[4][4]; 00148 int numpoints; 00149 int numverts; // check if mesh changed 00150 short type; // static = 0, rigid = 1, dynamic = 2 00151 short pad; 00152 int pad2; 00153 } SmokeCollSettings; 00154 00155 #endif