Pure fixed-point (s16x16) flow field implementation for maximum speed.
All internal computation uses Q16.16 fixed-point arithmetic — no float operations in any code path. Public API accepts float parameters which are converted to s16x16 before each draw.
- Examples
- FlowField.ino.
Definition at line 360 of file flowfield.h.
|
| | FlowFieldFP (const XYMap &xyMap, const Params ¶ms=Params()) |
| |
| fl::string | fxName () const override |
| |
| | ~FlowField () FL_NOEXCEPT override=default |
| |
| void | draw (DrawContext context) override |
| | Handles timing, then delegates to drawImpl().
|
| |
| Params & | getParams () |
| |
| const Params & | getParams () const |
| |
| NoiseBias2D & | noiseBias () |
| |
| const NoiseBias2D & | noiseBias () const |
| |
| void | noisePunch (float amplitude=1.0f, BumpShape shape=BumpShape::HalfSine) |
| | Trigger a noise punch on both axes at center with proportional width.
|
| |
| void | noisePunchX (float center, float width, float amplitude=1.0f, BumpShape shape=BumpShape::HalfSine) |
| | Trigger a noise punch on the X axis (columns).
|
| |
| void | noisePunchY (float center, float width, float amplitude=1.0f, BumpShape shape=BumpShape::HalfSine) |
| | Trigger a noise punch on the Y axis (rows).
|
| |
| void | setColorShift (float speed) |
| |
| void | setDotCount (int count) |
| |
| void | setEmitterMode (int mode) |
| |
| void | setEndpointSpeed (float speed) |
| |
| void | setFlowAmplitudeX (float amp) |
| |
| void | setFlowAmplitudeY (float amp) |
| |
| void | setFlowShift (float shift) |
| |
| void | setFlowSpeedX (float speed) |
| |
| void | setFlowSpeedY (float speed) |
| |
| void | setNoiseFrequency (float freq) |
| |
| void | setNoiseFrequencyX (float freq) |
| |
| void | setNoiseFrequencyY (float freq) |
| |
| void | setPersistence (float halfLife) |
| |
| void | setReverseXProfile (bool rev) |
| |
| void | setShowFlowVectors (bool show) |
| |
| void | setSpeed (float speed) |
| | Set time speed/scale (1.0 = normal, 0.5 = half speed, etc.)
|
| |
| float | speed () const |
| |
| | Fx2d (const XYMap &xyMap) |
| |
| u16 | getHeight () const |
| |
| u16 | getWidth () const |
| |
| XYMap & | getXYMap () |
| |
| const XYMap & | getXYMap () const |
| |
| void | setXYMap (const XYMap &xyMap) |
| |
| u16 | xyMap (u16 x, u16 y) const |
| |
| | Fx (u16 numLeds) |
| |
| u16 | getNumLeds () const |
| |
| virtual bool | hasFixedFrameRate (float *fps) const |
| |
| virtual void | pause (fl::u32 now) |
| |
| virtual void | resume (fl::u32 now) |
| |