FastLED 3.10.8
Loading...
Searching...
No Matches
flowfield.h
Go to the documentation of this file.
1
3
4#pragma once
5
6#include "fl/stl/stdint.h"
7
8#include "crgb.h"
10#include "fl/math/math.h"
11#include "fl/stl/shared_ptr.h"
12#include "fl/fx/fx2d.h"
13#include "fl/fx/time.h"
14#include "fl/math/xymap.h"
15#include "fl/stl/align.h"
16#include "fl/stl/vector.h"
18#include "fl/stl/noexcept.h"
19
20namespace fl {
21
23enum class BumpShape : u8 {
26};
27
34 public:
38 NoiseBias1D(u16 size, float attackTau, float decayTau)
40 mFilters.reserve(size);
41 for (u16 i = 0; i < size; ++i) {
42 mFilters.push_back(
43 AttackDecayFilter<float>(attackTau, decayTau, 0.0f));
44 }
45 mPending.resize(size);
46 for (u16 i = 0; i < size; ++i) {
47 mPending[i] = 0.0f;
48 }
49 }
50
52 void trigger(float center, float width, float amplitude,
54 if (width <= 0.0f || amplitude == 0.0f || mSize == 0) {
55 return;
56 }
57 const float halfWidth = width * 0.5f;
58 int iStart = fl::max(0, static_cast<int>(fl::floorf(center - halfWidth)));
59 int iEnd = fl::min(static_cast<int>(mSize) - 1,
60 static_cast<int>(fl::ceilf(center + halfWidth)));
61 for (int i = iStart; i <= iEnd; ++i) {
62 float t = (static_cast<float>(i) - (center - halfWidth)) / width;
63 t = fl::clamp(t, 0.0f, 1.0f);
64 float shaped = 0.0f;
65 switch (shape) {
67 shaped = fl::sinf(static_cast<float>(FL_PI) * t);
68 break;
70 float u = (t - 0.5f) / 0.2f;
71 shaped = fl::expf(-0.5f * u * u);
72 break;
73 }
74 }
75 mPending[i] += amplitude * shaped;
76 }
77 }
78
80 void update(float dtSeconds) FL_NO_EXCEPT {
81 for (u16 i = 0; i < mSize; ++i) {
82 mFilters[i].update(mPending[i], dtSeconds);
83 mPending[i] = 0.0f;
84 }
85 }
86
87 float get(u16 i) const FL_NO_EXCEPT { return mFilters[i].value(); }
88 u16 size() const FL_NO_EXCEPT { return mSize; }
89
91 for (u16 i = 0; i < mSize; ++i) {
92 mFilters[i].reset(0.0f);
93 mPending[i] = 0.0f;
94 }
95 }
96
97 private:
100 u16 mSize;
101};
102
105 public:
106 NoiseBias2D(u16 width, u16 height, float attackTau, float decayTau)
107 FL_NO_EXCEPT : mXBias(width, attackTau, decayTau),
108 mYBias(height, attackTau, decayTau) {}
109
110 void triggerX(float center, float width, float amplitude,
112 mXBias.trigger(center, width, amplitude, shape);
113 }
114
115 void triggerY(float center, float width, float amplitude,
117 mYBias.trigger(center, width, amplitude, shape);
118 }
119
120 void update(float dtSeconds) FL_NO_EXCEPT {
121 mXBias.update(dtSeconds);
122 mYBias.update(dtSeconds);
123 }
124
125 float getX(u16 x) const FL_NO_EXCEPT { return mXBias.get(x); }
126 float getY(u16 y) const FL_NO_EXCEPT { return mYBias.get(y); }
127 float get(u16 x, u16 y) const FL_NO_EXCEPT { return mXBias.get(x) + mYBias.get(y); }
128
130 const NoiseBias1D &x() const FL_NO_EXCEPT { return mXBias; }
132 const NoiseBias1D &y() const FL_NO_EXCEPT { return mYBias; }
133
134 u16 width() const FL_NO_EXCEPT { return mXBias.size(); }
135 u16 height() const FL_NO_EXCEPT { return mYBias.size(); }
136
138 mXBias.reset();
139 mYBias.reset();
140 }
141
142 private:
145};
146
154 // Color grids — raw s16x16 values
155 fl::vector<fl::i32> r, g, b; // Main RGB grid
156 fl::vector<fl::i32> tr, tg, tb; // Temp grid for advection pass 1
157
158 // Flow profiles — raw s16x16 values in [-1.0, 1.0] range
159 fl::vector<fl::i32> x_prof; // Per-column vertical shift driver
160 fl::vector<fl::i32> y_prof; // Per-row horizontal shift driver
161
162 // Perlin fade LUT (257 entries, Q8.24 format)
163 FL_ALIGNAS(16) fl::i32 fade_lut[257] = {};
165
166 int count = 0; // W*H pixel count (padded to multiple of 4)
167 int width = 0;
168 int height = 0;
169
171
172 void init(int w, int h) FL_NO_EXCEPT {
173 width = w;
174 height = h;
175 count = (w * h + 3) & ~3; // Pad to multiple of 4
176
177 r.resize(count, 0);
178 g.resize(count, 0);
179 b.resize(count, 0);
180 tr.resize(count, 0);
181 tg.resize(count, 0);
182 tb.resize(count, 0);
183 x_prof.resize(w, 0);
184 y_prof.resize(h, 0);
185 }
186};
187
191
194 float persistence = 0.86f;
195 float color_shift = 0.04f;
196 float flow_amp_x = 1.0f;
197 float flow_amp_y = 1.0f;
198 float flow_shift = 1.8f;
199 float flow_speed_x = 0.10f;
200 float flow_speed_y = 0.10f;
201 float noise_freq_x = 0.33f;
202 float noise_freq_y = 0.32f;
203 int dot_count = 3;
204 int emitter_mode = 0;
205 float endpoint_speed = 0.80f;
206 bool reverse_x_profile = true;
207 bool show_flow_vectors = false;
208};
209
226class FlowField : public Fx2d {
227 public:
229
230 ~FlowField() FL_NO_EXCEPT override = default;
231
234 void draw(DrawContext context) FL_NO_EXCEPT override;
235
236 // Parameter setters.
237 void setPersistence(float halfLife) FL_NO_EXCEPT { mParams.persistence = halfLife; }
238 void setColorShift(float speed) FL_NO_EXCEPT { mParams.color_shift = speed; }
239 void setFlowAmplitudeX(float amp) FL_NO_EXCEPT { mParams.flow_amp_x = amp; }
240 void setFlowAmplitudeY(float amp) FL_NO_EXCEPT { mParams.flow_amp_y = amp; }
241 void setFlowShift(float shift) FL_NO_EXCEPT { mParams.flow_shift = shift; }
242 void setFlowSpeedX(float speed) FL_NO_EXCEPT { mParams.flow_speed_x = speed; }
243 void setFlowSpeedY(float speed) FL_NO_EXCEPT { mParams.flow_speed_y = speed; }
244 void setNoiseFrequencyX(float freq) FL_NO_EXCEPT { mParams.noise_freq_x = freq; }
245 void setNoiseFrequencyY(float freq) FL_NO_EXCEPT { mParams.noise_freq_y = freq; }
247 mParams.noise_freq_x = freq;
248 mParams.noise_freq_y = freq;
249 }
250 void setDotCount(int count) FL_NO_EXCEPT { mParams.dot_count = count; }
251 void setEmitterMode(int mode) FL_NO_EXCEPT { mParams.emitter_mode = mode; }
252 void setEndpointSpeed(float speed) FL_NO_EXCEPT { mParams.endpoint_speed = speed; }
253 void setReverseXProfile(bool rev) FL_NO_EXCEPT { mParams.reverse_x_profile = rev; }
254 void setShowFlowVectors(bool show) FL_NO_EXCEPT { mParams.show_flow_vectors = show; }
255
257 void setSpeed(float speed) FL_NO_EXCEPT { mTimeWarp.setSpeed(speed); }
258 float speed() const FL_NO_EXCEPT { return mTimeWarp.scale(); }
259
261 void noisePunch(float amplitude = 1.0f,
263
265 void noisePunchX(float center, float width, float amplitude = 1.0f,
267
269 void noisePunchY(float center, float width, float amplitude = 1.0f,
271
273 const NoiseBias2D &noiseBias() const FL_NO_EXCEPT { return mNoiseBias; }
274
276 const Params &getParams() const FL_NO_EXCEPT { return mParams; }
277
278 protected:
279 explicit FlowField(const XYMap &xyMap, const Params &params = Params()) FL_NO_EXCEPT;
280
284 virtual void drawImpl(DrawContext context, u32 dt_ms, u32 t_ms) FL_NO_EXCEPT = 0;
285
288
289 private:
292};
293
295class FlowFieldFloat : public FlowField {
296 public:
297 explicit FlowFieldFloat(const XYMap &xyMap, const Params &params = Params()) FL_NO_EXCEPT;
298
299 fl::string fxName() const FL_NO_EXCEPT override { return "FlowFieldFloat"; }
300
301 protected:
302 void drawImpl(DrawContext context, u32 dt_ms, u32 t_ms) FL_NO_EXCEPT override;
303
304 private:
305 // Seeded 2D Perlin noise generator.
306 class Perlin2D {
307 public:
308 void init(u32 seed) FL_NO_EXCEPT;
309 float noise(float x, float y) const FL_NO_EXCEPT;
310
311 private:
312 u8 perm[512];
313 static float fade(float t) FL_NO_EXCEPT {
314 return t * t * t * (t * (t * 6.0f - 15.0f) + 10.0f);
315 }
316 static float lerp(float a, float b, float t) FL_NO_EXCEPT {
317 return a + t * (b - a);
318 }
319 static float grad(int h, float x, float y) FL_NO_EXCEPT;
320 };
321
322 // Grid access helpers (row-major layout).
323 int idx(int y, int x) const FL_NO_EXCEPT {
324 return y * (int)getWidth() + x;
325 }
326
327 // Helpers.
328 static float fmodPos(float x, float m) FL_NO_EXCEPT;
329 static float clampf(float v, float lo, float hi) FL_NO_EXCEPT;
330 static u8 f2u8(float v) FL_NO_EXCEPT;
331 static CRGB rainbow(float t, float speed, float phase) FL_NO_EXCEPT;
332
333 // Sub-steps called from drawImpl().
334 void flowPrepare(float t) FL_NO_EXCEPT;
335 void emitOrbitalDots(float t) FL_NO_EXCEPT;
336 void flowAdvect(float dt) FL_NO_EXCEPT;
337 void drawDot(float cx, float cy, float diam,
338 u8 cr, u8 cg, u8 cb) FL_NO_EXCEPT;
339 void drawAALine(float x0, float y0, float x1, float y1,
340 float t, float colorShift) FL_NO_EXCEPT;
341 void emitLissajousLine(float t) FL_NO_EXCEPT;
342
343 void drawFlowVectors(fl::span<CRGB> leds) FL_NO_EXCEPT;
344
345 // Float-precision RGB grids (main + temp for advection).
348
349 // Noise generators and profiles.
353};
354
360class FlowFieldFP : public FlowField {
361 public:
362 explicit FlowFieldFP(const XYMap &xyMap, const Params &params = Params()) FL_NO_EXCEPT;
363
364 fl::string fxName() const FL_NO_EXCEPT override { return "FlowFieldFP"; }
365
366 protected:
367 void drawImpl(DrawContext context, u32 dt_ms, u32 t_ms) FL_NO_EXCEPT override;
368
369 private:
370 friend struct FlowFieldFPProfiler; // For per-phase profiling
371
372 // Grid access helpers (row-major layout).
373 int idx(int y, int x) const FL_NO_EXCEPT {
374 return y * mState.width + x;
375 }
376
377 // Helpers.
378 static i32 clamp_q16(i32 v, i32 lo, i32 hi) FL_NO_EXCEPT;
379 static u8 q16_to_u8(i32 v) FL_NO_EXCEPT;
381
382 // Sub-steps — all pure fixed-point.
383 void flowPrepare(s16x16 t) FL_NO_EXCEPT;
384 void emitOrbitalDots(s16x16 t) FL_NO_EXCEPT;
385 void flowAdvect(i32 dt_raw) FL_NO_EXCEPT;
386 void drawDot(s16x16 cx, s16x16 cy, s16x16 diam,
387 u8 cr, u8 cg, u8 cb) FL_NO_EXCEPT;
388 void drawAALine(s16x16 x0, s16x16 y0, s16x16 x1, s16x16 y1,
390 void emitLissajousLine(s16x16 t) FL_NO_EXCEPT;
391
392 void drawFlowVectors(fl::span<CRGB> leds) FL_NO_EXCEPT;
393
394 // Convert float params to cached s16x16 values.
395 void syncParams() FL_NO_EXCEPT;
396
397 // Perm table initialization (Fisher-Yates shuffle).
398 static void initPerm256(u8 *perm, u32 seed) FL_NO_EXCEPT;
399
401 u8 mPermX[256] = {};
402 u8 mPermY[256] = {};
403
404 // Cached s16x16 versions of float params.
412};
413
414} // namespace fl
CRGB leds[1]
fl::XYMap xyMap
FastLED show()
void rainbow()
uint8_t noise[NUM_LAYERS][WIDTH][HEIGHT]
Definition Fire2023.h:97
fl::UIButton noisePunch("NoisePunch")
fl::UISlider colorShift("Color Shift", 0.04f, 0.0f, 0.5f, 0.01f)
uint16_t speed
Definition Noise.ino:72
Alignment macros and utilities for FastLED.
void setDotCount(int count) FL_NO_EXCEPT
Definition flowfield.h:250
NoiseBias2D & noiseBias() FL_NO_EXCEPT
Definition flowfield.h:272
void setPersistence(float halfLife) FL_NO_EXCEPT
Definition flowfield.h:237
void setFlowAmplitudeY(float amp) FL_NO_EXCEPT
Definition flowfield.h:240
virtual void drawImpl(DrawContext context, u32 dt_ms, u32 t_ms) FL_NO_EXCEPT=0
Subclasses implement rendering given the time delta and total time.
NoiseBias2D mNoiseBias
Definition flowfield.h:287
void setColorShift(float speed) FL_NO_EXCEPT
Definition flowfield.h:238
FlowField(const XYMap &xyMap, const Params &params=Params()) FL_NO_EXCEPT
void setShowFlowVectors(bool show) FL_NO_EXCEPT
Definition flowfield.h:254
Params mParams
Definition flowfield.h:286
FlowFieldParams Params
Definition flowfield.h:228
void setNoiseFrequencyY(float freq) FL_NO_EXCEPT
Definition flowfield.h:245
void draw(DrawContext context) FL_NO_EXCEPT override
Handles timing, then delegates to drawImpl().
void noisePunchY(float center, float width, float amplitude=1.0f, BumpShape shape=BumpShape::HalfSine) FL_NO_EXCEPT
Trigger a noise punch on the Y axis (rows).
void setSpeed(float speed) FL_NO_EXCEPT
Set time speed/scale (1.0 = normal, 0.5 = half speed, etc.)
Definition flowfield.h:257
void setNoiseFrequency(float freq) FL_NO_EXCEPT
Definition flowfield.h:246
const Params & getParams() const FL_NO_EXCEPT
Definition flowfield.h:276
void setEmitterMode(int mode) FL_NO_EXCEPT
Definition flowfield.h:251
void setReverseXProfile(bool rev) FL_NO_EXCEPT
Definition flowfield.h:253
void noisePunchX(float center, float width, float amplitude=1.0f, BumpShape shape=BumpShape::HalfSine) FL_NO_EXCEPT
Trigger a noise punch on the X axis (columns).
Params & getParams() FL_NO_EXCEPT
Definition flowfield.h:275
float speed() const FL_NO_EXCEPT
Definition flowfield.h:258
void setFlowAmplitudeX(float amp) FL_NO_EXCEPT
Definition flowfield.h:239
void setFlowSpeedX(float speed) FL_NO_EXCEPT
Definition flowfield.h:242
const NoiseBias2D & noiseBias() const FL_NO_EXCEPT
Definition flowfield.h:273
~FlowField() FL_NO_EXCEPT override=default
void setNoiseFrequencyX(float freq) FL_NO_EXCEPT
Definition flowfield.h:244
void setEndpointSpeed(float speed) FL_NO_EXCEPT
Definition flowfield.h:252
void setFlowSpeedY(float speed) FL_NO_EXCEPT
Definition flowfield.h:243
TimeWarp mTimeWarp
Definition flowfield.h:290
void setFlowShift(float shift) FL_NO_EXCEPT
Definition flowfield.h:241
FlowFieldFPState mState
Definition flowfield.h:400
FlowFieldFP(const XYMap &xyMap, const Params &params=Params()) FL_NO_EXCEPT
int idx(int y, int x) const FL_NO_EXCEPT
Definition flowfield.h:373
s16x16 mFlowAmpY_fp
Definition flowfield.h:411
s16x16 mNoiseFreqY_fp
Definition flowfield.h:409
s16x16 mColorShift_fp
Definition flowfield.h:405
s16x16 mFlowShift_fp
Definition flowfield.h:406
fl::string fxName() const FL_NO_EXCEPT override
Definition flowfield.h:364
s16x16 mFlowSpeedX_fp
Definition flowfield.h:410
friend struct FlowFieldFPProfiler
Definition flowfield.h:370
s16x16 mNoiseFreqX_fp
Definition flowfield.h:409
s16x16 mPersistence_fp
Definition flowfield.h:408
s16x16 mEndpointSpeed_fp
Definition flowfield.h:407
s16x16 mFlowSpeedY_fp
Definition flowfield.h:410
s16x16 mFlowAmpX_fp
Definition flowfield.h:411
Pure fixed-point (s16x16) flow field implementation for maximum speed.
Definition flowfield.h:360
static float lerp(float a, float b, float t) FL_NO_EXCEPT
Definition flowfield.h:316
void init(u32 seed) FL_NO_EXCEPT
static float fade(float t) FL_NO_EXCEPT
Definition flowfield.h:313
fl::vector< float > mB
Definition flowfield.h:346
fl::string fxName() const FL_NO_EXCEPT override
Definition flowfield.h:299
fl::vector< float > mYProf
Per-row values; drives horizontal shift.
Definition flowfield.h:352
fl::vector< float > mG
Definition flowfield.h:346
Perlin2D mNoiseGenY
Definition flowfield.h:350
Perlin2D mNoiseGenX
Definition flowfield.h:350
fl::vector< float > mXProf
Per-column values; drives vertical shift.
Definition flowfield.h:351
FlowFieldFloat(const XYMap &xyMap, const Params &params=Params()) FL_NO_EXCEPT
int idx(int y, int x) const FL_NO_EXCEPT
Definition flowfield.h:323
fl::vector< float > mTG
Definition flowfield.h:347
fl::vector< float > mTR
Definition flowfield.h:347
fl::vector< float > mTB
Definition flowfield.h:347
fl::vector< float > mR
Definition flowfield.h:346
Float-precision flow field implementation.
Definition flowfield.h:295
Abstract base class for 2D flow field effects.
Definition flowfield.h:226
u16 xyMap(u16 x, u16 y) const FL_NO_EXCEPT
Definition fx2d.h:21
u16 getWidth() const FL_NO_EXCEPT
Definition fx2d.h:25
Fx2d(const XYMap &xyMap) FL_NO_EXCEPT
Definition fx2d.h:20
void update(float dtSeconds) FL_NO_EXCEPT
Advance all filters by dt seconds.
Definition flowfield.h:80
void trigger(float center, float width, float amplitude, BumpShape shape=BumpShape::HalfSine) FL_NO_EXCEPT
Inject a shaped bump. Multiple triggers per frame accumulate additively.
Definition flowfield.h:52
float get(u16 i) const FL_NO_EXCEPT
Definition flowfield.h:87
u16 size() const FL_NO_EXCEPT
Definition flowfield.h:88
fl::vector< float > mPending
Definition flowfield.h:99
fl::vector< AttackDecayFilter< float > > mFilters
Definition flowfield.h:98
void reset() FL_NO_EXCEPT
Definition flowfield.h:90
NoiseBias1D(u16 size, float attackTau, float decayTau) FL_NO_EXCEPT
Definition flowfield.h:38
Per-position attack/decay bias for one axis.
Definition flowfield.h:33
NoiseBias1D mXBias
Definition flowfield.h:143
void triggerY(float center, float width, float amplitude, BumpShape shape=BumpShape::HalfSine) FL_NO_EXCEPT
Definition flowfield.h:115
float getX(u16 x) const FL_NO_EXCEPT
Definition flowfield.h:125
void triggerX(float center, float width, float amplitude, BumpShape shape=BumpShape::HalfSine) FL_NO_EXCEPT
Definition flowfield.h:110
const NoiseBias1D & x() const FL_NO_EXCEPT
Definition flowfield.h:130
NoiseBias2D(u16 width, u16 height, float attackTau, float decayTau) FL_NO_EXCEPT
Definition flowfield.h:106
void reset() FL_NO_EXCEPT
Definition flowfield.h:137
u16 height() const FL_NO_EXCEPT
Definition flowfield.h:135
u16 width() const FL_NO_EXCEPT
Definition flowfield.h:134
float get(u16 x, u16 y) const FL_NO_EXCEPT
Definition flowfield.h:127
const NoiseBias1D & y() const FL_NO_EXCEPT
Definition flowfield.h:132
NoiseBias1D & y() FL_NO_EXCEPT
Definition flowfield.h:131
NoiseBias1D & x() FL_NO_EXCEPT
Definition flowfield.h:129
NoiseBias1D mYBias
Definition flowfield.h:144
float getY(u16 y) const FL_NO_EXCEPT
Definition flowfield.h:126
void update(float dtSeconds) FL_NO_EXCEPT
Definition flowfield.h:120
Two-axis attack/decay bias for 2D effects (per-column X + per-row Y).
Definition flowfield.h:104
#define FL_PI
Definition math.h:26
unsigned char u8
Definition stdint.h:131
constexpr common_type_t< T, U > max(T a, U b) FL_NO_EXCEPT
Definition math.h:75
u8 u8 fract8 blur_amount FL_NO_EXCEPT
Definition blur.h:186
FL_DISABLE_WARNING_PUSH U constexpr common_type_t< T, U > min(T a, U b) FL_NO_EXCEPT
Definition math.h:71
float sinf(float value) FL_NO_EXCEPT
Definition math.h:360
constexpr enable_if< is_fixed_point< T >::value, T >::type clamp(T x, T lo, T hi) FL_NO_EXCEPT
u8 width
Definition blur.h:186
BumpShape
Shape function for NoiseBias triggers.
Definition flowfield.h:23
@ HalfSine
sin(pi * t), smooth bell, zero at edges
Definition flowfield.h:24
@ Gaussian
exp(-0.5 * ((t-0.5)/sigma)^2), tighter peak
Definition flowfield.h:25
float floorf(float value) FL_NO_EXCEPT
Definition math.h:312
float ceilf(float value) FL_NO_EXCEPT
Definition math.h:318
float expf(float value) FL_NO_EXCEPT
Definition math.h:406
Base definition for an LED controller.
Definition crgb.hpp:179
float flow_amp_y
Flow amplitude Y.
Definition flowfield.h:197
float flow_amp_x
Flow amplitude X.
Definition flowfield.h:196
float flow_speed_y
Noise scroll speed Y.
Definition flowfield.h:200
float color_shift
Color shift speed.
Definition flowfield.h:195
bool show_flow_vectors
Draw flow profiles as overlay.
Definition flowfield.h:207
bool reverse_x_profile
Reverse X profile (matches Python)
Definition flowfield.h:206
float endpoint_speed
Lissajous endpoint speed.
Definition flowfield.h:205
int emitter_mode
0=Lissajous, 1=Dots, 2=Both
Definition flowfield.h:204
float flow_shift
Pixel shift amount.
Definition flowfield.h:198
float flow_speed_x
Noise scroll speed X.
Definition flowfield.h:199
float persistence
Trail half-life in seconds.
Definition flowfield.h:194
float noise_freq_y
Noise frequency Y.
Definition flowfield.h:202
float noise_freq_x
Noise frequency X.
Definition flowfield.h:201
int dot_count
Number of orbital dots.
Definition flowfield.h:203
Configuration parameters for FlowField.
Definition flowfield.h:193
#define FASTLED_SHARED_PTR(type)
Definition shared_ptr.h:577
static fl::i32 grad(fl::u8 hash, fl::i32 x) FL_NO_EXCEPT
Representation of an 8-bit RGB pixel (Red, Green, Blue)
Definition crgb.h:38
fl::vector< fl::i32 > tr
Definition flowfield.h:156
FlowFieldFPState() FL_NO_EXCEPT
Definition flowfield.h:170
fl::vector< fl::i32 > b
Definition flowfield.h:155
fl::vector< fl::i32 > r
Definition flowfield.h:155
fl::vector< fl::i32 > y_prof
Definition flowfield.h:160
fl::vector< fl::i32 > x_prof
Definition flowfield.h:159
fl::vector< fl::i32 > tg
Definition flowfield.h:156
void init(int w, int h) FL_NO_EXCEPT
Definition flowfield.h:172
fl::vector< fl::i32 > tb
Definition flowfield.h:156
fl::vector< fl::i32 > g
Definition flowfield.h:155
SoA (Structure-of-Arrays) state for FlowFieldFP.
Definition flowfield.h:153