MCPcopy Create free account
hub / github.com/OpenSees/OpenSees / getBlue

Method getBlue

SRC/renderer/PlainMap.cpp:162–183  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160}
161
162float
163PlainMap::getBlue(float value) {
164 if (value > max)
165 max = value;
166 else if (value < min)
167 min = value;
168
169 if (maxLast == minLast) {
170 int index = sizeData/2;
171 return data[index*3-1];
172
173 } else if (value > maxLast)
174 return data[sizeData*3-1];
175 else if (value < minLast)
176 return data[2];
177 else {
178 int index = (floor)((value-minLast)*sizeData/((maxLast-minLast)));
179 return data[index*3-1];
180 }
181
182 return 0.0;
183}
184
185int
186PlainMap::getRGB(float value, float &red, float &blue, float &green) {

Callers 6

getRGBMethod · 0.95
drawLineMethod · 0.45
drawTriangleMethod · 0.45
drawPointMethod · 0.45
drawLineMethod · 0.45
drawPolygonMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected