FastLED 3.9.15
Loading...
Searching...
No Matches

◆ WaveFx()

fl::WaveFx::WaveFx ( const XYMap & xymap,
Args args = Args() )
inline

Construct wave effect with given coordinate mapping and parameters.

Parameters
xymapCoordinate mapping from 2D grid to 1D LED array
argsConfiguration parameters (uses defaults if not specified)

Definition at line 173 of file wave.h.

174 : Fx2d(xymap), mWaveSim(xymap.getWidth(), xymap.getHeight(),
175 args.factor, args.speed, args.dampening) {
176 // Initialize the wave simulation with the given parameters.
177 if (args.crgbMap == nullptr) {
178 // Use the default CRGB mapping function.
180 } else {
181 // Set a custom CRGB mapping function.
182 mCrgbMap = args.crgbMap;
183 }
184 setAutoUpdate(args.auto_updates);
185 setXCylindrical(args.x_cyclical);
186 setUseChangeGrid(args.use_change_grid);
187 }
XYMap xymap
Fx2d(const XYMap &xyMap)
Definition fx2d.h:19
void setAutoUpdate(bool autoUpdate)
Enable/disable automatic simulation updates.
Definition wave.h:355
WaveCrgbMapPtr mCrgbMap
Definition wave.h:377
void setUseChangeGrid(bool enabled)
Enable/disable change grid tracking optimization.
Definition wave.h:276
void setXCylindrical(bool on)
Enable/disable cylindrical topology on x-axis.
Definition wave.h:194
WaveSimulation2D mWaveSim
Definition wave.h:376
shared_ptr< T > make_shared(Args &&... args) FL_NOEXCEPT
Definition shared_ptr.h:414
corkscrew_args args
Definition old.h:149

References fl::Fx2d::Fx2d(), args, dampening(), fl::Fx2d::getHeight(), fl::Fx2d::getWidth(), mWaveSim, setAutoUpdate(), setUseChangeGrid(), setXCylindrical(), speed, and xymap.

+ Here is the call graph for this function: