summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Schinagl <oliver@schinagl.nl>2008-01-09 13:39:22 (GMT)
committerOliver Schinagl <oliver@schinagl.nl>2008-01-09 13:39:22 (GMT)
commita8ce8c6ea988e99570bed36b37a6ec02cf9e2059 (patch)
treefb6de41a44a04fb3c9c94bc9ad2e4acdfb847246
parent2f82b925a8d54fccc0ed78ce9c16f1079aed8588 (diff)
download2iv35-a8ce8c6ea988e99570bed36b37a6ec02cf9e2059.zip
2iv35-a8ce8c6ea988e99570bed36b37a6ec02cf9e2059.tar.gz
2iv35-a8ce8c6ea988e99570bed36b37a6ec02cf9e2059.tar.bz2
streamlines stuffs
-rw-r--r--Smoke/fluids.c2
-rw-r--r--Smoke/renderer_gl.c4
-rwxr-xr-xSmoke/smoke.binbin641533 -> 641810 bytes
-rw-r--r--Smoke/streamlines.c14
-rw-r--r--Smoke/streamlines.h3
5 files changed, 21 insertions, 2 deletions
diff --git a/Smoke/fluids.c b/Smoke/fluids.c
index eeada0e..2ab0e81 100644
--- a/Smoke/fluids.c
+++ b/Smoke/fluids.c
@@ -21,6 +21,7 @@
#include "colormap.h"
#include "glyphs.h"
#include "heightplots.h"
+#include "streamlines.h"
#include "normals.h"
#include "isolines.h"
@@ -440,6 +441,7 @@ void populate_arrays(struct vis_data_arrays *vis_data)
// }
+ get_frame(vis_data, streamlines_get_dataset());
if (colormap_get_autoscaling()) {
if (scale_min > frame[idx]) { colormap_set_scale_min(frame[idx]); }
diff --git a/Smoke/renderer_gl.c b/Smoke/renderer_gl.c
index b8edfde..1d87640 100644
--- a/Smoke/renderer_gl.c
+++ b/Smoke/renderer_gl.c
@@ -857,8 +857,8 @@ static void render_flowvis(void)
void renderer_init_gl(void)
{
- float LightAmbient[] = { 0.10f, 0.10f, 0.10f, 1.00f }; // Ambient light values
- float LightDiffuse[] = { 0.50f, 0.50f, 0.50f, 0.00f }; // Diffuse light values
+ float LightAmbient[] = { 0.10f, 0.10f, 0.10f, 1.0f }; // Ambient light values
+ float LightDiffuse[] = { 1.0f, 1.0f, 1.0f, 1.0f }; // Diffuse light values
float LightPosition[] = { -250.0f, -250.0f, -300.0f, 1.00f }; // Position of the light source
//glEnable(GL_TEXTURE_2D);
diff --git a/Smoke/smoke.bin b/Smoke/smoke.bin
index 0d6b680..932362a 100755
--- a/Smoke/smoke.bin
+++ b/Smoke/smoke.bin
Binary files differ
diff --git a/Smoke/streamlines.c b/Smoke/streamlines.c
index 9be9c38..a962180 100644
--- a/Smoke/streamlines.c
+++ b/Smoke/streamlines.c
@@ -6,18 +6,22 @@
#include <rfftw.h>
+#include "fluids.h"
#include "funcs.h"
#include "palette.h"
#include "streamlines.h"
+
static int streamlines_render = FALSE;
static int streamlines_num_colors = PALETTE_MAXCOLORS;
static int streamlines_colormap = PALETTE_BLACKWHITE;
+static int streamlines_dataset = DATASET_RHO;
+
static float streamlines_alpha = 1.0f;
static fftw_real *streamlines_frame;
@@ -63,6 +67,16 @@ float streamlines_get_alpha(void)
return streamlines_alpha;
}
+void streamlines_set_dataset(int dataset)
+{
+ streamlines_dataset = dataset;
+}
+
+int streamlines_get_dataset(void)
+{
+ return streamlines_dataset;
+}
+
void streamlines_set_frame(fftw_real *frame)
{
streamlines_frame = frame;
diff --git a/Smoke/streamlines.h b/Smoke/streamlines.h
index 166e6e6..0d2ce83 100644
--- a/Smoke/streamlines.h
+++ b/Smoke/streamlines.h
@@ -13,6 +13,9 @@ int streamlines_get_colormap(void);
void streamlines_set_alpha(float alpha);
float streamlines_get_alpha(void);
+void streamlines_set_dataset(int dataset);
+int streamlines_get_dataset(void);
+
void streamlines_set_frame(fftw_real *frame);
fftw_real *streamlines_get_frame(void);