Blender  V2.93
DNA_object_fluidsim_types.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2004-2005 by Blender Foundation
17  * All rights reserved.
18  */
19 
24 #pragma once
25 
26 #include "DNA_ID.h"
27 #include "DNA_defs.h"
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
33 struct Ipo;
34 
35 typedef struct FluidVertexVelocity {
36  float vel[3];
38 
39 typedef struct FluidsimSettings {
42  /* threadcont the calculation is done with */
43  int threads;
44  char _pad1[4];
45  /* domain, fluid or obstacle */
46  short type;
47  /* display advanced options in fluid sim tab (on=1, off=0)*/
49 
50  /* domain object settings */
51  /* resolutions */
54  /* size of the domain in real units (meters along largest resolution x, y, z extent) */
55  float realsize;
56  /* show original meshes, preview or final sim */
59 
60  /* fluid properties */
62  short viscosityMode DNA_DEPRECATED;
64  /* gravity strength */
65  float grav[3];
66  /* anim start end time (in seconds) */
68  /* bake start end time (in blender frames) */
70  /* offset for baked frames */
72  char _pad2[4];
73  /* g star param (LBM compressibility) */
74  float gstar;
75  /* activate refinement? */
76  int maxRefine;
77 
78  /* fluid object type settings */
79  /* gravity strength */
81 
82  /* store output path, and file prefix for baked fluid surface */
83  /* strlens; 256= FILE_MAXFILE, 768= FILE_MAXDIR */
84  char surfdataPath[1024];
85 
86  /* store start coords of axis aligned bounding box together with size */
87  /* values are inited during derived mesh display */
88  float bbStart[3], bbSize[3];
89 
90  /* animated params */
91  struct Ipo *ipo;
92 
93  /* additional flags depending on the type, lower short contains flags
94  * to check validity, higher short additional flags */
95  short typeFlags;
101 
102  /* boundary "stickiness" for part slip values */
104 
105  /* number of tracers to generate */
107  /* particle generation - on if >0, then determines amount (experimental...) */
109  /* smooth fluid surface? */
114  int flag;
115 
118  /* testing vars */
120 
124  int totvert;
125 
126  /* Fluid control settings */
128  float cpsTimeEnd;
129  float cpsQuality;
130 
135 
137 
139  float animRate;
141 
142 /* ob->fluidsimSettings defines */
143 #define OB_FLUIDSIM_ENABLE 1
144 #define OB_FLUIDSIM_DOMAIN 2
145 #define OB_FLUIDSIM_FLUID 4
146 #define OB_FLUIDSIM_OBSTACLE 8
147 #define OB_FLUIDSIM_INFLOW 16
148 #define OB_FLUIDSIM_OUTFLOW 32
149 #define OB_FLUIDSIM_PARTICLE 64
150 #define OB_FLUIDSIM_CONTROL 128
151 
152 #define OB_TYPEFLAG_START 7
153 #define OB_FSGEO_THIN (1 << (OB_TYPEFLAG_START + 1))
154 #define OB_FSBND_NOSLIP (1 << (OB_TYPEFLAG_START + 2))
155 #define OB_FSBND_PARTSLIP (1 << (OB_TYPEFLAG_START + 3))
156 #define OB_FSBND_FREESLIP (1 << (OB_TYPEFLAG_START + 4))
157 #define OB_FSINFLOW_LOCALCOORD (1 << (OB_TYPEFLAG_START + 5))
158 
159 /* surface generation flag (part of enabling chapter 6 of
160  * "Free Surface Flows with Moving and Deforming Objects for LBM") */
161 #define OB_FSSG_NOOBS (1 << (OB_TYPEFLAG_START + 6))
162 
163 // guiDisplayMode particle flags
164 #define OB_FSDOM_GEOM 1
165 #define OB_FSDOM_PREVIEW 2
166 #define OB_FSDOM_FINAL 3
167 #define OB_FSPART_BUBBLE (1 << 1)
168 #define OB_FSPART_DROP (1 << 2)
169 #define OB_FSPART_NEWPART (1 << 3)
170 #define OB_FSPART_FLOAT (1 << 4)
171 #define OB_FSPART_TRACER (1 << 5)
172 
173 // new fluid bit flags for fss->flags
174 #define OB_FLUIDSIM_REVERSE (1 << 0)
175 #define OB_FLUIDSIM_ACTIVE (1 << 1)
176 #define OB_FLUIDSIM_OVERRIDE_TIME (1 << 2)
177 
178 #ifdef __cplusplus
179 }
180 #endif
ID and Library types, which are fundamental for sdna.
struct FluidsimSettings FluidsimSettings
struct FluidVertexVelocity FluidVertexVelocity
short viscosityMode DNA_DEPRECATED
struct FluidsimModifierData * fmd
struct FluidVertexVelocity * meshVelocities