RiSpectrum

Representation of a spectrum with constant, non-overlapping box functions

[ Color | Source | Search | Keywords | Summary | Ancestors | All Members | Descendants ]

Quick Index

DESCRIPTION

Class Summary

class RiSpectrum
{
public:
RiSpectrum();
RiSpectrum(RiReal v);
static int GetNumComponents();
static RiReal GetMinLambda();
static RiReal GetMaxLambda();
static RiReal GetBinWidth(int i);
static RiSpectrum FromRGB(RiReal red, RiReal blue, RiReal green);
RiReal& operator[] (int i);
RiReal operator[] (int i) const;
RiReal GetValue( RiReal wavelength ) const;
// wavelength-related access and area functions
int GetIndexAtWavelength( RiReal lambda ) const;
void GetIndexAtWavelength(RiReal lambda, int& i, RiReal& t) const;
RiReal GetArea() const;
RiReal GetArea(RiReal l1, RiReal l2) const;
RiReal GetMinValue() const;
RiReal GetMaxValue() const;
RiReal GetAvgValue() const;
// operators
const RiSpectrum &operator=( const RiSpectrum & ) ;
const RiSpectrum &operator-=( const RiSpectrum& ) ;
const RiSpectrum &operator+==( const RiSpectrum& ) ;
const RiSpectrum &operator*==( const RiSpectrum& ) ;
const RiSpectrum &operator/==( const RiSpectrum& ) ;
const RiSpectrum &operator*==( RiReal) ;
const RiSpectrum &operator/==( RiReal) ;
RiSpectrum operator-() const;
RiSpectrum operator+() const;
RiSpectrum operator+( const RiSpectrum& ) const;
RiSpectrum operator-( const RiSpectrum& ) const;
RiSpectrum operator*( const RiSpectrum& ) const;
RiSpectrum operator/( const RiSpectrum& ) const;
RiSpectrum operator*( RiReal d ) const;
RiSpectrum operator/( RiReal d ) const;
bool operator==( const RiSpectrum& ) const;
bool operator!==( const RiSpectrum& ) const;
protected:
}; // RiSpectrum


DESCRIPTION

Represents the spectrum as a set of constant basis functions. The value of a component of the spectrum represent the average value of the function over the basis function. (ie integral of each of the basis functions is 1.0). This is important as it allows two RiSpectrum to be multiplied together and the result is a correct RiSpectrum (the averaging term for each bin is 1.0, and the product of these terms is 1.0, simple multiplication would not be possible if the basis functions had a different integral).


RiSpectrum();

    RiSpectrum();

RiSpectrum(RiReal v);

a spectrum with value v at all wavelengths

    RiSpectrum(RiReal v);

int GetNumComponents();

    static int 	GetNumComponents();

RiReal GetMinLambda();

    static RiReal GetMinLambda(); 

RiReal GetMaxLambda();

    static RiReal GetMaxLambda(); 

RiReal GetBinWidth(int i);

Allow non uniform bin widths

    static RiReal GetBinWidth(int i); 

RiSpectrum FromRGB(RiReal red, RiReal blue, RiReal green);

Convert from rgb to spectrum "optimally"

    static RiSpectrum FromRGB(RiReal red, RiReal blue, RiReal green);

RiReal& operator[] (int i);

    RiReal& operator[] (int i);      

RiReal operator[] (int i) const;

    RiReal operator[] (int i) const; 

RiReal GetValue( RiReal wavelength ) const;

    RiReal GetValue( RiReal wavelength ) const;

int GetIndexAtWavelength( RiReal lambda ) const;

    int GetIndexAtWavelength( RiReal lambda ) const;

void GetIndexAtWavelength(RiReal lambda, int& i, RiReal& t) const;

returns bin that includes lambda, and t is the position of lambda in the bin (between 0 and 1)

    void 	 GetIndexAtWavelength(RiReal lambda, int& i, RiReal& t) const;

RiReal GetArea() const;

L1 Norm of the RiSpectrum

    RiReal GetArea() const;

RiReal GetArea(RiReal l1, RiReal l2) const;

L1 Norm of the restricted range

    RiReal GetArea(RiReal l1, RiReal l2) const;

RiReal GetMinValue() const;

    RiReal GetMinValue() const;

RiReal GetMaxValue() const;

LInf Norm (assuming RiSpectrum is positive, otherwise largest)

    RiReal GetMaxValue() const;

RiReal GetAvgValue() const;

Normalized L1 Norm

    RiReal GetAvgValue() const;

const RiSpectrum &operator=( const RiSpectrum & ) ;

    const RiSpectrum &operator=( const RiSpectrum & ) ;

const RiSpectrum &operator-=( const RiSpectrum& ) ;

    const RiSpectrum &operator-=( const RiSpectrum& ) ;

const RiSpectrum &operator+=( const RiSpectrum& ) ;

    const RiSpectrum &operator+=( const RiSpectrum& ) ;

const RiSpectrum &operator*=( const RiSpectrum& ) ;

    const RiSpectrum &operator*=( const RiSpectrum& ) ;

const RiSpectrum &operator/=( const RiSpectrum& ) ;

    const RiSpectrum &operator/=( const RiSpectrum& ) ;

const RiSpectrum &operator*=( RiReal) ;

    const RiSpectrum &operator*=( RiReal) ;

const RiSpectrum &operator/=( RiReal) ;

    const RiSpectrum &operator/=( RiReal) ;

RiSpectrum operator-() const;

    RiSpectrum operator-() const;

RiSpectrum operator+() const;

    RiSpectrum operator+() const;

RiSpectrum operator+( const RiSpectrum& ) const;

    RiSpectrum operator+( const RiSpectrum& ) const;

RiSpectrum operator-( const RiSpectrum& ) const;

    RiSpectrum operator-( const RiSpectrum& ) const;

RiSpectrum operator*( const RiSpectrum& ) const;

    RiSpectrum operator*( const RiSpectrum& ) const;

RiSpectrum operator/( const RiSpectrum& ) const;

    RiSpectrum operator/( const RiSpectrum& ) const;

RiSpectrum operator*( RiReal d ) const;

    RiSpectrum operator*( RiReal d ) const;

RiSpectrum operator/( RiReal d ) const;

    RiSpectrum operator/( RiReal d ) const;

bool operator==( const RiSpectrum& ) const;

    bool operator==( const RiSpectrum& ) const;

bool operator!=( const RiSpectrum& ) const;

    bool operator!=( const RiSpectrum& ) const;

All Members

public:
static int GetNumComponents();
static RiReal GetMinLambda();
static RiReal GetMaxLambda();
static RiReal GetBinWidth(int i);
static RiSpectrum FromRGB(RiReal red, RiReal blue, RiReal green);
RiReal& operator[] (int i);
RiReal operator[] (int i) const;
RiReal GetValue( RiReal wavelength ) const;
// wavelength-related access and area functions
int GetIndexAtWavelength( RiReal lambda ) const;
void GetIndexAtWavelength(RiReal lambda, int& i, RiReal& t) const;
RiReal GetArea() const;
RiReal GetArea(RiReal l1, RiReal l2) const;
RiReal GetMinValue() const;
RiReal GetMaxValue() const;
RiReal GetAvgValue() const;
// operators
const RiSpectrum &operator=( const RiSpectrum & ) ;
const RiSpectrum &operator-=( const RiSpectrum& ) ;
const RiSpectrum &operator+==( const RiSpectrum& ) ;
const RiSpectrum &operator*==( const RiSpectrum& ) ;
const RiSpectrum &operator/==( const RiSpectrum& ) ;
const RiSpectrum &operator*==( RiReal) ;
const RiSpectrum &operator/==( RiReal) ;
RiSpectrum operator-() const;
RiSpectrum operator+() const;
RiSpectrum operator+( const RiSpectrum& ) const;
RiSpectrum operator-( const RiSpectrum& ) const;
RiSpectrum operator*( const RiSpectrum& ) const;
RiSpectrum operator/( const RiSpectrum& ) const;
RiSpectrum operator*( RiReal d ) const;
RiSpectrum operator/( RiReal d ) const;
bool operator==( const RiSpectrum& ) const;
bool operator!==( const RiSpectrum& ) const;
protected:

Ancestors

Class does not inherit from any other class.


Descendants

Class is not inherited by any others.


Generated from source by the Cocoon utilities on Fri Feb 25 15:15:03 2000 .