Spectrum with floating point elements and operations. More...

Public Types | |
| typedef Spectrum_struct | Pod_type |
| POD class corresponding to this spectrum. More... |
|
| typedef Spectrum_struct | storage_type |
| Storage class used by this spectrum. More... |
|
| typedef Float32 | value_type |
| Element type. More... |
|
| typedef Size | size_type |
| Size type, unsigned. More... |
|
| typedef Difference | difference_type |
| Difference type, signed. More... |
|
| typedef Float32 * | pointer |
| Mutable pointer to element. More... |
|
| typedef const Float32 * | const_pointer |
| Const pointer to element. More... |
|
| typedef Float32 & | reference |
| Mutable reference to element. More... |
|
| typedef const Float32 & | const_reference |
| Const reference to element. More... |
|
Public Member Functions | |
| Float32 * | begin () |
| Returns the pointer to the first spectrum element. More... |
|
| const Float32 * | begin () const |
| Returns the pointer to the first spectrum element. More... |
|
| Float32 * | end () |
| Returns the past-the-end pointer. More... |
|
| const Float32 * | end () const |
| Returns the past-the-end pointer. More... |
|
| Spectrum () | |
| The default constructor leaves the spectrum elements uninitialized. More... |
|
| Spectrum (const Spectrum_struct &s) | |
| Constructor from underlying storage type. More... |
|
| Spectrum (const Float32 s) | |
Constructor initializes all vector elements to the value s. More... |
|
| Spectrum (Float32 nr, Float32 ng, Float32 nb) | |
Constructor initializes (r,g,b) from (nr,ng,nb). More... |
|
| Spectrum (const Vector< Float32, 3 > &v3) | |
| Conversion from Vector<Float32,3>. More... |
|
| Spectrum (const Vector< Float32, 4 > &v4) | |
| Conversion from Vector<Float32,4>. More... |
|
| Spectrum (const Color &col) | |
| Conversion from Color. More... |
|
| Vector< Float32, 3 > | to_vector3 () const |
| Conversion to Vector<Float32,3>. More... |
|
| Vector< Float32, 4 > | to_vector4 () const |
| Conversion to Vector<Float32,4>. More... |
|
| Spectrum & | operator= (const Spectrum &s) |
| Assignment operator. More... |
|
| const Float32 & | operator[] (Size i) const |
Accesses the i-th spectrum element, 0 <= i < 3. More... |
|
| Float32 & | operator[] (Size i) |
Accesses the i-th spectrum element, 0 <= i < 3. More... |
|
| Float32 | get (Size i) const |
Returns the i-th spectrum element, 0 <= i < 3. More... |
|
| void | set (Size i, Float32 value) |
Sets the i-th spectrum element to value, 0 <= i < 3. More... |
|
| bool | is_black () const |
Returns true if the spectrum is black ignoring the alpha value. More... |
|
| Float32 | linear_intensity () const |
| Returns the intensity of the RGB components, equally weighted. More... |
|
Static Public Member Functions | |
| static Size | size () |
| Constant size of the spectrum. More... |
|
| static Size | max_size () |
| Constant maximum size of the spectrum. More... |
|
Public Attributes | |
| Float32 | c [3] |
| Three color bands. More... |
|
Static Public Attributes | |
| static const Size | SIZE = 3 |
| Constant size of the spectrum. More... |
|
Spectrum with floating point elements and operations.
The spectrum class is a model of the STL container concept. It provides random access to its elements and corresponding random access iterators.
#include <mi/math/spectrum.h> | typedef const Float32* mi::math::Spectrum::const_pointer |
Const pointer to element.
| typedef const Float32& mi::math::Spectrum::const_reference |
Const reference to element.
Difference type, signed.
POD class corresponding to this spectrum.
| typedef Float32* mi::math::Spectrum::pointer |
Mutable pointer to element.
| typedef Float32& mi::math::Spectrum::reference |
Mutable reference to element.
| typedef Size mi::math::Spectrum::size_type |
Size type, unsigned.
Storage class used by this spectrum.
Element type.
|
inline |
The default constructor leaves the spectrum elements uninitialized.
|
inline |
Constructor from underlying storage type.
|
inlineexplicit |
Constructor initializes all vector elements to the value s.
Constructor initializes (r,g,b) from (nr,ng,nb).
Conversion from Vector<Float32,3>.
Conversion from Vector<Float32,4>.
|
inlineexplicit |
Conversion from Color.
|
inline |
Returns the pointer to the first spectrum element.
|
inline |
Returns the pointer to the first spectrum element.
|
inline |
|
inline |
Returns the i-th spectrum element, 0 <= i < 3.
|
inline |
Returns true if the spectrum is black ignoring the alpha value.
|
inline |
Returns the intensity of the RGB components, equally weighted.
|
inlinestatic |
Constant maximum size of the spectrum.
Accesses the i-th spectrum element, 0 <= i < 3.
Accesses the i-th spectrum element, 0 <= i < 3.
Sets the i-th spectrum element to value, 0 <= i < 3.
|
inlinestatic |
Constant size of the spectrum.
|
inherited |
Three color bands.
|
static |
Constant size of the spectrum.