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

◆ initializeCache()

void fl::Corkscrew::initializeCache ( ) const
private

Definition at line 205 of file corkscrew.cpp.

205 {
207 // Initialize cache with tiles for each LED position
208 mTileCache.resize(mNumLeds);
209
210 // Populate cache lazily
211 for (fl::size i = 0; i < mNumLeds; ++i) {
212 mTileCache[i] = calculateTileAtWrap(static_cast<float>(i));
213 }
214
215 mCacheInitialized = true;
216 }
217}
Tile2x2_u8_wrap calculateTileAtWrap(float i) const
fl::u16 mNumLeds
Definition corkscrew.h:230
bool mCacheInitialized
Definition corkscrew.h:247
fl::vector< Tile2x2_u8_wrap > mTileCache
Definition corkscrew.h:246
bool mCachingEnabled
Definition corkscrew.h:248

References calculateTileAtWrap(), mCacheInitialized, mCachingEnabled, mNumLeds, and mTileCache.

Referenced by at_wrap().

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