2
* $Id: DNA_smoke_types.h 26841 2010-02-12 13:34:04Z campbellbarton $
4
* ***** BEGIN GPL LICENSE BLOCK *****
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License
8
* as published by the Free Software Foundation; either version 2
9
* of the License, or (at your option) any later version.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software Foundation,
18
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20
* The Original Code is Copyright (C) 2006 by NaN Holding BV.
21
* All rights reserved.
23
* The Original Code is: all of this file.
25
* Contributor(s): Daniel Genrich (Genscher)
27
* ***** END GPL LICENSE BLOCK *****
29
#ifndef DNA_SMOKE_TYPES_H
30
#define DNA_SMOKE_TYPES_H
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) 2006 by NaN Holding BV.
19
* All rights reserved.
21
* The Original Code is: all of this file.
23
* Contributor(s): Daniel Genrich (Genscher)
25
* ***** END GPL LICENSE BLOCK *****
28
/** \file DNA_smoke_types.h
32
#ifndef __DNA_SMOKE_TYPES_H__
33
#define __DNA_SMOKE_TYPES_H__
33
36
#define MOD_SMOKE_HIGHRES (1<<1) /* enable high resolution */
34
37
#define MOD_SMOKE_DISSOLVE (1<<2) /* let smoke dissolve */
35
38
#define MOD_SMOKE_DISSOLVE_LOG (1<<3) /* using 1/x for dissolve */
36
#define MOD_SMOKE_INITVELOCITY (1<<4) /* passes particles speed to
40
#define MOD_SMOKE_HIGH_SMOOTH (1<<5) /* smoothens high res emission*/
41
#define MOD_SMOKE_FILE_LOAD (1<<6) /* flag for file load */
40
44
#define MOD_SMOKE_NOISEWAVE (1<<0)
93
108
#define MOD_SMOKE_FLOW_TYPE_OUTFLOW (1<<1)
111
#define MOD_SMOKE_FLOW_ABSOLUTE (1<<1) /*old style emission*/
112
#define MOD_SMOKE_FLOW_INITVELOCITY (1<<2) /* passes particles speed to the smoke */
95
114
typedef struct SmokeFlowSettings {
96
115
struct SmokeModifierData *smd; /* for fast RNA access */
97
116
struct ParticleSystem *psys;
99
118
float temp; /* delta temperature (temp - ambient temp) */
100
float velocity[3]; /* UNUSED, velocity taken from particles */
119
float velocity[2]; /* UNUSED, velocity taken from particles */
120
float vel_multi; // Multiplier for particle velocity
101
121
float vgrp_heat_scale[2]; /* min and max scaling for vgroup_heat */
102
122
short vgroup_flow; /* where inflow/outflow happens - red=1=action */
103
123
short vgroup_density;
104
124
short vgroup_heat;
105
125
short type; /* inflow =0 or outflow = 1 */
126
int flags; /* absolute emission etc*/
107
127
} SmokeFlowSettings;
110
struct BVHTreeFromMesh *bvh;
130
// struct BVHTreeFromMesh *bvh;
132
// float mat_old[4][4];
115
134
/* collision objects (filled with smoke) */
116
135
typedef struct SmokeCollSettings {
117
136
struct SmokeModifierData *smd; /* for fast RNA access */
118
137
struct BVHTree *bvhtree; /* bounding volume hierarchy for this cloth object */
119
struct DerivedMesh *dm;
139
// struct DerivedMesh *dm; // UNUSED, ifdef'd in code for now.
121
141
float *points_old;