From 2cb09ad476b1f20ff02200ca70aab489c8c06300 Mon Sep 17 00:00:00 2001 From: Wilrik de Loose Date: Thu, 10 Jan 2008 21:12:21 +0000 Subject: lilkieusd1342^%$^&U*(x --- Smoke/Week 2.suo | Bin 78336 -> 78336 bytes Smoke/interact.c | 2 +- Smoke/renderer_gl.c | 13 +++++++------ 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Smoke/Week 2.suo b/Smoke/Week 2.suo index 9f89abb..90a00dd 100644 Binary files a/Smoke/Week 2.suo and b/Smoke/Week 2.suo 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(); } -- cgit v0.12