summaryrefslogtreecommitdiff
path: root/src/modules/flow/ff.h
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2023-09-03 01:02:14 -0700
committerVito Caputo <vcaputo@pengaru.com>2023-09-03 01:02:14 -0700
commit62a08f9e7b9b1d258caf6680b2978fce4dc303d3 (patch)
tree5b6921c7b16c723af4b54c58c0dede7ecb2d332f /src/modules/flow/ff.h
parent7e2d6bf6304ef22ce8f35bc6c5eac323f2f39d01 (diff)
modules/flow: add colors
This is a first stab at colorizing the output. The flow field now has two v3f_t datums per cell, direction and color. It's a bit pastel-y and color choice/palettes definitely needs work, at least some gamma correction would make sense. But I kind of like the pastel look actually, some of the combinations start looking very 80s aesthetic. A good way to watch flow's possibilities is: --module=rtv,channels=flow,duration=10,context_duration=10,caption_duration=0 \ --video=sdl,fullscreen=on --defaults --go The long-ish duration really gives a chance to get into the groove of things before switching
Diffstat (limited to 'src/modules/flow/ff.h')
-rw-r--r--src/modules/flow/ff.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/modules/flow/ff.h b/src/modules/flow/ff.h
index 0324ea0..b148c2e 100644
--- a/src/modules/flow/ff.h
+++ b/src/modules/flow/ff.h
@@ -5,9 +5,14 @@
typedef struct ff_t ff_t;
-ff_t * ff_new(unsigned size, void (*populator)(void *context, unsigned size, const v3f_t *other, v3f_t *field), void *context);
+typedef struct ff_data_t {
+ v3f_t direction;
+ v3f_t color;
+} ff_data_t;
+
+ff_t * ff_new(unsigned size, void (*populator)(void *context, unsigned size, const ff_data_t *other, ff_data_t *field), void *context);
ff_t * ff_free(ff_t *ff);
-v3f_t ff_get(ff_t *ff, v3f_t *coordinate, float w);
+ff_data_t ff_get(ff_t *ff, v3f_t *coordinate, float w);
void ff_populate(ff_t *ff, unsigned idx);
#endif
© All Rights Reserved