diff options
author | Oliver Schinagl <oliver@schinagl.nl> | 2008-01-10 21:10:50 (GMT) |
---|---|---|
committer | Oliver Schinagl <oliver@schinagl.nl> | 2008-01-10 21:10:50 (GMT) |
commit | 37e4a2a9857669837417b0b5e6ba35248bec9030 (patch) | |
tree | 36d3cccee52404e450f1fc76051a9cf01aab89cb /Smoke/flowvis.c | |
parent | dcab21f30e9c451bfc2b7e65d90323b5e11a8612 (diff) | |
download | 2iv35-37e4a2a9857669837417b0b5e6ba35248bec9030.zip 2iv35-37e4a2a9857669837417b0b5e6ba35248bec9030.tar.gz 2iv35-37e4a2a9857669837417b0b5e6ba35248bec9030.tar.bz2 |
moved history to flowvis "smoke history"
Diffstat (limited to 'Smoke/flowvis.c')
-rw-r--r-- | Smoke/flowvis.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Smoke/flowvis.c b/Smoke/flowvis.c index 151d80b..3c6d637 100644 --- a/Smoke/flowvis.c +++ b/Smoke/flowvis.c @@ -6,6 +6,7 @@ #include <rfftw.h> +#include "fluids.h" #include "funcs.h" #include "palette.h" @@ -21,7 +22,22 @@ static int flowvis_colormap = PALETTE_BLACKWHITE; static float flowvis_alpha = 1.0f; static fftw_real *flowvis_frame; +static fftw_real **flowvis_history; +static int hisdex = 0; + + +void flowvis_set_hisdex(int arg) +{ + int idx = (fluids_get_hisdex() + 1) % HISTORY_SIZE; + + hisdex = (arg + idx) % HISTORY_SIZE; +} + +int flowvis_get_hisdex(void) +{ + return hisdex; +} void flowvis_set_render(int render_flowvis) { @@ -73,6 +89,15 @@ fftw_real *flowvis_get_frame(void) return flowvis_frame; } +void flowvis_set_history(fftw_real **history) +{ + flowvis_history = history; +} + +fftw_real *flowvis_get_history(int hisdex) +{ + return flowvis_history[hisdex]; +} struct color4f flowvis_get_color(float value) { |