MERL-MIT sampled reflectance. More...
#include <merl.h>
Public Member Functions | |
| BBM_IMPORT_CONFIG (CONF) | |
| merl_data (void)=delete | |
| Empty Constructor. | |
| merl_data (const merl_data &src)=default | |
| Copy constructor. | |
| merl_data & | operator= (const merl_data &src)=default |
| Assignment operator. | |
| BBM_CONSTRUCTOR (merl_data, args, arg< const std::string &, "filename">) | |
| Import Constructor. | |
| Spectrum | eval (const Vec3d &in, const Vec3d &out, BsdfFlag component=bsdf_flag::All, unit_t=unit_t::Radiance, Mask mask=true) const |
| Evaluate the BSDF given an in and out direction. | |
| BsdfSample | sample (const Vec3d &out, const Vec2d &xi, BsdfFlag component=bsdf_flag::All, unit_t unit=unit_t::Radiance, Mask mask=true) const |
| Sample the sanpled BSDF given a direction and two random variables. | |
| Value | pdf (const Vec3d &in, const Vec3d &out, BsdfFlag component=bsdf_flag::All, unit_t unit=unit_t::Radiance, Mask mask=true) const |
| Compute the pdf given an in and out direction. | |
| Spectrum | reflectance (const Vec3d &, BsdfFlag component=bsdf_flag::All, unit_t=unit_t::Radiance, Mask mask=true) const |
| Return the (approximate) hemispherical reflectance of the BSDF. | |
| std::string | toString (void) const |
| Custom string conversion. | |
Static Public Attributes | |
| static constexpr string_literal | name = NAME |
Private Member Functions | |
| void | import (void) |
| Import MERL data from file. | |
Private Attributes | |
| std::string | _filename |
| Class members. | |
| merl_linearizer< Config > | _linearizer |
| std::vector< color< double > > | _data |
MERL-MIT sampled reflectance.
Stored and provides access to the MERL-MIT measured BRDFs.
Sample, pdf, and reflectance are implemented by placeholders.
|
delete |
Empty Constructor.
Import Constructor.
| filename | = name of MERL BRDF file |
| BBM_IMPORT_CONFIG | ( | CONF | ) |
|
inline |
Evaluate the BSDF given an in and out direction.
| in | = incoming direction of transport |
| out | = exitant direction of transport |
| component | = which reflectance component to eval |
| unit | = unit of computation |
| mask | = mask to enable/disable lanes |
IMPORTANT: The foreshortning (i.e., cosine) is NOT included.
|
inlineprivate |
Import MERL data from file.
Load the MERL-MIT BRDF data from path/filename. Will throw a run-time exception if not found, or if the format is not a MERL-MIT format.
|
inline |
Compute the pdf given an in and out direction.
| in | = the incoming direction |
| out | = the outgoing direction |
| component | = which reflectance component was sampled |
| unit | = unit of computation |
| mask | = enable/disable lanes. |
|
inline |
Return the (approximate) hemispherical reflectance of the BSDF.
| out | = the outgoing direction (ignored) |
| component | = which reflectance component to eval |
| unit | = unit of computation |
| mask | = enable/disable lanes |
|
inline |
Sample the sanpled BSDF given a direction and two random variables.
| out | = outgoing direction |
| xi | = two random variables stored in a Vec2d |
| component | = which reflectance component to sample |
| unit | =unit of computation |
| mask | = mask to enable/disable lanes |
|
inline |
Custom string conversion.
|
private |
|
private |
Class members.
|
private |
|
staticconstexpr |