Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
bsdf_base< CONF > Struct Template Referenceabstract

Forward declaration. More...

#include <bsdf_base.h>

Inherited by aggregatebsdf< CONF, NAME >, and bsdf_ptr< CONF > [virtual].

Public Member Functions

 BBM_IMPORT_CONFIG (CONF)
 
virtual ~bsdf_base (void)
 empty virtual destructor
 
virtual Spectrum eval (const Vec3d &in, const Vec3d &out, BsdfFlag component=bsdf_flag::All, unit_t unit=unit_t::Radiance, Mask mask=true) const =0
 Evaluate the BSDF given an in and out direction.
 
virtual BsdfSample sample (const Vec3d &out, const Vec2d &xi, BsdfFlag component=bsdf_flag::All, unit_t unit=unit_t::Radiance, Mask mask=true) const =0
 Samples the BSDF given an out direction and 2 random variables.
 
virtual Value pdf (const Vec3d &in, const Vec3d &out, BsdfFlag component=bsdf_flag::All, unit_t unit=unit_t::Radiance, Mask mask=true) const =0
 The pdf of the in-out direction combination.
 
virtual Spectrum reflectance (const Vec3d &out, BsdfFlag component=bsdf_flag::All, unit_t unit=unit_t::Radiance, Mask mask=true) const =0
 the (approximate) hemispherical reflectance of the BSDF
 
virtual std::string toString (void) const =0
 Fancy print the BSDF to a string.
 
Parameter Enumeration
virtual bbm::vector< Value & > parameter_values (bsdf_attr flags=bsdf_attr::All)=0
 
virtual bbm::vector< const Value & > parameter_values (bsdf_attr flags=bsdf_attr::All) const =0
 
virtual bbm::vector< Value > parameter_default_values (bsdf_attr flags=bsdf_attr::All) const =0
 
virtual bbm::vector< Value > parameter_lower_bound (bsdf_attr flags=bsdf_attr::All) const =0
 
virtual bbm::vector< Value > parameter_upper_bound (bsdf_attr flags=bsdf_attr::All) const =0
 

Public Attributes

 BBM_BSDF_FORWARD
 

Static Public Attributes

static constexpr string_literal name = "bsdf_base"
 

Detailed Description

template<typename CONF>
requires concepts::config<CONF>
struct bbm::bsdf_base< CONF >

Forward declaration.

Constructor & Destructor Documentation

◆ ~bsdf_base()

virtual ~bsdf_base ( void  )
inlinevirtual

empty virtual destructor

Member Function Documentation

◆ BBM_IMPORT_CONFIG()

BBM_IMPORT_CONFIG ( CONF  )

◆ eval()

virtual Spectrum eval ( const Vec3d &  in,
const Vec3d &  out,
BsdfFlag  component = bsdf_flag::All,
unit_t  unit = unit_t::Radiance,
Mask  mask = true 
) const
pure virtual

Evaluate the BSDF given an in and out direction.

Parameters
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
Returns
the resulting Spectrum of the evaluation.

IMPORTANT: The foreshortning (i.e., cosine) is NOT included.

Implemented in aggregatebsdf< CONF, NAME >, bsdf< BSDFMODEL >, and bsdf_ptr< CONF >.

◆ parameter_default_values()

virtual bbm::vector< Value > parameter_default_values ( bsdf_attr  flags = bsdf_attr::All) const
pure virtual

◆ parameter_lower_bound()

virtual bbm::vector< Value > parameter_lower_bound ( bsdf_attr  flags = bsdf_attr::All) const
pure virtual

◆ parameter_upper_bound()

virtual bbm::vector< Value > parameter_upper_bound ( bsdf_attr  flags = bsdf_attr::All) const
pure virtual

◆ parameter_values() [1/2]

virtual bbm::vector< const Value & > parameter_values ( bsdf_attr  flags = bsdf_attr::All) const
pure virtual

◆ parameter_values() [2/2]

virtual bbm::vector< Value & > parameter_values ( bsdf_attr  flags = bsdf_attr::All)
pure virtual

◆ pdf()

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

The pdf of the in-out direction combination.

Parameters
in= the incoming sampled direction
out= the exitant (given) direction
component= which reflectance component was sampled
unit= unit of computation
mask= mask to enable/disable lanes
Returns
the pdf of samling the in-out direction conbination.

Implemented in aggregatebsdf< CONF, NAME >, bsdf< BSDFMODEL >, and bsdf_ptr< CONF >.

◆ reflectance()

virtual Spectrum reflectance ( const Vec3d &  out,
BsdfFlag  component = bsdf_flag::All,
unit_t  unit = unit_t::Radiance,
Mask  mask = true 
) const
pure virtual

the (approximate) hemispherical reflectance of the BSDF

Parameters
out= the outgoing direction
component= which reflectance component to eval
unit= unit of computation
mask= mask to enable/disable lanes
Returns
the approximate hemispherical reflectance (Spectrum) of the BSDF

Implemented in aggregatebsdf< CONF, NAME >, bsdf< BSDFMODEL >, and bsdf_ptr< CONF >.

◆ sample()

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

Samples the BSDF given an out direction and 2 random variables.

Parameters
out= the outgoing direction
xi= two random variables stored in a Vec2d used to sample
component= which reflectance component to sample
unit= unit of computation
mask= mask to enable/disable lanes
Returns
a BsdfSample that contains the sampled direction and the corresponding pdf.

Implemented in aggregatebsdf< CONF, NAME >, bsdf< BSDFMODEL >, and bsdf_ptr< CONF >.

◆ toString()

virtual std::string toString ( void  ) const
pure virtual

Fancy print the BSDF to a string.

Implemented in aggregatebsdf< CONF, NAME >, bsdf< BSDFMODEL >, and bsdf_ptr< CONF >.

Member Data Documentation

◆ BBM_BSDF_FORWARD

BBM_BSDF_FORWARD

◆ name

constexpr string_literal name = "bsdf_base"
staticconstexpr

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