CMU462 Library  1.0
15-462/15-662: Computer Graphics (Fall 2015)
Public Member Functions | Public Attributes | List of all members
CMU462::Spectrum Class Reference

Encodes radiance & irradiance values by the intensity of each visible spectrum. More...

#include <spectrum.h>

Public Member Functions

 Spectrum (double r=0, double g=0, double b=0)
 Parameterized Constructor. More...
 
 Spectrum (const uint8_t *arr)
 Constructor. More...
 

Public Attributes

double r
 intensity of red spectrum
 
double g
 intensity of green spectrum
 
double b
 intensity of blue spectrum
 

Detailed Description

Encodes radiance & irradiance values by the intensity of each visible spectrum.

Note that this is not strictly an actual spectrum with all wavelengths, but it gives us enough information as we can only sense a particular wavelengths.

Constructor & Destructor Documentation

CMU462::Spectrum::Spectrum ( double  r = 0,
double  g = 0,
double  b = 0 
)
inline

Parameterized Constructor.

Initialize from component values.

Parameters
rIntensity of the red spectrum
gIntensity of the green spectrum
bIntensity of the blue spectrum
CMU462::Spectrum::Spectrum ( const uint8_t *  arr)

Constructor.

Initialize from an 8-bit RGB color represented as a uint8_t array.

Parameters
arrArray containing component values.

The documentation for this class was generated from the following file: