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 231 of file wave_simulation.cpp.

232 {
234 mMultiplier = static_cast<uint32_t>(factor);
235 mSim.reset(); // clear out memory first.
236 mSim.reset(
237 new WaveSimulation1D_Real(length * mMultiplier, speed, dampening));
238 // Extra updates (frames) are applied because the simulation slows down in
239 // proportion to the supersampling factor.
240 mExtraFrames = static_cast<uint8_t>(factor) - 1;
241}
UISlider dampening("Dampening", 6.0f, 0.0f, 10.0f, 0.1f)
fl::scoped_ptr< WaveSimulation1D_Real > mSim
UISlider length("Length", 1.0f, 0.0f, 1.0f, 0.01f)
uint16_t speed
Definition funky.cpp:82

References dampening, length(), mExtraFrames, mMultiplier, mOuterLength, mSim, and speed.

Referenced by WaveSimulation1D(), and setSuperSample().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: