diff options
author | Oliver Schinagl <oliver@schinagl.nl> | 2007-12-20 11:33:31 (GMT) |
---|---|---|
committer | Oliver Schinagl <oliver@schinagl.nl> | 2007-12-20 11:33:31 (GMT) |
commit | 6e60076c7bf4b928da25ab37d59b8b38a1588eab (patch) | |
tree | a8774cea1d9c2c5b90c0a81ec73a3ba75ace8933 | |
parent | 4b322240380d8351bb68462880d13e0b92769e26 (diff) | |
download | 2iv35-6e60076c7bf4b928da25ab37d59b8b38a1588eab.zip 2iv35-6e60076c7bf4b928da25ab37d59b8b38a1588eab.tar.gz 2iv35-6e60076c7bf4b928da25ab37d59b8b38a1588eab.tar.bz2 |
added setteable alpha's and frame pointers
-rw-r--r-- | Smoke/colormap.h | 4 | ||||
-rw-r--r-- | Smoke/divergence.c | 29 | ||||
-rw-r--r-- | Smoke/divergence.h | 6 | ||||
-rw-r--r-- | Smoke/flowvis.c | 28 | ||||
-rw-r--r-- | Smoke/flowvis.h | 6 | ||||
-rw-r--r-- | Smoke/glyphs.c | 28 | ||||
-rw-r--r-- | Smoke/glyphs.h | 6 | ||||
-rw-r--r-- | Smoke/heightplots.c | 23 | ||||
-rw-r--r-- | Smoke/heightplots.h | 6 | ||||
-rw-r--r-- | Smoke/isolines.c | 28 | ||||
-rw-r--r-- | Smoke/isolines.h | 6 | ||||
-rwxr-xr-x | Smoke/smoke.bin | bin | 619698 -> 615958 bytes | |||
-rw-r--r-- | Smoke/streamlines.c | 28 | ||||
-rw-r--r-- | Smoke/streamlines.h | 6 |
14 files changed, 197 insertions, 7 deletions
diff --git a/Smoke/colormap.h b/Smoke/colormap.h index 8fcfc30..cd9df14 100644 --- a/Smoke/colormap.h +++ b/Smoke/colormap.h @@ -7,13 +7,15 @@ int colormap_get_num_colors(void); void colormap_set_colormap(int colormap);
int colormap_get_colormap(void);
+void colormap_set_alpha(int alpha);
+int colormap_get_alpha(void);
+
void colormap_set_scaling(int scaling);
int colormap_get_scaling(void);
void colormap_set_clamping(int clamping);
int colormap_get_clamping(void);
-
void colormap_set_scale_min(float min_scale);
float colormap_get_scale_min(void);
diff --git a/Smoke/divergence.c b/Smoke/divergence.c index 05fe29e..516aa8d 100644 --- a/Smoke/divergence.c +++ b/Smoke/divergence.c @@ -4,6 +4,8 @@ #endif +#include <rfftw.h> + #include "funcs.h" #include "palette.h" @@ -16,6 +18,11 @@ static int divergence_num_colors = PALETTE_MAXCOLORS; static int divergence_colormap = PALETTE_BLACKWHITE; +static int divergence_alpha = 1.0f; + +static fftw_real *divergence_frame; + + void divergence_set_render(int render_divergence) { @@ -47,13 +54,33 @@ int divergence_get_colormap(void) return divergence_colormap; } +void divergence_set_alpha(int alpha) +{ + divergence_alpha = alpha; +} + +int divergence_get_alpha(void) +{ + return divergence_alpha; +} + +void divergence_set_frame(fftw_real *frame) +{ + divergence_frame = frame; +} + +fftw_real *divergence_get_frame(void) +{ + return divergence_frame; +} + struct color4f divergence_get_color(float value) { struct color4f return_value; return_value = set_palette(divergence_colormap, value, divergence_num_colors); - return_value.a = 1.0f; + return_value.a = divergence_alpha; return return_value; } diff --git a/Smoke/divergence.h b/Smoke/divergence.h index 3785177..383fc54 100644 --- a/Smoke/divergence.h +++ b/Smoke/divergence.h @@ -10,6 +10,12 @@ int divergence_get_num_colors(void); void divergence_set_colormap(int colormap); int divergence_get_colormap(void); +void divergence_set_alpha(int alpha); +int divergence_get_alpha(void); + +void divergence_set_frame(fftw_real *frame); +fftw_real *divergence_get_frame(void); + struct color4f divergence_get_color(float value); 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; } diff --git a/Smoke/flowvis.h b/Smoke/flowvis.h index dcbff60..204904a 100644 --- a/Smoke/flowvis.h +++ b/Smoke/flowvis.h @@ -10,6 +10,12 @@ int flowvi_get_num_colors(void); void flowvi_set_colormap(int colormap); int flowvi_get_colormap(void); +void flowvis_set_alpha(int alpha); +int flowvis_get_alpha(void); + +void flowvis_set_frame(fftw_real *frame); +fftw_real *flowvis_get_frame(void); + struct color4f flowvis_get_color(float value); diff --git a/Smoke/glyphs.c b/Smoke/glyphs.c index 0917dc0..2480a8a 100644 --- a/Smoke/glyphs.c +++ b/Smoke/glyphs.c @@ -4,6 +4,8 @@ #endif
+#include <rfftw.h>
+
#include "funcs.h"
#include "palette.h"
@@ -16,6 +18,10 @@ static int glyphs_num_colors = PALETTE_MAXCOLORS; static int glyphs_colormap = PALETTE_BLACKWHITE;
+static int glyphs_alpha = 1.0f;
+
+static fftw_real *glyphs_frame;
+
void glyphs_set_render(int render_glyphs)
{
@@ -47,13 +53,33 @@ int glyphs_get_colormap(void) return glyphs_colormap;
}
+void glyphs_set_alpha(int alpha)
+{
+ glyphs_alpha = alpha;
+}
+
+int glyphs_get_alpha(void)
+{
+ return glyphs_alpha;
+}
+
+void glyphs_set_frame(fftw_real *frame)
+{
+ glyphs_frame = frame;
+}
+
+fftw_real *glyphs_get_frame(void)
+{
+ return glyphs_frame;
+}
+
struct color4f glyphs_get_color(float value)
{
struct color4f return_value;
return_value = set_palette(glyphs_colormap, value, glyphs_num_colors);
- return_value.a = 0.5f;
+ return_value.a = glyphs_alpha;
return return_value;
}
diff --git a/Smoke/glyphs.h b/Smoke/glyphs.h index ef24fce..74436a0 100644 --- a/Smoke/glyphs.h +++ b/Smoke/glyphs.h @@ -10,6 +10,12 @@ int glyphs_get_num_colors(void); void glyphs_set_map(int colormap);
int glyphs_get_map(void);
+void glyphs_set_alpha(int alpha);
+int glyphs_get_alpha(void);
+
+void glyphs_set_frame(fftw_real *frame);
+fftw_real *glyphs_get_frame(void);
+
struct color4f glyphs_get_color(float value);
#endif
diff --git a/Smoke/heightplots.c b/Smoke/heightplots.c index fa12a78..57fee1d 100644 --- a/Smoke/heightplots.c +++ b/Smoke/heightplots.c @@ -4,6 +4,8 @@ #endif +#include <rfftw.h> + #include "funcs.h" #include "palette.h" @@ -16,6 +18,10 @@ static int heightplots_num_colors = PALETTE_MAXCOLORS; static int heightplots_colormap = PALETTE_BLACKWHITE; +static int heightplots_alpha = 1.0f; + +static fftw_real *heightplots_frame; + void heightplots_set_render(int render_heightplots) { @@ -47,13 +53,28 @@ int heightplots_get_colormap(void) return heightplots_colormap; } +int heightplots_get_alpha(void) +{ + return heightplots_alpha; +} + +void heightplots_set_frame(fftw_real *frame) +{ + heightplots_frame = frame; +} + +fftw_real *heightplots_get_frame(void) +{ + return heightplots_frame; +} + struct color4f heightplots_get_color(float value) { struct color4f return_value; return_value = set_palette(heightplots_colormap, value, heightplots_num_colors); - return_value.a = 1.0f; + return_value.a = heightplots_alpha; return return_value; } diff --git a/Smoke/heightplots.h b/Smoke/heightplots.h index 6bdaa51..36a625a 100644 --- a/Smoke/heightplots.h +++ b/Smoke/heightplots.h @@ -10,6 +10,12 @@ int heightplots_get_num_colors(void); void heightplots_set_colormap(int colormap); int heightplots_get_colormap(void); +void heightplots_set_alpha(int alpha); +int heightplots_get_alpha(void); + +void heightplots_set_frame(fftw_real *frame); +fftw_real *heightplots_get_frame(void); + struct color4f heightplots_get_color(float value); diff --git a/Smoke/isolines.c b/Smoke/isolines.c index cff0201..d2f3530 100644 --- a/Smoke/isolines.c +++ b/Smoke/isolines.c @@ -4,6 +4,8 @@ #endif +#include <rfftw.h> + #include "funcs.h" #include "palette.h" @@ -16,6 +18,10 @@ static int isolines_num_colors = PALETTE_MAXCOLORS; static int isolines_colormap = PALETTE_BLACKWHITE; +static int isolines_alpha = 1.0f; + +static fftw_real *isolines_frame; + void isolines_set_render(int render_isolines) { @@ -47,13 +53,33 @@ int isolines_get_colormap(void) return isolines_colormap; } +void isolines_set_alpha(int alpha) +{ + isolines_alpha = alpha; +} + +int isolines_get_alpha(void) +{ + return isolines_alpha; +} + +void isolines_set_frame(fftw_real *frame) +{ + isolines_frame = frame; +} + +fftw_real *isolines_get_frame(void) +{ + return isolines_frame; +} + struct color4f isolines_get_color(float value) { struct color4f return_value; return_value = set_palette(isolines_colormap, value, isolines_num_colors); - return_value.a = 1.0f; + return_value.a = isolines_alpha; return return_value; } diff --git a/Smoke/isolines.h b/Smoke/isolines.h index f47b645..c22e047 100644 --- a/Smoke/isolines.h +++ b/Smoke/isolines.h @@ -10,6 +10,12 @@ int isolines_get_num_colors(void); void isolines_set_colormap(int colormap); int isolines_get_colormap(void); +void isolines_set_alpha(int alpha); +int isolines_get_alpha(void); + +void isolines_set_frame(fftw_real *frame); +fftw_real *isolines_get_frame(void); + struct color4f isolines_get_color(float value); diff --git a/Smoke/smoke.bin b/Smoke/smoke.bin Binary files differindex 47f88cc..a277367 100755 --- a/Smoke/smoke.bin +++ b/Smoke/smoke.bin diff --git a/Smoke/streamlines.c b/Smoke/streamlines.c index 2903b49..2d3072b 100644 --- a/Smoke/streamlines.c +++ b/Smoke/streamlines.c @@ -4,6 +4,8 @@ #endif +#include <rfftw.h> + #include "funcs.h" #include "palette.h" @@ -16,6 +18,10 @@ static int streamlines_num_colors = PALETTE_MAXCOLORS; static int streamlines_colormap = PALETTE_BLACKWHITE; +static int streamlines_alpha = 1.0f; + +static fftw_real *streamlines_frame; + void streamlines_set_render(int render_streamlines) { @@ -47,13 +53,33 @@ int streamlines_get_colormap(void) return streamlines_colormap; } +void streamlines_set_alpha(int alpha) +{ + streamlines_alpha = alpha; +} + +int streamlines_get_alpha(void) +{ + return streamlines_alpha; +} + +void streamlines_set_frame(fftw_real *frame) +{ + streamlines_frame = frame; +} + +fftw_real *streamlines_get_frame(void) +{ + return streamlines_frame; +} + struct color4f streamlines_get_color(float value) { struct color4f return_value; return_value = set_palette(streamlines_colormap, value, streamlines_num_colors); - return_value.a = 1.0f; + return_value.a = streamlines_alpha; return return_value; } diff --git a/Smoke/streamlines.h b/Smoke/streamlines.h index dc253aa..fe06222 100644 --- a/Smoke/streamlines.h +++ b/Smoke/streamlines.h @@ -10,6 +10,12 @@ int streamlines_get_num_colors(void); void streamlines_set_colormap(int colormap); int streamlines_get_colormap(void); +void streamlines_set_alpha(int alpha); +int streamlines_get_alpha(void); + +void streamlines_set_frame(fftw_real *frame); +fftw_real *streamlines_get_frame(void); + struct color4f streamlines_get_color(float value); |