FastLED 3.10.8
Loading...
Searching...
No Matches

◆ init()

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

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

279 {
281 mMultiplier = static_cast<u32>(factor);
282 mSim.reset(); // clear out memory first.
284 // Extra updates (frames) are applied because the simulation slows down in
285 // proportion to the supersampling factor.
286 mExtraFrames = static_cast<u8>(factor) - 1;
287}
uint16_t speed
Definition Noise.ino:72
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)
fl::enable_if<!fl::is_array< T >::value, unique_ptr< T > >::type make_unique(Args &&... args) FL_NO_EXCEPT
Definition unique_ptr.h:263
unsigned char u8
Definition stdint.h:131

References dampening(), fl::FL_NO_EXCEPT, length(), fl::adl_barrier::make_unique(), mExtraFrames, mMultiplier, mOuterLength, mSim, and speed.

Referenced by setSuperSample().

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