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

◆ init()

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

Definition at line 277 of file wave_simulation.cpp.hpp.

278 {
280 mMultiplier = static_cast<u32>(factor);
281 mSim.reset(); // clear out memory first.
283 // Extra updates (frames) are applied because the simulation slows down in
284 // proportion to the supersampling factor.
285 mExtraFrames = static_cast<u8>(factor) - 1;
286}
uint16_t speed
Definition Noise.ino:66
fl::unique_ptr< WaveSimulation1D_Real > mSim
fl::UISlider length("Length", 1.0f, 0.0f, 1.0f, 0.01f)
fl::UISlider dampening("Dampening", 6.0f, 0.0f, 10.0f, 0.1f)
unsigned char u8
Definition stdint.h:131
fl::enable_if<!fl::is_array< T >::value, unique_ptr< T > >::type make_unique(Args &&... args) FL_NOEXCEPT
Definition unique_ptr.h:261

References dampening(), length(), fl::make_unique(), 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: