erebus
annotate liberebus/src/brdf.h @ 14:f97dd1877f5f
testing
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 24 May 2014 21:56:04 +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_ |