DielectricBSDF Class Reference
Wavelength-dependent, thin dielectric BSDF defined at a single point on a surface in 3-space. The opacity input controls the transmittance versus reflectance of different wavelengths. A pure specular mirror may be obtained by creating a dielectric BSDF with zero opacity. Conversely, a purely transparent surface may be obtained by creating a dielectric with full opacity. Note that a completely transparent surface will still reflect some light (in proportion to Fresnel's Laws) because refraction is undefined past a critical angle when light is traveling between a lighter and denser medium. When this happens, some light is reflected regardless of the opacity parameter, and this is typically known as total internal reflection. More...
#include <DielectricBSDF.h>

Public Member Functions | |
Constructors | |
| DielectricBSDF (SurfacePoint &pt, Material *parent=NULL) | |
| virtual | ~DielectricBSDF () |
Initialization | |
| virtual void | init () |
| Performs any initialization that may be necessary before beginning to sample this BSDF. | |
Main usage interface | |
| virtual Event | sample () |
| Samples an exitent vector at the given surface point. | |
| virtual real_t | getPdf (const Event &event) |
| virtual SpectralSampleSet | getBSDF (const Vector3 &wi, const Vector3 &wo) |
| Evaluates the spectral BSDF at the given surface point with respect to the out vector, 'wo', at the underlying surface point and given incident vector, 'wi'. | |
| virtual bool | isSpecular (Event &) const |
Protected Attributes | |
| SpectralSampleSet | m_ior |
| SpectralSampleSet | m_transparency |
| real_t | m_avgTransparency |
Detailed Description
Wavelength-dependent, thin dielectric BSDF defined at a single point on a surface in 3-space. The opacity input controls the transmittance versus reflectance of different wavelengths. A pure specular mirror may be obtained by creating a dielectric BSDF with zero opacity. Conversely, a purely transparent surface may be obtained by creating a dielectric with full opacity. Note that a completely transparent surface will still reflect some light (in proportion to Fresnel's Laws) because refraction is undefined past a critical angle when light is traveling between a lighter and denser medium. When this happens, some light is reflected regardless of the opacity parameter, and this is typically known as total internal reflection.
- Date:
- Fall 2008
- Parameters:
-
opacity - SpectralSampleSet which specifies the transmittance of the material ks - SpectralSampleSet which scales / attenuates the overall reflectance of the material (specular albedo)
Definition at line 33 of file DielectricBSDF.h.
Constructor & Destructor Documentation
| DielectricBSDF::DielectricBSDF | ( | SurfacePoint & | pt, | |
| Material * | parent = NULL | |||
| ) | [inline, explicit] |
Definition at line 38 of file DielectricBSDF.h.
| virtual DielectricBSDF::~DielectricBSDF | ( | ) | [inline, virtual] |
Definition at line 42 of file DielectricBSDF.h.
Member Function Documentation
| void DielectricBSDF::init | ( | ) | [virtual] |
Performs any initialization that may be necessary before beginning to sample this BSDF.
- Note:
- default implementation is empty
Reimplemented from BSDF.
Definition at line 34 of file DielectricBSDF.cpp.
| Event DielectricBSDF::sample | ( | ) | [virtual] |
Samples an exitent vector at the given surface point.
- Returns:
- the sampled vector as a Vector3 wrapped in an Event object
- Note:
- returns Vector3::zero() if no exitent vector was sampled (to model a certain probability of absorption, for instance)
const Event &event = bsdf.sample();
const Vector3 &wo = event.getValue();
const real_t pd = bsdf.getPdf(event); // p(x) probability
const SpectralSampleSet &fs = bsdf.getBSDF(wo); // f(x) reflectivity
Implements BSDF.
Definition at line 41 of file DielectricBSDF.cpp.
- Returns:
- the probability density of having sampled the given out out vector
eventwith respect to whatever underlying sampling strategy is being used to sample the BSDF
- Note:
- probability density is assumed to be with respect to projected solid angle (the conversion from solid angle to projected solid angle involves dividing the solid angle density by the absolute value of the cosine of the angle between the local surface normal and the exitant vector in
event)
Implements BSDF.
Definition at line 65 of file DielectricBSDF.cpp.
| SpectralSampleSet DielectricBSDF::getBSDF | ( | const Vector3 & | wi, | |
| const Vector3 & | wo | |||
| ) | [virtual] |
Evaluates the spectral BSDF at the given surface point with respect to the out vector, 'wo', at the underlying surface point and given incident vector, 'wi'.
- Returns:
- the spectral radiance leaving in direction wo, per unit of irradiance arriving from wi (unitless fraction in [0, 1])
Implements BSDF.
Definition at line 86 of file DielectricBSDF.cpp.
| virtual bool DielectricBSDF::isSpecular | ( | Event & | ) | const [inline, virtual] |
- Returns:
- true iff this BSDF is non-zero over a set of solid angles with measure zero (measured with respect to solid angle)
- Note:
- a perfectly specular material has a dirac distribution for its reflectance, and therefore needs special consideration when sampling the BRDF for simulation purposes
the default implementation returns false because perfectly specular surfaces don't occur that often in real life, though they abound in computer graphics (due to their ease of simulation)
implementations are free to use the given Event's metadata to determine whether or not it represents a specular event
Reimplemented from BSDF.
Definition at line 63 of file DielectricBSDF.h.
Member Data Documentation
SpectralSampleSet DielectricBSDF::m_ior [protected] |
Definition at line 71 of file DielectricBSDF.h.
SpectralSampleSet DielectricBSDF::m_transparency [protected] |
Definition at line 72 of file DielectricBSDF.h.
real_t DielectricBSDF::m_avgTransparency [protected] |
Definition at line 73 of file DielectricBSDF.h.
The documentation for this class was generated from the following files:
Generated on 28 Feb 2009 for Milton by
1.5.6