MCPcopy Create free account
hub / github.com/Theverat/NormalmapGenerator / invert

Method invert

src_generators/intensitymap.cpp:123–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121}
122
123void IntensityMap::invert() {
124 #pragma omp parallel for
125 for(int y = 0; y < this->getHeight(); y++) {
126 for(int x = 0; x < this->getWidth(); x++) {
127 const double inverted = 1.0 - this->map.at(y).at(x);
128 this->map.at(y).at(x) = inverted;
129 }
130 }
131}
132
133QImage IntensityMap::convertToQImage() const {
134 QImage result(this->getWidth(), this->getHeight(), QImage::Format_ARGB32);

Callers 1

calculateNormalmapMethod · 0.80

Calls 3

getHeightMethod · 0.95
getWidthMethod · 0.95
atMethod · 0.80

Tested by

no test coverage detected