summaryrefslogtreecommitdiffstats
path: root/Smoke/fluids.h
diff options
context:
space:
mode:
authorOliver Schinagl <oliver@schinagl.nl>2007-10-25 13:32:58 (GMT)
committerOliver Schinagl <oliver@schinagl.nl>2007-10-25 13:32:58 (GMT)
commit2f019eddfc78e7a03110ee52437aa4fb3e41c588 (patch)
tree13be4b850a3da9a5cedfe132d4c95aa980c0c7e8 /Smoke/fluids.h
parentd6d4a555d93bca7b0855144c28b591c1773aa9fe (diff)
download2iv35-2f019eddfc78e7a03110ee52437aa4fb3e41c588.zip
2iv35-2f019eddfc78e7a03110ee52437aa4fb3e41c588.tar.gz
2iv35-2f019eddfc78e7a03110ee52437aa4fb3e41c588.tar.bz2
tja ..
Diffstat (limited to 'Smoke/fluids.h')
-rw-r--r--Smoke/fluids.h81
1 files changed, 81 insertions, 0 deletions
diff --git a/Smoke/fluids.h b/Smoke/fluids.h
new file mode 100644
index 0000000..ffdd618
--- /dev/null
+++ b/Smoke/fluids.h
@@ -0,0 +1,81 @@
+//--- SIMULATION PARAMETERS ------------------------------------------------------------------------
+
+extern const int DIM; //size of simulation grid
+extern double dt; //simulation time step
+extern float visc; //fluid viscosity
+extern fftw_real *vx, *vy; //(vx,vy) = velocity field at the current moment
+extern fftw_real *vx0, *vy0; //(vx0,vy0) = velocity field at the previous moment
+extern fftw_real *fx, *fy; //(fx,fy) = user-controlled simulation forces, steered with the mouse
+extern fftw_real *rho, *rho0; //smoke density at the current (rho) and previous (rho0) moment
+extern rfftwnd_plan plan_rc, plan_cr; //simulation domain discretization
+
+//--- VISUALIZATION PARAMETERS ---------------------------------------------------------------------
+#define DATASET_RHO 0
+#define DATASET_VEL 1
+#define DATASET_FORCE 2
+
+#define MOUSE_SMOKE 0
+#define MOUSE_SCALE_MIN 1
+#define MOUSE_SCALE_MAX 2
+#define MOUSE_CLAMP_MIN 3
+#define MOUSE_CLAMP_MAX 4
+
+#define GLYPHS_OFF 0
+#define GLYPHS_ON 1
+
+#define SCALAR_RHO 0
+#define SCALAR_VEL 1
+#define SCALAR_FORCE 2
+
+#define VECTOR_VEL 0
+#define VECTOR_FORCE 1
+
+extern int winWidth, winHeight; //size of the graphics window, in pixels
+extern int color_dir; //use direction color-coding or not
+extern float vec_scale; //scaling of hedgehogs
+extern int draw_smoke; //draw the smoke or not
+extern int draw_vecs; //draw the vector field or not
+extern const int COLOR_BLACKWHITE; //different types of color mapping: black-and-white, rainbow, banded
+extern const int COLOR_RAINBOW;
+extern const int COLOR_BANDS;
+extern const int COLOR_WILRIK;
+extern const int COLOR_OLIVER;
+extern int scalar_col; //method for scalar coloring
+extern int frozen; //toggles on/off the animation
+extern int olivers_color;
+extern float clamp_min;
+extern float clamp_max;
+extern int autoscale;
+extern float scale_min;
+extern float scale_max;
+extern int vis_dataset;
+extern int mousebutton;
+extern int mousebuttonstate;
+extern int active_slider;
+extern int use_glyphs;
+extern int glyph_scalar;
+extern int glyph_vector;
+extern int draw_options;
+
+void init_simulation(int n);
+
+void visualize(void);
+
+int rescale_to_winwidth(float value);
+
+void drag(int mx, int my);
+
+void click(int button, int state, int mx, int my);
+
+void keyboard(unsigned char key, int x, int y);
+
+void calculate_one_simulation_step(void);
+
+void selectColor(int arg);
+void selectOliverscolor(int arg);
+void select_dataset(int arg);
+void set_autoscale(int arg);
+void show_options(void);
+void set_glyph_usage(void);
+void set_glyph_scalar(int arg);
+void set_glyph_vector(int arg);