Nori  24
BSDF Class Referenceabstract

Superclass of all bidirectional scattering distribution functions. More...

#include <bsdf.h>

Inheritance diagram for BSDF:
Collaboration diagram for BSDF:

Public Member Functions

virtual Color3f sample (BSDFQueryRecord &bRec, const Point2f &sample) const =0
 Sample the BSDF and return the importance weight (i.e. the value of the BSDF * cos(theta_o) divided by the probability density of the sample with respect to solid angles). More...
 
virtual Color3f eval (const BSDFQueryRecord &bRec) const =0
 Evaluate the BSDF for a pair of directions and measure specified in code bRec. More...
 
virtual float pdf (const BSDFQueryRecord &bRec) const =0
 Compute the probability of sampling bRec.wo (conditioned on bRec.wi). More...
 
virtual EClassType getClassType () const override
 Return the type of object (i.e. Mesh/BSDF/etc.) provided by this instance.
 
virtual bool isDiffuse () const
 Return whether or not this BRDF is diffuse. This is primarily used by photon mapping to decide whether or not to store photons on a surface.
 
- Public Member Functions inherited from NoriObject
virtual ~NoriObject ()
 Virtual destructor.
 
virtual void addChild (NoriObject *child)
 Add a child object to the current instance. More...
 
virtual void setParent (NoriObject *parent)
 Set the parent object. More...
 
virtual void activate ()
 Perform some action associated with the object. More...
 
virtual std::string toString () const =0
 Return a brief string summary of the instance (for debugging purposes)
 
void setIdName (const std::string &name)
 Allow to assign a name to the object.
 
const std::string & getIdName () const
 

Additional Inherited Members

- Public Types inherited from NoriObject
enum  EClassType {
  EScene = 0 , EMesh , ETexture , EBSDF ,
  EPhaseFunction , EEmitter , EMedium , ECamera ,
  EIntegrator , ESampler , ETest , EReconstructionFilter ,
  EClassTypeCount
}
 
- Static Public Member Functions inherited from NoriObject
static std::string classTypeName (EClassType type)
 Turn a class type into a human-readable string.
 
- Protected Attributes inherited from NoriObject
std::string m_idname
 

Detailed Description

Superclass of all bidirectional scattering distribution functions.

Definition at line 60 of file bsdf.h.

Member Function Documentation

◆ eval()

virtual Color3f BSDF::eval ( const BSDFQueryRecord bRec) const
pure virtual

Evaluate the BSDF for a pair of directions and measure specified in code bRec.

Parameters
bRecA record with detailed information on the BSDF query
Returns
The BSDF value, evaluated for each color channel

Implemented in Microfacet, Diffuse, Mirror, and Dielectric.

◆ pdf()

virtual float BSDF::pdf ( const BSDFQueryRecord bRec) const
pure virtual

Compute the probability of sampling bRec.wo (conditioned on bRec.wi).

This method provides access to the probability density that is realized by the sample() method.

Parameters
bRecA record with detailed information on the BSDF query
Returns
A probability/density value expressed with respect to the specified measure

Implemented in Microfacet, Diffuse, Mirror, and Dielectric.

◆ sample()

virtual Color3f BSDF::sample ( BSDFQueryRecord bRec,
const Point2f sample 
) const
pure virtual

Sample the BSDF and return the importance weight (i.e. the value of the BSDF * cos(theta_o) divided by the probability density of the sample with respect to solid angles).

Parameters
bRecA BSDF query record
sampleA uniformly distributed sample on $[0,1]^2$
Returns
The BSDF value divided by the probability density of the sample sample. The returned value also includes the cosine foreshortening factor associated with the outgoing direction, when this is appropriate. A zero value means that sampling failed.

Implemented in Diffuse, Dielectric, Microfacet, and Mirror.


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