|
FastLED 3.9.15
|
Float-precision flow field implementation.
Definition at line 295 of file flowfield.h.
#include <flowfield.h>
Inheritance diagram for fl::FlowFieldFloat:
Collaboration diagram for fl::FlowFieldFloat:Classes | |
| class | Perlin2D |
Public Member Functions | |
| FlowFieldFloat (const XYMap &xyMap, const Params ¶ms=Params()) | |
| fl::string | fxName () const override |
Public Member Functions inherited from fl::FlowField | |
| ~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 |
Public Member Functions inherited from fl::Fx2d | |
| 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 |
Public Member Functions inherited from fl::Fx | |
| Fx (u16 numLeds) | |
| u16 | getNumLeds () const |
| virtual bool | hasFixedFrameRate (float *fps) const |
| virtual void | pause (fl::u32 now) |
| virtual void | resume (fl::u32 now) |
Protected Member Functions | |
| void | drawImpl (DrawContext context, u32 dt_ms, u32 t_ms) override |
| Subclasses implement rendering given the time delta and total time. | |
Protected Member Functions inherited from fl::FlowField | |
| FlowField (const XYMap &xyMap, const Params ¶ms=Params()) | |
Protected Member Functions inherited from fl::Fx | |
| virtual | ~Fx () FL_NOEXCEPT |
Private Member Functions | |
| void | drawAALine (float x0, float y0, float x1, float y1, float t, float colorShift) |
| void | drawDot (float cx, float cy, float diam, u8 cr, u8 cg, u8 cb) |
| void | drawFlowVectors (fl::span< CRGB > leds) |
| void | emitLissajousLine (float t) |
| void | emitOrbitalDots (float t) |
| void | flowAdvect (float dt) |
| void | flowPrepare (float t) |
| int | idx (int y, int x) const |
Static Private Member Functions | |
| static float | clampf (float v, float lo, float hi) |
| static u8 | f2u8 (float v) |
| static float | fmodPos (float x, float m) |
| static CRGB | rainbow (float t, float speed, float phase) |
Private Attributes | |
| fl::vector< float > | mB |
| fl::vector< float > | mG |
| Perlin2D | mNoiseGenX |
| Perlin2D | mNoiseGenY |
| fl::vector< float > | mR |
| fl::vector< float > | mTB |
| fl::vector< float > | mTG |
| fl::vector< float > | mTR |
| fl::vector< float > | mXProf |
| Per-column values; drives vertical shift. | |
| fl::vector< float > | mYProf |
| Per-row values; drives horizontal shift. | |
Additional Inherited Members | |
Public Types inherited from fl::FlowField | |
| using | Params = FlowFieldParams |
Public Types inherited from fl::Fx | |
| using | DrawContext = ::fl::DrawContext |
Protected Attributes inherited from fl::FlowField | |
| NoiseBias2D | mNoiseBias |
| Params | mParams |
Protected Attributes inherited from fl::Fx2d | |
| XYMap | mXyMap |
Protected Attributes inherited from fl::Fx | |
| u16 | mNumLeds |