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

◆ init()

void fl::WaveSimulation2D::init ( uint32_t width,
uint32_t height,
SuperSample factor,
float speed,
int dampening )

Definition at line 43 of file wave_simulation.cpp.

43 {
44 outerWidth = width;
45 outerHeight = height;
46 multiplier = static_cast<uint32_t>(factor);
47 sim.reset(new WaveSimulation2D_Real(width * multiplier, height * multiplier, speed, dampening));
48 // Extra frames are needed because the simulation slows down in
49 // proportion to the supersampling factor.
50 extraFrames = uint8_t(factor) - 1;
51}
uint16_t speed
Definition Noise.ino:63
UISlider dampening("Dampening", 6.0f, 0.0f, 10.0f, 0.1f)
fl::scoped_ptr< WaveSimulation2D_Real > sim

References dampening, extraFrames, multiplier, outerHeight, outerWidth, sim, and speed.

Referenced by WaveSimulation2D(), and setSuperSample().

+ Here is the caller graph for this function: