MCPcopy Create free account
hub / github.com/OpenPathGuidingLibrary/openpgl / pgl_spectrum

Class pgl_spectrum

openpgl/include/openpgl/common.h:265–288  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

263////////////////////////////////////////////////////////////////////////
264
265struct 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
290typedef pgl_vec3f pgl_spectrum;
291#endif

Callers

nothing calls this directly

Calls 2

rgbe2vec3fFunction · 0.85
vec3f2rgbeFunction · 0.85

Tested by

no test coverage detected