summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilrik de Loose <wilrik@wilrik.nl>2008-01-10 21:12:21 (GMT)
committerWilrik de Loose <wilrik@wilrik.nl>2008-01-10 21:12:21 (GMT)
commit2cb09ad476b1f20ff02200ca70aab489c8c06300 (patch)
treeaa715ab8588e90ba488c4ff8d95dee424cad52b3
parent37e4a2a9857669837417b0b5e6ba35248bec9030 (diff)
download2iv35-2cb09ad476b1f20ff02200ca70aab489c8c06300.zip
2iv35-2cb09ad476b1f20ff02200ca70aab489c8c06300.tar.gz
2iv35-2cb09ad476b1f20ff02200ca70aab489c8c06300.tar.bz2
lilkieusd1342^%$^&U*(x
-rw-r--r--Smoke/Week 2.suobin78336 -> 78336 bytes
-rw-r--r--Smoke/interact.c2
-rw-r--r--Smoke/renderer_gl.c13
3 files changed, 8 insertions, 7 deletions
diff --git a/Smoke/Week 2.suo b/Smoke/Week 2.suo
index 9f89abb..90a00dd 100644
--- a/Smoke/Week 2.suo
+++ b/Smoke/Week 2.suo
Binary files differ
diff --git a/Smoke/interact.c b/Smoke/interact.c
index 5c67963..f44e03c 100644
--- a/Smoke/interact.c
+++ b/Smoke/interact.c
@@ -69,7 +69,7 @@ void click(int button, int state, int mx, int my)
prev_rot_mz = mx;
}
- //create_seedpoint(mx, my);
+ create_seedpoint(mx, my);
if (my <25) {
/* Click received on button bar */
diff --git a/Smoke/renderer_gl.c b/Smoke/renderer_gl.c
index c8e6274..0476df1 100644
--- a/Smoke/renderer_gl.c
+++ b/Smoke/renderer_gl.c
@@ -762,9 +762,9 @@ static void render_isolines(void)
static void render_streamlines(void)
{
int i, j, k, l, idx, idx_x, idx_y, DIM;
- float v;
+ float vx, vy;
struct point p;
- fftw_real *frame_history;
+ struct fftw_real_xy *frame_history;
fftw_real cell_x, cell_y;
i = j = k = l = 0;
@@ -776,10 +776,10 @@ static void render_streamlines(void)
glBegin(GL_LINE_STRIP);
+ frame_history = streamlines_get_history_scalars();
+
for (j = 0; j < HISTORY_SIZE; j++)
{
- frame_history = flowvis_get_history(j);
-
cell_x = (fftw_real)winWidth / (fftw_real)(DIM + 1); // Grid cell width
cell_y = (fftw_real)winHeight / (fftw_real)(DIM + 1); // Grid cell heigh
@@ -788,9 +788,10 @@ static void render_streamlines(void)
idx = (int)(cell_x * cell_y);
- v = (float)frame_history[idx];
+ vx = (float)frame_history[j].x[idx];
+ vy = (float)frame_history[j].y[idx];
- glVertex3f(p.x + v, winHeight - p.y, 0.0f - j * 10.0f);
+ glVertex3f(p.x + vx, winHeight - p.y + vy, 0.0f - j * cell_x);
}
glEnd();
}