MCPcopy Create free account
hub / github.com/DFHack/dfhack / rgbf

Class rgbf

plugins/rendermax/renderer_opengl.hpp:187–255  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

185};
186
187struct rgbf
188{
189 float r,g,b;
190 rgbf():r(0),g(0),b(0)
191 {
192
193 }
194 rgbf(float r,float g,float b):r(r),g(g),b(b)
195 {
196
197 }
198 rgbf operator-(const rgbf& cell) const
199 {
200 return rgbf(r-cell.r,g-cell.g,b-cell.b);
201 }
202 rgbf operator*(float val)const
203 {
204 return rgbf(r*val,g*val,b*val);
205 }
206 rgbf operator/(float val) const
207 {
208 return rgbf(r/val,g/val,b/val);
209 }
210 rgbf operator*(const rgbf& cell) const
211 {
212 return rgbf(r*cell.r,g*cell.g,b*cell.b);
213 }
214 rgbf operator*=(float val)
215 {
216 r*=val;
217 g*=val;
218 b*=val;
219 return *this;
220 }
221 rgbf operator*=(const rgbf& cell)
222 {
223 r*=cell.r;
224 g*=cell.g;
225 b*=cell.b;
226 return *this;
227 }
228 rgbf operator+=(const rgbf& cell)
229 {
230 r+=cell.r;
231 g+=cell.g;
232 b+=cell.b;
233 return *this;
234 }
235 rgbf operator+(const rgbf& other) const
236 {
237 return rgbf(r+other.r,g+other.g,b+other.b);
238 }
239 bool operator<=(const rgbf& other) const
240 {
241 return r<=other.r && g<=other.g && b<=other.b;
242 }
243 float dot(const rgbf& other) const
244 {

Callers 15

reinitMethod · 0.85
blendMaxFunction · 0.85
clearMethod · 0.85
calculateMethod · 0.85
getStandartColorFunction · 0.85
applyMaterialMethod · 0.85
getSkyColorMethod · 0.85
doOcupancyAndLightsMethod · 0.85
defaultSettingsMethod · 0.85
workMethod · 0.85
lightUpCellMethod · 0.85
resetGridsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected