#ifdef G_OS_WIN32 #define WIN32_LEAN_AND_MEAN 1 #include #endif #include #include "fluids.h" #include "funcs.h" #include "palette.h" #include "streamlines.h" #include "seedpoint.h" static int streamlines_render = FALSE; static int streamlines_num_colors = PALETTE_MAXCOLORS; static int streamlines_colormap = PALETTE_RAINBOW; static int streamlines_dataset = DATASET_RHO; static float streamlines_alpha = 1.0f; static int streamlines_sort = STREAMLINES_SORT_LINES; static int streamlines_slices = 6; static float streamlines_radius = 8.0f; static fftw_real *streamlines_frame; struct fftw_real_xy **streamlines_history_scalars; void streamlines_set_render(int render_streamlines) { streamlines_render = render_streamlines; } int streamlines_get_render(void) { return streamlines_render; } void streamlines_set_num_colors(int num_colors) { streamlines_num_colors = num_colors; } int streamlines_get_num_colors(void) { return streamlines_num_colors; } void streamlines_set_colormap(int colormap) { streamlines_colormap = colormap; } int streamlines_get_colormap(void) { return streamlines_colormap; } void streamlines_set_sort(int sort) { streamlines_sort = sort; } int streamlines_get_sort(void) { return streamlines_sort; } void streamlines_set_alpha(float alpha) { streamlines_alpha = alpha; } 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_slices(int slices) { streamlines_slices = slices; } int streamlines_get_slices(void) { return streamlines_slices; } void streamlines_set_radius(float radius) { streamlines_radius = radius; } float streamlines_get_radius(void) { return streamlines_radius; } void streamlines_set_frame(fftw_real *frame) { streamlines_frame = frame; } fftw_real *streamlines_get_frame(void) { return streamlines_frame; } void streamlines_set_history_scalars(struct fftw_real_xy **history) { streamlines_history_scalars = history; } struct fftw_real_xy *streamlines_get_history_scalars(int hisdex) { return streamlines_history_scalars[hisdex]; } struct color4f streamlines_get_color(float value) { struct color4f return_value; return_value = set_palette(streamlines_colormap, value, streamlines_num_colors); return_value.a = streamlines_alpha; return return_value; } void streamlines_reset_seedpoints(void) { int i, nr; i = 0; nr = get_cur_seedpoint(); while (i < nr) { delete_seedpoint(0); i++; } }