From 890f2eba8e594f345600b6e97de4d35d22b9b31f Mon Sep 17 00:00:00 2001 From: Oliver Schinagl Date: Thu, 10 Jan 2008 19:11:54 +0000 Subject: removed old global junk --- Smoke/fluids.c | 27 --------------------------- Smoke/fluids.h | 13 ------------- Smoke/gtk.c | 12 ------------ Smoke/interact.c | 1 + Smoke/renderer_gl.c | 4 ++-- Smoke/smoke.bin | Bin 652505 -> 651854 bytes 6 files changed, 3 insertions(+), 54 deletions(-) diff --git a/Smoke/fluids.c b/Smoke/fluids.c index 83463e7..89308b0 100644 --- a/Smoke/fluids.c +++ b/Smoke/fluids.c @@ -40,12 +40,6 @@ struct point *normal_array; //used for normal vectors rfftwnd_plan plan_rc, plan_cr; //simulation domain discretization int winWidth, winHeight; //size of the graphics window, in pixels -int color_dir = 0; //use direction color-coding or not -float vec_scale = 1000; //scaling of hedgehogs -int vis_dataset = DATASET_RHO; -int active_slider = 0; -int glyph_scalar = SCALAR_RHO; -int glyph_vector = VECTOR_VEL; static int fluids_calculate = TRUE; static int DIM; //size of simulation grid @@ -319,23 +313,7 @@ void calculate_height_plots(void) int i; for (i = 0; i < DIM * DIM; i++) { - switch (vis_dataset) - { - case DATASET_FORCE: - height_array[i] = vec_len2f(fx[i], fy[i]) * 100; - break; - case DATASET_VEL: - height_array[i] = vec_len2f(vx[i], vy[i]) * 5000; - break; - case DATASET_RHO: height_array[i] = rho[i] * 16; - break; - default: - case DATASET_DIVV: - case DATASET_DIVF: - height_array[i] = 0.0f; - break; - } } } @@ -569,11 +547,6 @@ void fluids_insert_smoke(int x, int y) lx = x; ly = y; } -//------ INTERACTION CODE STARTS HERE ----------------------------------------------------------------- -void select_dataset(int arg) { vis_dataset = arg; } -void set_glyph_scalar(int arg) { glyph_scalar = arg; } -void set_glyph_vector(int arg) { glyph_vector = arg; } - // getters and setters int fluids_get_var_dim(void) diff --git a/Smoke/fluids.h b/Smoke/fluids.h index 22bfa83..32082db 100644 --- a/Smoke/fluids.h +++ b/Smoke/fluids.h @@ -32,18 +32,8 @@ extern int frame_index; #define HISTORY_SIZE 80 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 vis_dataset; -extern int glyph_scalar; -extern int glyph_vector; ////////////////// - -void select_dataset(int arg); -void set_glyph_scalar(int arg); -void set_glyph_vector(int arg); - int fluids_get_var_dim(void); void fluids_set_var_dim(int); @@ -82,9 +72,6 @@ struct vis_data_arrays { }; -extern int active_slider; - - void fluids_set_calculate(int calculate); int fluids_get_calculate(void); diff --git a/Smoke/gtk.c b/Smoke/gtk.c index 755d821..b376b3c 100644 --- a/Smoke/gtk.c +++ b/Smoke/gtk.c @@ -416,18 +416,6 @@ key_press_event (GtkWidget *widget, dt += 0.001; break; - case GDK_c: - color_dir = (color_dir +1) %3; - break; - - case GDK_s: - vec_scale *= 0.8; - break; - - case GDK_S: - vec_scale *= 1.2; - break; - case GDK_v: visc *= 0.2; break; diff --git a/Smoke/interact.c b/Smoke/interact.c index 7671cb8..5c67963 100644 --- a/Smoke/interact.c +++ b/Smoke/interact.c @@ -25,6 +25,7 @@ int prev_rot_my = 0; int prev_rot_mz = 0; +static int active_slider = 0; int rescale_to_winwidth(float value) { diff --git a/Smoke/renderer_gl.c b/Smoke/renderer_gl.c index a312f3d..15cff39 100644 --- a/Smoke/renderer_gl.c +++ b/Smoke/renderer_gl.c @@ -475,8 +475,8 @@ static void render_glyph(GLUquadricObj *qobj, float x_value, float y_value, floa y0 = hn + (fftw_real)j * hn; z0 = 16.0f; - x1 = x0 + (vec_scale * x_value)/4; - y1 = y0 + (vec_scale * y_value)/4; + x1 = x0 + (x_value *1000)/4; + y1 = y0 + (y_value *1000)/4; z1 = 0.0f; // inner product diff --git a/Smoke/smoke.bin b/Smoke/smoke.bin index 47111c1..70aebaf 100755 Binary files a/Smoke/smoke.bin and b/Smoke/smoke.bin differ -- cgit v0.12