erebus

annotate liberebus/src/brdf.h @ 4:93894c232d65

more changes across the board
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 29 Apr 2014 07:38:40 +0300
parents 474a0244f57d
children e49f4d7ad04c
rev   line source
nuclear@2 1 #ifndef BRDF_H_
nuclear@2 2 #define BRDF_H_
nuclear@2 3
nuclear@2 4 #include "texture.h"
nuclear@2 5
nuclear@2 6 class Reflectance {
nuclear@2 7 public:
nuclear@2 8 Reflectance();
nuclear@2 9 virtual ~Reflectance() = default;
nuclear@2 10
nuclear@2 11 virtual Vector3 sample_dir(const Vector3 &norm, const Vector3 &outdir) const = 0;
nuclear@2 12 virtual float sample(const Vector3 &norm, const Vector3 &outdir, Vector3 *indir) const;
nuclear@2 13 virtual float eval(const Vector3 &norm, const Vector3 &outdir, const Vector3 &indir) const = 0;
nuclear@2 14 };
nuclear@2 15
nuclear@2 16 class LambertRefl : public Reflectance {
nuclear@2 17 public:
nuclear@2 18 Vector3 sample_dir(const Vector3 &norm, const Vector3 &outdir) const override;
nuclear@2 19 float eval(const Vector3 &norm, const Vector3 &outdir, const Vector3 &indir) const override;
nuclear@2 20 };
nuclear@2 21
nuclear@2 22 #endif // BRDF_H_