Spectrum Class Reference

#include <color.h>

List of all members.

Public Member Functions

 Spectrum (float v=0.f)
 Spectrum (float cs[COLOR_SAMPLES])
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 operator- () const
Spectrum Clamp (float low=0.f, float high=INFINITY) const
bool IsNaN () const
void Print (FILE *f) const
void XYZ (float xyz[3]) const
float y () const
bool operator< (const Spectrum &s2) const

Static Public Attributes

static const int CIEstart = 360
static const int CIEend = 830
static const int nCIE = CIEend-CIEstart+1
static const float CIE_X [nCIE]
static const float CIE_Y [nCIE]
static const float CIE_Z [nCIE]

Private Attributes

float c [COLOR_SAMPLES]

Static Private Attributes

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

Friends

class 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 29 of file color.h.


Constructor & Destructor Documentation

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

Definition at line 32 of file color.h.

References COLOR_SAMPLES.

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

Definition at line 36 of file color.h.


Member Function Documentation

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

Definition at line 41 of file color.h.

References c, and COLOR_SAMPLES.

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

Definition at line 46 of file color.h.

References c, and COLOR_SAMPLES.

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

Definition at line 52 of file color.h.

References c, and COLOR_SAMPLES.

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

Definition at line 58 of file color.h.

References c, and COLOR_SAMPLES.

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

Definition at line 64 of file color.h.

References c, and COLOR_SAMPLES.

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

Definition at line 70 of file color.h.

References c, and COLOR_SAMPLES.

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

Definition at line 75 of file color.h.

References c, and COLOR_SAMPLES.

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

Definition at line 81 of file color.h.

References COLOR_SAMPLES.

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

Definition at line 90 of file color.h.

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

Definition at line 93 of file color.h.

References COLOR_SAMPLES.

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

Definition at line 99 of file color.h.

References c, and COLOR_SAMPLES.

Referenced by ImageFilm::AddSample().

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

Definition at line 103 of file color.h.

References c, and COLOR_SAMPLES.

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

Definition at line 108 of file color.h.

bool Spectrum::Black (  )  const [inline]

Spectrum Spectrum::Sqrt (  )  const [inline]

Definition at line 116 of file color.h.

References c, and COLOR_SAMPLES.

Referenced by FresnelApproxEta(), and FresnelApproxK().

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

Definition at line 122 of file color.h.

References c, and COLOR_SAMPLES.

Referenced by Lafortune::f().

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

Definition at line 128 of file color.h.

References c, and COLOR_SAMPLES.

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

Definition at line 140 of file color.h.

References c, Clamp(), and COLOR_SAMPLES.

Referenced by MIPMap< Spectrum >::clamp(), FresnelApproxEta(), and FresnelApproxK().

bool Spectrum::IsNaN (  )  const [inline]

Definition at line 147 of file color.h.

References COLOR_SAMPLES.

Referenced by Scene::Render().

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

Definition at line 152 of file color.h.

References COLOR_SAMPLES.

void Spectrum::XYZ ( float  xyz[3]  )  const [inline]

Definition at line 156 of file color.h.

References COLOR_SAMPLES.

float Spectrum::y (  )  const [inline]

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

Definition at line 170 of file color.h.

References y().


Friends And Related Function Documentation

friend class ParamSet [friend]

Definition at line 173 of file color.h.

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

Definition at line 27 of file color.cpp.

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

Definition at line 87 of file color.h.

Spectrum Exp ( const Spectrum s  )  [friend]

Definition at line 134 of file color.h.

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

Definition at line 44 of file color.cpp.


Member Data Documentation

const int Spectrum::CIEstart = 360 [static]

Definition at line 176 of file color.h.

const int Spectrum::CIEend = 830 [static]

Definition at line 177 of file color.h.

const int Spectrum::nCIE = CIEend-CIEstart+1 [static]

Definition at line 178 of file color.h.

const float Spectrum::CIE_X [static]

Definition at line 179 of file color.h.

const float Spectrum::CIE_Y [static]

Definition at line 180 of file color.h.

const float Spectrum::CIE_Z [static]

Definition at line 181 of file color.h.

float Spectrum::c[COLOR_SAMPLES] [private]

float Spectrum::XWeight [static, private]

Initial value:

 {
        0.412453f, 0.357580f, 0.180423f
}

Definition at line 185 of file color.h.

float Spectrum::YWeight [static, private]

Initial value:

 {
        0.212671f, 0.715160f, 0.072169f
}

Definition at line 186 of file color.h.

float Spectrum::ZWeight [static, private]

Initial value:

 {
        0.019334f, 0.119193f, 0.950227f
}

Definition at line 187 of file color.h.


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

Generated on Mon Jul 20 17:31:56 2009 for pbrt by  doxygen 1.5.6