summaryrefslogtreecommitdiffstats
path: root/Smoke/flowvis.c
diff options
context:
space:
mode:
authorOliver Schinagl <oliver@schinagl.nl>2007-12-20 11:33:31 (GMT)
committerOliver Schinagl <oliver@schinagl.nl>2007-12-20 11:33:31 (GMT)
commit6e60076c7bf4b928da25ab37d59b8b38a1588eab (patch)
treea8774cea1d9c2c5b90c0a81ec73a3ba75ace8933 /Smoke/flowvis.c
parent4b322240380d8351bb68462880d13e0b92769e26 (diff)
download2iv35-6e60076c7bf4b928da25ab37d59b8b38a1588eab.zip
2iv35-6e60076c7bf4b928da25ab37d59b8b38a1588eab.tar.gz
2iv35-6e60076c7bf4b928da25ab37d59b8b38a1588eab.tar.bz2
added setteable alpha's and frame pointers
Diffstat (limited to 'Smoke/flowvis.c')
-rw-r--r--Smoke/flowvis.c28
1 files changed, 27 insertions, 1 deletions
diff --git a/Smoke/flowvis.c b/Smoke/flowvis.c
index ed95732..b6d5c77 100644
--- a/Smoke/flowvis.c
+++ b/Smoke/flowvis.c
@@ -4,6 +4,8 @@
#endif
+#include <rfftw.h>
+
#include "funcs.h"
#include "palette.h"
@@ -16,6 +18,10 @@ static int flowvis_num_colors = PALETTE_MAXCOLORS;
static int flowvis_colormap = PALETTE_BLACKWHITE;
+static int flowvis_alpha = 1.0f;
+
+static fftw_real *flowvis_frame;
+
void flowvis_set_render(int render_flowvis)
{
@@ -47,13 +53,33 @@ int flowvis_get_colormap(void)
return flowvis_colormap;
}
+void flowvis_set_alpha(int alpha)
+{
+ flowvis_alpha = alpha;
+}
+
+int flowvis_get_alpha(void)
+{
+ return flowvis_alpha;
+}
+
+void flowvis_set_frame(fftw_real *frame)
+{
+ flowvis_frame = frame;
+}
+
+fftw_real *flowvis_get_frame(void)
+{
+ return flowvis_frame;
+}
+
struct color4f flowvis_get_color(float value)
{
struct color4f return_value;
return_value = set_palette(flowvis_colormap, value, flowvis_num_colors);
- return_value.a = 1.0f;
+ return_value.a = flowvis_alpha;
return return_value;
}