FastLED 3.10.6
Loading...
Searching...
No Matches

◆ convertToLookUpTable()

void fl::XYMap::convertToLookUpTable ( )

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

103 {
104 if (type == kLookUpTable) {
105 return;
106 }
108 u16 *data = mLookUpTable->getDataMutable();
109 for (u16 y = 0; y < height; y++) {
110 for (u16 x = 0; x < width; x++) {
111 data[y * width + x] = mapToIndex(x, y);
112 }
113 }
115 xyFunction = nullptr;
116}
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: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: