#include <bsdf.h>
Inheritance diagram for toxic::BSDF:

Public Member Functions | |
| BSDF () | |
| virtual | ~BSDF () |
| virtual bool | IsDiffuse () const |
| virtual bool | IsSpecular () const |
| void | Insert (const IBRDF *brdf, sheep::Real weight) |
| void | Insert (const IBTDF *btdf, sheep::Real weight) |
| virtual sheep::Real | Evaluate (const Context &context, const sheep::Vector3 &incoming, const sheep::Vector3 &outgoing) const |
| virtual sheep::Real | EvaluateSpecular (const Context &context, const sheep::Vector3 &incoming, sheep::Vector3 *outgoing) const |
| virtual void | Sample (const Context &context, const sheep::Vector3 &incoming, sheep::Vector3 *outgoing, sheep::Real *prob, sheep::Real *value) const |
| virtual sheep::Real | ComputeScatteringProbability (const sheep::Vector3 &incoming, const sheep::Vector3 &outgoing) const |
| virtual sheep::Real | ComputeReflectance (const Context &context) const |
| Computes and returns the hemispherical hemispherical reflectance. | |
| virtual sheep::Real | ComputeReflectance (const Context &context, const sheep::Vector3 &incoming) const |
Private Types | |
| typedef std::pair< const IBRDF *, sheep::Real > | weighted_brdf |
| typedef std::pair< const IBTDF *, sheep::Real > | weighted_btdf |
| typedef std::vector< weighted_brdf > | brdf_vector |
| typedef std::vector< weighted_btdf > | btdf_vector |
| typedef brdf_vector::const_iterator | brdf_vector_const_it |
| typedef btdf_vector::const_iterator | btdf_vector_const_it |
Private Attributes | |
| brdf_vector | m_brdfs |
| Vector of all BRDFs. | |
| btdf_vector | m_btdfs |
| Vector of all BTDFs. | |
| brdf_vector | m_specular_brdfs |
| Vector of specular BRDFs. | |
| btdf_vector | m_specular_btdfs |
| Vector of specular BTDFs. | |
| sheep::Real | m_total_weight |
| The total weight of all components (BRDFs and BTDFs). | |
Definition at line 39 of file bsdf.h.
|
|
|
|
|
Definition at line 97 of file bsdf.h. Referenced by ComputeReflectance(), ComputeScatteringProbability(), Evaluate(), and Sample(). |
|
|
|
|
|
Definition at line 98 of file bsdf.h. Referenced by ComputeReflectance(), ComputeScatteringProbability(), Evaluate(), and Sample(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||
|
Computes and returns the directional hemispherical reflectance. The incoming direction is expressed in local space. Reimplemented from toxic::IBDF. Definition at line 188 of file bsdf.cpp. References brdf_vector_const_it, btdf_vector_const_it, sheep::Vector3::IsUnitLength(), m_brdfs, m_btdfs, and sheep::Vector3::m_y. |
|
|
Computes and returns the hemispherical hemispherical reflectance.
Reimplemented from toxic::IBDF. Definition at line 176 of file bsdf.cpp. References brdf_vector_const_it, btdf_vector_const_it, m_brdfs, and m_btdfs. |
|
||||||||||||
|
Computes the probability of scattering from 'incoming' direction to 'outgoing' direction. Both incoming and outgoing directions are expressed in local space.
Reimplemented from toxic::IBDF. Definition at line 155 of file bsdf.cpp. References brdf_vector_const_it, btdf_vector_const_it, m_brdfs, and m_btdfs. |
|
||||||||||||||||
|
Evaluates the function. Both the incoming and outgoing directions are expressed in local space. Implements toxic::IBDF. Definition at line 63 of file bsdf.cpp. References brdf_vector_const_it, btdf_vector_const_it, sheep::Vector3::IsUnitLength(), m_brdfs, m_btdfs, and sheep::Vector3::m_y. |
|
||||||||||||||||
|
Reimplemented from toxic::IBDF. Definition at line 89 of file bsdf.cpp. References toxic::IBDF::EvaluateSpecular(), sheep::Vector3::IsUnitLength(), toxic::Context::m_rng, m_specular_brdfs, m_specular_btdfs, sheep::Vector3::m_y, and sheep::MT19937RNG::RandomInt(). |
|
||||||||||||
|
Definition at line 50 of file bsdf.cpp. References toxic::IBDF::IsSpecular(), m_btdfs, m_specular_btdfs, and m_total_weight. |
|
||||||||||||
|
Definition at line 37 of file bsdf.cpp. References toxic::IBDF::IsSpecular(), m_brdfs, m_specular_brdfs, and m_total_weight. |
|
|
Reimplemented from toxic::IBDF. |
|
|
Reimplemented from toxic::IBDF. |
|
||||||||||||||||||||||||
|
Samples the function in order to obtain an outgoing direction, given an incoming direction. The probability with which the direction has been chosen is also computed. Both incoming and outgoing directions are expressed in local space.
Reimplemented from toxic::IBDF. Definition at line 114 of file bsdf.cpp. References brdf_vector_const_it, btdf_vector_const_it, sheep::Vector3::IsUnitLength(), m_brdfs, m_btdfs, toxic::Context::m_rng, sheep::Vector3::m_y, sheep::MT19937RNG::RandomInt(), and toxic::IBDF::Sample(). |
|
|
Vector of all BRDFs.
Definition at line 100 of file bsdf.h. Referenced by ComputeReflectance(), ComputeScatteringProbability(), Evaluate(), Insert(), and Sample(). |
|
|
Vector of all BTDFs.
Definition at line 101 of file bsdf.h. Referenced by ComputeReflectance(), ComputeScatteringProbability(), Evaluate(), Insert(), and Sample(). |
|
|
Vector of specular BRDFs.
Definition at line 102 of file bsdf.h. Referenced by EvaluateSpecular(), and Insert(). |
|
|
Vector of specular BTDFs.
Definition at line 103 of file bsdf.h. Referenced by EvaluateSpecular(), and Insert(). |
|
|
The total weight of all components (BRDFs and BTDFs).
Definition at line 105 of file bsdf.h. Referenced by Insert(). |
1.3.6