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

◆ setSuperSample()

void fl::WaveSimulation2D::setSuperSample ( SuperSample factor)
inline

Definition at line 146 of file wave_simulation.h.

146 {
147 if (u32(factor) == mMultiplier) {
148 return;
149 }
150 // Preserve a user-set stencil across re-init. Without this, the
151 // wrapper's auto-select (NinePointIsotropic at multiplier >= 2)
152 // overwrites a toggle the user made via setStencil().
153 const LaplacianStencil saved_stencil = mSim->getStencil();
154 const bool stencil_was_user_set = mUserSetStencil;
155 init(mOuterWidth, mOuterHeight, factor, mSim->getSpeed(),
156 mSim->getDampenening());
157 if (stencil_was_user_set) {
158 mSim->setStencil(saved_stencil);
159 mUserSetStencil = true;
160 }
161 }
void init(u32 width, u32 height, SuperSample factor, float speed, int dampening)
fl::unique_ptr< WaveSimulation2D_Real > mSim

References init(), mMultiplier, mOuterHeight, mOuterWidth, mSim, and mUserSetStencil.

+ Here is the call graph for this function: