nuclear@2: #ifndef BRDF_H_ nuclear@2: #define BRDF_H_ nuclear@2: nuclear@2: #include "texture.h" nuclear@2: nuclear@2: class Reflectance { nuclear@2: public: nuclear@2: Reflectance(); nuclear@2: virtual ~Reflectance() = default; nuclear@2: nuclear@2: virtual Vector3 sample_dir(const Vector3 &norm, const Vector3 &outdir) const = 0; nuclear@2: virtual float sample(const Vector3 &norm, const Vector3 &outdir, Vector3 *indir) const; nuclear@2: virtual float eval(const Vector3 &norm, const Vector3 &outdir, const Vector3 &indir) const = 0; nuclear@2: }; nuclear@2: nuclear@2: class LambertRefl : public Reflectance { nuclear@2: public: nuclear@2: Vector3 sample_dir(const Vector3 &norm, const Vector3 &outdir) const override; nuclear@2: float eval(const Vector3 &norm, const Vector3 &outdir, const Vector3 &indir) const override; nuclear@2: }; nuclear@2: nuclear@2: #endif // BRDF_H_