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

◆ convertToLookUpTable()

void fl::XYMap::convertToLookUpTable ( )

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

104 {
105 if (type == kLookUpTable) {
106 return;
107 }
109 u16 *data = mLookUpTable->getDataMutable();
110 for (u16 y = 0; y < height; y++) {
111 for (u16 x = 0; x < width; x++) {
112 data[y * width + x] = mapToIndex(x, y);
113 }
114 }
116 xyFunction = nullptr;
117}
XYFunction xyFunction
Definition xymap.h:130
u16 mapToIndex(const u16 &x, const u16 &y) const FL_NO_EXCEPT
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_NO_EXCEPT
Definition shared_ptr.h:423

References fl::FL_NO_EXCEPT, height, kLookUpTable, fl::adl_barrier::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: