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

Class IntensityMap

src_generators/intensitymap.h:27–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25#include <QImage>
26
27class IntensityMap
28{
29public:
30 enum Mode {
31 AVERAGE,
32 MAX
33 };
34
35 IntensityMap();
36 IntensityMap(int width, int height);
37 IntensityMap(const QImage &rgbImage, Mode mode, bool useRed = true, bool useGreen = true, bool useBlue = true, bool useAlpha = false);
38 double at(int x, int y) const;
39 double at(int pos) const;
40 void setValue(int x, int y, double value);
41 void setValue(int pos, double value);
42 size_t getWidth() const;
43 size_t getHeight() const;
44 void invert();
45 QImage convertToQImage() const;
46
47private:
48 std::vector< std::vector<double> > map;
49};
50
51#endif // INTENSITYMAP_H

Callers 4

calculateMethod · 0.85
calculateMethod · 0.85
calculateNormalmapMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected