Blender  V3.3
DNA_object_fluidsim_types.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2004-2005 Blender Foundation. All rights reserved. */
3 
8 #pragma once
9 
10 #include "DNA_ID.h"
11 #include "DNA_defs.h"
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
17 struct Ipo;
18 
19 typedef struct FluidVertexVelocity {
20  float vel[3];
22 
23 typedef struct FluidsimSettings {
26  /* threadcont the calculation is done with */
27  int threads;
28  char _pad1[4];
29  /* domain, fluid or obstacle */
30  short type;
31  /* Display advanced options in fluid sim tab (on=1, off=0). */
33 
34  /* domain object settings */
35  /* resolutions */
38  /* size of the domain in real units (meters along largest resolution x, y, z extent) */
39  float realsize;
40  /* show original meshes, preview or final sim */
43 
44  /* fluid properties */
46  short viscosityMode DNA_DEPRECATED;
48  /* gravity strength */
49  float grav[3];
50  /* anim start end time (in seconds) */
52  /* bake start end time (in blender frames) */
54  /* offset for baked frames */
56  char _pad2[4];
57  /* g star param (LBM compressibility) */
58  float gstar;
59  /* activate refinement? */
60  int maxRefine;
61 
62  /* fluid object type settings */
63  /* gravity strength */
65 
66  /* store output path, and file prefix for baked fluid surface */
67  /* strlens; 256= FILE_MAXFILE, 768= FILE_MAXDIR */
68  char surfdataPath[1024];
69 
70  /* store start coords of axis aligned bounding box together with size */
71  /* values are inited during derived mesh display */
72  float bbStart[3], bbSize[3];
73 
74  /* animated params */
75  struct Ipo *ipo;
76 
77  /* additional flags depending on the type, lower short contains flags
78  * to check validity, higher short additional flags */
79  short typeFlags;
85 
86  /* boundary "stickiness" for part slip values */
88 
89  /* number of tracers to generate */
91  /* particle generation - on if >0, then determines amount (experimental...) */
93  /* smooth fluid surface? */
98  int flag;
99 
102  /* testing vars */
104 
108  int totvert;
109 
110  /* Fluid control settings */
112  float cpsTimeEnd;
113  float cpsQuality;
114 
119 
121 
123  float animRate;
125 
126 /* ob->fluidsimSettings defines */
127 #define OB_FLUIDSIM_ENABLE 1
128 #define OB_FLUIDSIM_DOMAIN 2
129 #define OB_FLUIDSIM_FLUID 4
130 #define OB_FLUIDSIM_OBSTACLE 8
131 #define OB_FLUIDSIM_INFLOW 16
132 #define OB_FLUIDSIM_OUTFLOW 32
133 #define OB_FLUIDSIM_PARTICLE 64
134 #define OB_FLUIDSIM_CONTROL 128
135 
136 #define OB_TYPEFLAG_START 7
137 #define OB_FSGEO_THIN (1 << (OB_TYPEFLAG_START + 1))
138 #define OB_FSBND_NOSLIP (1 << (OB_TYPEFLAG_START + 2))
139 #define OB_FSBND_PARTSLIP (1 << (OB_TYPEFLAG_START + 3))
140 #define OB_FSBND_FREESLIP (1 << (OB_TYPEFLAG_START + 4))
141 #define OB_FSINFLOW_LOCALCOORD (1 << (OB_TYPEFLAG_START + 5))
142 
143 /* surface generation flag (part of enabling chapter 6 of
144  * "Free Surface Flows with Moving and Deforming Objects for LBM") */
145 #define OB_FSSG_NOOBS (1 << (OB_TYPEFLAG_START + 6))
146 
147 // guiDisplayMode particle flags
148 #define OB_FSDOM_GEOM 1
149 #define OB_FSDOM_PREVIEW 2
150 #define OB_FSDOM_FINAL 3
151 #define OB_FSPART_BUBBLE (1 << 1)
152 #define OB_FSPART_DROP (1 << 2)
153 #define OB_FSPART_NEWPART (1 << 3)
154 #define OB_FSPART_FLOAT (1 << 4)
155 #define OB_FSPART_TRACER (1 << 5)
156 
157 // new fluid bit flags for fss->flags
158 #define OB_FLUIDSIM_REVERSE (1 << 0)
159 #define OB_FLUIDSIM_ACTIVE (1 << 1)
160 #define OB_FLUIDSIM_OVERRIDE_TIME (1 << 2)
161 
162 #ifdef __cplusplus
163 }
164 #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