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

#include <bsdf_ptr.h>

Inherits bsdf_base< CONF >.

Public Member Functions

 BBM_IMPORT_CONFIG (CONF)
 
 bsdf_ptr (void)=default
 Default (empty) constructor; shared_ptr is set to nullptr.
 
 bsdf_ptr (const pointer< bsdf_base< Config > > &ptr)
 Construct from pointer.
 
 bsdf_ptr (const bsdf_ptr< CONF > &b)
 Copy constructor.
 
bsdf_ptroperator= (const bsdf_ptr &b)
 Assignment operator.
 
const pointer< bsdf_base< Config > > & ptr (void) const
 Get the internal shared pointer.
 
virtual Spectrum eval (const Vec3d &in, const Vec3d &out, BsdfFlag component=bsdf_flag::All, unit_t unit=unit_t::Radiance, Mask mask=true) const override final
 Pointer-dereference passthrough of eval function.
 
virtual BsdfSample sample (const Vec3d &out, const Vec2d &xi, BsdfFlag component=bsdf_flag::All, unit_t unit=unit_t::Radiance, Mask mask=true) const override final
 Pointer-derefence passthrough of sample function.
 
virtual Value pdf (const Vec3d &in, const Vec3d &out, BsdfFlag component=bsdf_flag::All, unit_t unit=unit_t::Radiance, Mask mask=true) const override final
 Pointer-dereference passthrough of the pdf function.
 
virtual Spectrum reflectance (const Vec3d &out, BsdfFlag component=bsdf_flag::All, unit_t unit=unit_t::Radiance, Mask mask=true) const override final
 Pointer-dereference passthrough of the hemispherical reflectance function.
 
virtual std::string toString (void) const override final
 Pointer-dereference passthrough of toString.
 
Override the -> operator
const pointer< bsdf_base< Config > > & operator-> (void)
 
pointer< const bsdf_base< Config > > operator-> (void) const
 
Parameter Enumeration passthrough
virtual bbm::vector< Value & > parameter_values (bsdf_attr flags=bsdf_attr::All) override final
 
virtual bbm::vector< const Value & > parameter_values (bsdf_attr flags=bsdf_attr::All) const override final
 
virtual bbm::vector< Value > parameter_default_values (bsdf_attr flags=bsdf_attr::All) const override final
 
virtual bbm::vector< Value > parameter_lower_bound (bsdf_attr flags=bsdf_attr::All) const override final
 
virtual bbm::vector< Value > parameter_upper_bound (bsdf_attr flags=bsdf_attr::All) const override final
 
- Public Member Functions inherited from bsdf_base< CONF >
 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.
 

Public Attributes

 BBM_BSDF_FORWARD
 
- Public Attributes inherited from bsdf_base< CONF >
 BBM_BSDF_FORWARD
 

Static Public Attributes

static constexpr string_literal name = "BsdfPtr"
 
- Static Public Attributes inherited from bsdf_base< CONF >
static constexpr string_literal name = "bsdf_base"
 

Private Attributes

pointer< bsdf_base< Config > > _bsdf
 shared_prt to the actual BSDF implementation.
 

Constructor & Destructor Documentation

◆ bsdf_ptr() [1/3]

bsdf_ptr ( void  )
default

Default (empty) constructor; shared_ptr is set to nullptr.

◆ bsdf_ptr() [2/3]

bsdf_ptr ( const pointer< bsdf_base< Config > > &  ptr)
inline

Construct from pointer.

◆ bsdf_ptr() [3/3]

bsdf_ptr ( const bsdf_ptr< CONF > &  b)
inline

Copy constructor.

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
inlinefinaloverridevirtual

Pointer-dereference passthrough of eval function.

Parameters
in= incoming direction
out= exitant direction
component= which reflectance component to eval
unit= unit of computation
mask= mask to enable/disable lanes
Returns
the resulting Spectrum of the evaluation.

Implements bsdf_base< CONF >.

◆ operator->() [1/2]

const pointer< bsdf_base< Config > > & operator-> ( void  )
inline

◆ operator->() [2/2]

pointer< const bsdf_base< Config > > operator-> ( void  ) const
inline

◆ operator=()

bsdf_ptr & operator= ( const bsdf_ptr< CONF > &  b)
inline

Assignment operator.

◆ parameter_default_values()

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

Implements bsdf_base< CONF >.

◆ parameter_lower_bound()

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

Implements bsdf_base< CONF >.

◆ parameter_upper_bound()

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

Implements bsdf_base< CONF >.

◆ parameter_values() [1/2]

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

Implements bsdf_base< CONF >.

◆ parameter_values() [2/2]

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

Implements bsdf_base< CONF >.

◆ 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
inlinefinaloverridevirtual

Pointer-dereference passthrough of the pdf function.

Parameters
in= the incoming direction
out= the exitant 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.

Implements bsdf_base< CONF >.

◆ ptr()

const pointer< bsdf_base< Config > > & ptr ( void  ) const
inline

Get the internal shared pointer.

◆ reflectance()

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

Pointer-dereference passthrough of the hemispherical reflectance function.

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

Implements bsdf_base< 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
inlinefinaloverridevirtual

Pointer-derefence passthrough of sample function.

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.

Implements bsdf_base< CONF >.

◆ toString()

virtual std::string toString ( void  ) const
inlinefinaloverridevirtual

Pointer-dereference passthrough of toString.

Implements bsdf_base< CONF >.

Member Data Documentation

◆ _bsdf

pointer<bsdf_base<Config> > _bsdf
private

shared_prt to the actual BSDF implementation.

◆ BBM_BSDF_FORWARD

BBM_BSDF_FORWARD

◆ name

constexpr string_literal name = "BsdfPtr"
staticconstexpr

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