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

◆ convertToLookUpTable()

void fl::XYMap::convertToLookUpTable ( )

Definition at line 74 of file xymap.cpp.

74 {
75 if (type == kLookUpTable) {
76 return;
77 }
79 u16 *data = mLookUpTable->getDataMutable();
80 for (u16 y = 0; y < height; y++) {
81 for (u16 x = 0; x < width; x++) {
82 data[y * width + x] = mapToIndex(x, y);
83 }
84 }
86 xyFunction = nullptr;
87}
int y
Definition simple.h:93
int x
Definition simple.h:92
XYFunction xyFunction
Definition xymap.h:129
u16 width
Definition xymap.h:127
u16 mapToIndex(const u16 &x, const u16 &y) const
Definition xymap.cpp:95
@ kLookUpTable
Definition xymap.h:47
u16 height
Definition xymap.h:128
fl::LUT16Ptr mLookUpTable
Definition xymap.h:130
XyMapType type
Definition xymap.h:126
shared_ptr< T > make_shared(Args &&... args)
Definition shared_ptr.h:348

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

+ Here is the call graph for this function: