Loading...
Searching...
No Matches
Classes | Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | List of all members
ndf_sampler< BSDFMODEL, samplesTheta, samplesPhi, NAME > Class Template Reference

#include <ndf_sampler.h>

Inherits BSDFMODEL.

Classes

struct  backscatter
 Helper Class: Backscatter NDF passthrough. More...
 

Public Member Functions

 BBM_IMPORT_CONFIG (BSDFMODEL)
 
template<typename... Ts>
requires std::constructible_from<BSDFMODEL, Ts...>
 ndf_sampler (Ts &&... ts)
 forward to parent constructor, with empty _sampler (due to reference to *this)
 
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 diffuse 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.
 

Public Attributes

 BBM_BSDF_FORWARD
 

Static Public Attributes

static constexpr string_literal name = NAME
 

Private Member Functions

 BBM_BASETYPES (BSDFMODEL)
 
 BBM_CHECK_RAW_CONCEPT (concepts::ndf, backscatter)
 

Private Attributes

Class Attributes
std::map< std::pair< bsdf_flag, unit_t >, ndf::sampler< backscatter, samplesTheta, samplesPhi > > _samplers
 

Constructor & Destructor Documentation

◆ ndf_sampler()

ndf_sampler ( Ts &&...  ts)
inline

forward to parent constructor, with empty _sampler (due to reference to *this)

Member Function Documentation

◆ BBM_BASETYPES()

BBM_BASETYPES ( BSDFMODEL  )
private

◆ BBM_CHECK_RAW_CONCEPT()

BBM_CHECK_RAW_CONCEPT ( concepts::ndf  ,
backscatter   
)
private

◆ BBM_IMPORT_CONFIG()

BBM_IMPORT_CONFIG ( BSDFMODEL  )

◆ pdf()

Value pdf ( const Vec3d &  in,
const Vec3d &  out,
BsdfFlag  component = bsdf_flag::All,
unit_t  unit = unit_t::Radiance,
Mask  mask = true 
) const
inline

Compute the pdf given an in and out direction.

Parameters
in= the incoming (sampled) direction
out= the outgoing (given) direction
component= which reflectance component was sampled
unit= unit of computation (ignored)
mask= masking of lanes
Returns
the PDF that the incoming direction would be sampled given the outgoing direction.

◆ sample()

BsdfSample sample ( const Vec3d &  out,
const Vec2d &  xi,
BsdfFlag  component = bsdf_flag::All,
unit_t  unit = unit_t::Radiance,
Mask  mask = true 
) const
inline

Sample the diffuse BSDF given a direction and two random variables.

Parameters
out= outgoing direction
xi= two random variables stored in a Vec2d
component= which reflectance component to sample
unit= unit of computation (ignored)
mask= masking of lanes.
Returns
A bsdfSample containing the sampled direction and the corresponding pdf.

Member Data Documentation

◆ _samplers

std::map< std::pair<bsdf_flag, unit_t>, ndf::sampler<backscatter, samplesTheta, samplesPhi> > _samplers
mutableprivate

◆ BBM_BSDF_FORWARD

BBM_BSDF_FORWARD

◆ name

constexpr string_literal name = NAME
staticconstexpr

The documentation for this class was generated from the following file: