| 263 | //////////////////////////////////////////////////////////////////////// |
| 264 | |
| 265 | struct pgl_spectrum |
| 266 | { |
| 267 | uint32_t spectrum; |
| 268 | #ifdef __cplusplus |
| 269 | pgl_spectrum() {} |
| 270 | pgl_spectrum(const float r, const float g, const float b) |
| 271 | { |
| 272 | spectrum = vec3f2rgbe({r, g, b}); |
| 273 | } |
| 274 | pgl_spectrum(const pgl_vec3f rgb) |
| 275 | { |
| 276 | spectrum = vec3f2rgbe(rgb); |
| 277 | } |
| 278 | operator pgl_vec3f() const |
| 279 | { |
| 280 | return rgbe2vec3f(spectrum); |
| 281 | } |
| 282 | pgl_spectrum &operator=(const pgl_vec3f &rgb) |
| 283 | { |
| 284 | spectrum = vec3f2rgbe(rgb); |
| 285 | return *this; |
| 286 | } |
| 287 | #endif |
| 288 | }; |
| 289 | #else |
| 290 | typedef pgl_vec3f pgl_spectrum; |
| 291 | #endif |
nothing calls this directly
no test coverage detected