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

◆ init()

void fl::WaveSimulation1D::init ( uint32_t length,
SuperSample factor,
float speed,
int dampening )

Definition at line 178 of file wave_simulation.cpp.

179 {
180 outerLength = length;
181 multiplier = static_cast<uint32_t>(factor);
182 sim.reset(new WaveSimulation1D_Real(length * multiplier, speed, dampening));
183 // Extra updates (frames) are applied because the simulation slows down in
184 // proportion to the supersampling factor.
185 extraFrames = static_cast<uint8_t>(factor) - 1;
186}
uint16_t speed
Definition Noise.ino:63
UISlider dampening("Dampening", 6.0f, 0.0f, 10.0f, 0.1f)
fl::scoped_ptr< WaveSimulation1D_Real > sim

References dampening, extraFrames, multiplier, outerLength, sim, and speed.

Referenced by WaveSimulation1D(), and setSuperSample().

+ Here is the caller graph for this function: