lux::Spectrum Class Reference

#include <spectrum.h>

List of all members.

Public Member Functions

 Spectrum (float v=0.f)
 Spectrum (const float cs[COLOR_SAMPLES])
Spectrumoperator+= (const Spectrum &s2)
Spectrumoperator-= (const Spectrum &s2)
Spectrum operator+ (const Spectrum &s2) const
Spectrum operator- (const Spectrum &s2) const
Spectrum operator/ (const Spectrum &s2) const
Spectrum operator* (const Spectrum &sp) const
Spectrumoperator*= (const Spectrum &sp)
Spectrum operator* (float a) const
Spectrumoperator*= (float a)
Spectrum operator/ (float a) const
Spectrumoperator/= (float a)
void AddWeighted (float w, const Spectrum &s)
bool operator== (const Spectrum &sp) const
bool operator!= (const Spectrum &sp) const
bool Black () const
Spectrum Sqrt () const
Spectrum Pow (const Spectrum &e) const
Spectrum Pow (const float e) const
Spectrum operator- () const
Spectrum Clamp (float low=0.f, float high=INFINITY) const
bool IsNaN () const
void Print (FILE *f) const
XYZColor ToXYZ () const
float y () const
bool operator< (const Spectrum &s2) const

Public Attributes

float c [COLOR_SAMPLES]

Static Protected Attributes

static float XWeight [COLOR_SAMPLES]
static float YWeight [COLOR_SAMPLES]
static float ZWeight [COLOR_SAMPLES]

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)

Friends

class boost::serialization::access
class lux::ParamSet
ostream & operator<< (ostream &, const Spectrum &)
Spectrum operator* (float a, const Spectrum &s)
Spectrum Exp (const Spectrum &s)
Spectrum FromXYZ (float x, float y, float z)


Detailed Description

Definition at line 43 of file spectrum.h.


Constructor & Destructor Documentation

lux::Spectrum::Spectrum ( float  v = 0.f  )  [inline]

Definition at line 47 of file spectrum.h.

References c, and COLOR_SAMPLES.

lux::Spectrum::Spectrum ( const float  cs[COLOR_SAMPLES]  )  [inline]

Definition at line 52 of file spectrum.h.

References c.


Member Function Documentation

void lux::Spectrum::AddWeighted ( float  w,
const Spectrum s 
) [inline]

Definition at line 120 of file spectrum.h.

References c, and COLOR_SAMPLES.

Referenced by lux::ImageFilm::AddSample().

bool lux::Spectrum::Black (  )  const [inline]

Spectrum lux::Spectrum::Clamp ( float  low = 0.f,
float  high = INFINITY 
) const [inline]

Definition at line 167 of file spectrum.h.

References c, and COLOR_SAMPLES.

Referenced by lux::MIPMapImpl< T, U >::clamp().

bool lux::Spectrum::IsNaN (  )  const [inline]

Definition at line 174 of file spectrum.h.

References c, and COLOR_SAMPLES.

Referenced by lux::ImageFilm::AddSample().

bool lux::Spectrum::operator!= ( const Spectrum sp  )  const [inline]

Definition at line 129 of file spectrum.h.

Spectrum lux::Spectrum::operator* ( float  a  )  const [inline]

Definition at line 96 of file spectrum.h.

References c, and COLOR_SAMPLES.

Spectrum lux::Spectrum::operator* ( const Spectrum sp  )  const [inline]

Definition at line 85 of file spectrum.h.

References c, and COLOR_SAMPLES.

Spectrum& lux::Spectrum::operator*= ( float  a  )  [inline]

Definition at line 102 of file spectrum.h.

References c, and COLOR_SAMPLES.

Spectrum& lux::Spectrum::operator*= ( const Spectrum sp  )  [inline]

Definition at line 91 of file spectrum.h.

References c, and COLOR_SAMPLES.

Spectrum lux::Spectrum::operator+ ( const Spectrum s2  )  const [inline]

Definition at line 67 of file spectrum.h.

References c, and COLOR_SAMPLES.

Spectrum& lux::Spectrum::operator+= ( const Spectrum s2  )  [inline]

Definition at line 57 of file spectrum.h.

References c, and COLOR_SAMPLES.

Spectrum lux::Spectrum::operator- (  )  const [inline]

Definition at line 155 of file spectrum.h.

References c, and COLOR_SAMPLES.

Spectrum lux::Spectrum::operator- ( const Spectrum s2  )  const [inline]

Definition at line 73 of file spectrum.h.

References c, and COLOR_SAMPLES.

Spectrum& lux::Spectrum::operator-= ( const Spectrum s2  )  [inline]

Definition at line 62 of file spectrum.h.

References c, and COLOR_SAMPLES.

Spectrum lux::Spectrum::operator/ ( float  a  )  const [inline]

Definition at line 111 of file spectrum.h.

Spectrum lux::Spectrum::operator/ ( const Spectrum s2  )  const [inline]

Definition at line 79 of file spectrum.h.

References c, and COLOR_SAMPLES.

Spectrum& lux::Spectrum::operator/= ( float  a  )  [inline]

Definition at line 114 of file spectrum.h.

References c, and COLOR_SAMPLES.

bool lux::Spectrum::operator< ( const Spectrum s2  )  const [inline]

Definition at line 199 of file spectrum.h.

References y().

bool lux::Spectrum::operator== ( const Spectrum sp  )  const [inline]

Definition at line 124 of file spectrum.h.

References c, and COLOR_SAMPLES.

Spectrum lux::Spectrum::Pow ( const float  e  )  const [inline]

Definition at line 149 of file spectrum.h.

References c, and COLOR_SAMPLES.

Spectrum lux::Spectrum::Pow ( const Spectrum e  )  const [inline]

Definition at line 143 of file spectrum.h.

References c, and COLOR_SAMPLES.

void lux::Spectrum::Print ( FILE *  f  )  const [inline]

Definition at line 179 of file spectrum.h.

References c, and COLOR_SAMPLES.

template<class Archive >
void lux::Spectrum::serialize ( Archive &  ar,
const unsigned int  version 
) [inline, private]

Definition at line 216 of file spectrum.h.

References c, and COLOR_SAMPLES.

Spectrum lux::Spectrum::Sqrt (  )  const [inline]

Definition at line 137 of file spectrum.h.

References c, and COLOR_SAMPLES.

XYZColor lux::Spectrum::ToXYZ (  )  const [inline]

Definition at line 183 of file spectrum.h.

References c, COLOR_SAMPLES, XWeight, YWeight, and ZWeight.

float lux::Spectrum::y (  )  const [inline]


Friends And Related Function Documentation

friend class boost::serialization::access [friend]

Definition at line 44 of file spectrum.h.

Spectrum Exp ( const Spectrum s  )  [friend]

Definition at line 161 of file spectrum.h.

Spectrum FromXYZ ( float  x,
float  y,
float  z 
) [friend]

friend class lux::ParamSet [friend]

Definition at line 202 of file spectrum.h.

Spectrum operator* ( float  a,
const Spectrum s 
) [friend]

Definition at line 108 of file spectrum.h.

ostream& operator<< ( ostream &  os,
const Spectrum s 
) [friend]

Definition at line 34 of file spectrum.cpp.


Member Data Documentation

float lux::Spectrum::c[COLOR_SAMPLES]

float Spectrum::XWeight [static, protected]

Initial value:

 {
        0.412453f, 0.357580f, 0.180423f
}

Definition at line 209 of file spectrum.h.

Referenced by ToXYZ().

float Spectrum::YWeight [static, protected]

Initial value:

 {
        0.212671f, 0.715160f, 0.072169f
}

Definition at line 210 of file spectrum.h.

Referenced by ToXYZ(), and y().

float Spectrum::ZWeight [static, protected]

Initial value:

 {
        0.019334f, 0.119193f, 0.950227f
}

Definition at line 211 of file spectrum.h.

Referenced by ToXYZ().


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

Generated on Tue Nov 10 01:36:40 2009 for lux by  doxygen 1.5.9