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

◆ toScreenMap()

fl::ScreenMap fl::Corkscrew::toScreenMap ( float diameter = 0.5f) const

Definition at line 456 of file corkscrew.cpp.

456 {
457 // Create a ScreenMap with the correct number of LEDs
458 fl::ScreenMap screenMap(mNumLeds, diameter);
459
460 // For each LED index, calculate its position and set it in the ScreenMap
461 for (fl::u16 i = 0; i < mNumLeds; ++i) {
462 // Get the wrapped 2D position for this LED index in the cylindrical mapping
463 vec2f position = at_exact(i);
464
465 // Set the wrapped position in the ScreenMap
466 screenMap.set(i, position);
467 }
468
469 return screenMap;
470}
fl::u16 mNumLeds
Definition corkscrew.h:230
vec2f at_exact(fl::u16 i) const
void set(u16 index, const vec2f &p)
fl::ScreenMap screenMap
Definition Corkscrew.h:103
vec2< float > vec2f
Definition geometry.h:333

References at_exact(), mNumLeds, and screenMap.

+ Here is the call graph for this function: