#ifndef RIBACKGROUND_H #define RIBACKGROUND_H #ifndef RICOMMON_H #include #endif #ifndef RISPECTRUM_H #include #endif #ifndef RIVECTOR3_H #include #endif #ifndef RIVECTOR2_H #include #endif /*************************************************************** CLASS RiBackground Abstraction of all operations needed for a background object. DESCRIPTION All operations needed for a a background object such as returning the spectral radiance in a given direction or sampling itself are given. ****************************************************************/ class RiBackground { public: //// virtual RiSpectrum GetValue( const RiVector3 &direction ) const = 0; //// Given a seed returns a sample // with prob representing the pdf // with solid angle measure. Defaults to prob = cos/pi // with z axis "up". virtual bool GetSample( const RiVector2 &seed, RiUnitVector3 &direction, RiReal &prob ) const; }; class RiConstantBackground : public RiBackground { public: //// RiConstantBackground( const RiSpectrum& bg ); //// virtual RiSpectrum GetValue( const RiVector3 &direction ) const; protected: //// The value to be used for the background RiSpectrum background; }; #endif /* RIBACKGROUND_H */