DielectricBSDF.h
Go to the documentation of this file.00001 /**<!--------------------------------------------------------------------> 00002 @class DielectricBSDF 00003 @author Travis Fischer (fisch0920@gmail.com) 00004 @author Matthew Jacobs (jacobs.mh@gmail.com) 00005 @date Fall 2008 00006 00007 @brief 00008 Wavelength-dependent, thin dielectric BSDF defined at a single point on 00009 a surface in 3-space. The opacity input controls the transmittance versus 00010 reflectance of different wavelengths. A pure specular mirror may be obtained 00011 by creating a dielectric BSDF with zero opacity. Conversely, a purely 00012 transparent surface may be obtained by creating a dielectric with full 00013 opacity. Note that a completely transparent surface will still reflect some 00014 light (in proportion to Fresnel's Laws) because refraction is undefined past 00015 a critical angle when light is traveling between a lighter and denser 00016 medium. When this happens, some light is reflected regardless of the opacity 00017 parameter, and this is typically known as total internal reflection. 00018 00019 @param 00020 opacity - SpectralSampleSet which specifies the transmittance of the 00021 material 00022 00023 @param 00024 ks - SpectralSampleSet which scales / attenuates the overall 00025 reflectance of the material (specular albedo) 00026 <!-------------------------------------------------------------------->**/ 00027 00028 #ifndef DIELECTRIC_BSDF_H_ 00029 #define DIELECTRIC_BSDF_H_ 00030 00031 #include <materials/BSDF.h> 00032 00033 class DielectricBSDF : public BSDF { 00034 public: 00035 ///@name Constructors 00036 //@{----------------------------------------------------------------- 00037 00038 inline explicit DielectricBSDF(SurfacePoint &pt, Material *parent = NULL) 00039 : BSDF(pt, parent) 00040 { } 00041 00042 virtual ~DielectricBSDF() 00043 { } 00044 00045 00046 //@}----------------------------------------------------------------- 00047 ///@name Initialization 00048 //@{----------------------------------------------------------------- 00049 00050 virtual void init(); 00051 00052 00053 //@}----------------------------------------------------------------- 00054 ///@name Main usage interface 00055 //@{----------------------------------------------------------------- 00056 00057 virtual Event sample(); 00058 00059 virtual real_t getPdf(const Event &event); 00060 00061 virtual SpectralSampleSet getBSDF(const Vector3 &wi, const Vector3 &wo); 00062 00063 virtual bool isSpecular(Event &/* event unused*/) const { 00064 return true; 00065 } 00066 00067 00068 //@}----------------------------------------------------------------- 00069 00070 protected: 00071 SpectralSampleSet m_ior; 00072 SpectralSampleSet m_transparency; 00073 real_t m_avgTransparency; 00074 }; 00075 00076 #endif // DIELECTRIC_BSDF_H_ 00077
Generated on 28 Feb 2009 for Milton by
1.5.6