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

◆ convertToLookUpTable()

void fl::XYMap::convertToLookUpTable ( )

Definition at line 95 of file xymap.cpp.hpp.

95 {
96 if (type == kLookUpTable) {
97 return;
98 }
100 u16 *data = mLookUpTable->getDataMutable();
101 for (u16 y = 0; y < height; y++) {
102 for (u16 x = 0; x < width; x++) {
103 data[y * width + x] = mapToIndex(x, y);
104 }
105 }
107 xyFunction = nullptr;
108}
u16 mapToIndex(const u16 &x, const u16 &y) const FL_NOEXCEPT
XYFunction xyFunction
Definition xymap.h:130
u16 width
Definition xymap.h:128
@ kLookUpTable
Definition xymap.h:43
u16 height
Definition xymap.h:129
fl::LUT16Ptr mLookUpTable
Definition xymap.h:131
XyMapType type
Definition xymap.h:127
shared_ptr< T > make_shared(Args &&... args) FL_NOEXCEPT
Definition shared_ptr.h:414

References height, kLookUpTable, fl::make_shared(), mapToIndex(), mLookUpTable, type, width, fl::x, xyFunction, and fl::y.

Referenced by operator=().

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