19 #if !defined(__NORI_BSDF_H)
22 #include <nori/object.h>
Superclass of all bidirectional scattering distribution functions.
virtual Color3f eval(const BSDFQueryRecord &bRec) const =0
Evaluate the BSDF for a pair of directions and measure specified in code bRec.
virtual EClassType getClassType() const override
Return the type of object (i.e. Mesh/BSDF/etc.) provided by this instance.
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 b...
virtual float pdf(const BSDFQueryRecord &bRec) const =0
Compute the probability of sampling bRec.wo (conditioned on bRec.wi).
virtual bool isDiffuse() const
Return whether or not this BRDF is diffuse. This is primarily used by photon mapping to decide whethe...
Base class of all objects.
Convenience data structure used to pass multiple parameters to the evaluation and sampling routines i...
Vector3f wo
Outgoing direction (in the local frame)
BSDFQueryRecord(const Vector3f &wi, const Vector3f &wo, EMeasure measure)
Create a new record for querying the BSDF.
Vector3f wi
Incident direction (in the local frame)
Point3f p
Point associated with the point.
BSDFQueryRecord(const Vector3f &wi)
Create a new record for sampling the BSDF.
EMeasure measure
Measure associated with the sample.
float eta
Relative refractive index in the sampled direction.
Represents a linear RGB color value.