DirectIllumination.h
Go to the documentation of this file.00001 /**<!--------------------------------------------------------------------> 00002 @class DirectIllumination 00003 @author Travis Fischer (fisch0920@gmail.com) 00004 @author Matthew Jacobs (jacobs.mh@gmail.com) 00005 @date Fall 2008 00006 00007 @brief 00008 Interface for estimating direct illumination from all luminaires in 00009 a scene to a given surface point on a surface 00010 <!-------------------------------------------------------------------->**/ 00011 00012 #ifndef DIRECT_ILLUMINATION_H_ 00013 #define DIRECT_ILLUMINATION_H_ 00014 00015 #include <utils/PropertyMap.h> 00016 #include <utils/SpectralSampleSet.h> 00017 00018 class SampleGenerator; 00019 class SurfacePoint; 00020 class Renderer; 00021 00022 class DirectIllumination : public PropertyMap { 00023 public: 00024 ///@name Constructors 00025 //@{----------------------------------------------------------------- 00026 00027 inline DirectIllumination(Renderer *renderer) 00028 : m_renderer(renderer) 00029 { } 00030 00031 virtual ~DirectIllumination(); 00032 00033 00034 //@}----------------------------------------------------------------- 00035 ///@name Initialization routines 00036 //@{----------------------------------------------------------------- 00037 00038 /** 00039 * @brief 00040 * Performs any initialization which may be necessary before 00041 * beginning to sample direct illumination 00042 * 00043 * @note 00044 * Default implementation initializes several values from the 00045 * PropertyMap 00046 */ 00047 virtual void init(); 00048 00049 00050 //@}----------------------------------------------------------------- 00051 ///@name Main usage interface 00052 //@{----------------------------------------------------------------- 00053 00054 /** 00055 * @brief 00056 * Attempts to estimate the direct illumination contribution from 00057 * all emitters in the scene to the given surface point 00058 */ 00059 virtual SpectralSampleSet evaluate(SurfacePoint &pt); 00060 00061 /** 00062 * @brief 00063 * Attempts to estimate the direct illumination contribution from 00064 * all emitters in the scene to the given surface point 00065 */ 00066 virtual SpectralSampleSet evaluate(SurfacePoint &pt, unsigned noDirectSamples); 00067 00068 00069 //@}----------------------------------------------------------------- 00070 ///@name Accessors / Mutators 00071 //@{----------------------------------------------------------------- 00072 00073 inline SampleGenerator *getSampleGenerator() { 00074 return m_generator; 00075 } 00076 00077 inline unsigned getNoDirectSamples() { 00078 return m_noDirectSamples; 00079 } 00080 00081 00082 //@}----------------------------------------------------------------- 00083 00084 protected: 00085 Renderer *m_renderer; 00086 00087 SampleGenerator *m_generator; 00088 unsigned m_noDirectSamples; 00089 }; 00090 00091 #endif // DIRECT_ILLUMINATION_H_ 00092
Generated on 28 Feb 2009 for Milton by
1.5.6