MCPcopy Create free account
hub / github.com/FastLED/FastLED / convertToLookUpTable

Method convertToLookUpTable

src/fl/math/xymap.cpp.hpp:95–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95void XYMap::convertToLookUpTable() {
96 if (type == kLookUpTable) {
97 return;
98 }
99 mLookUpTable = fl::make_shared<LUT16>(width * height);
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 }
106 type = kLookUpTable;
107 xyFunction = nullptr;
108}
109
110void XYMap::setRectangularGrid() {
111 type = kLineByLine;

Callers

nothing calls this directly

Calls 1

getDataMutableMethod · 0.80

Tested by

no test coverage detected