diff options
author | Julian T <julian@jtle.dk> | 2020-09-16 20:52:12 +0200 |
---|---|---|
committer | Julian T <julian@jtle.dk> | 2020-12-06 22:44:10 +0100 |
commit | 0f9e88ccf0510ab4d830529fa539ef6db715f988 (patch) | |
tree | 863b5f466d3e81e16e04aad56ef7a0d860a143f9 /src/object.hpp | |
parent | a38e6014ea5441e9d29fcb3b5607cd94e4061cff (diff) |
Added first draft of spectral lightningold_spectral
Diffstat (limited to 'src/object.hpp')
-rw-r--r-- | src/object.hpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/object.hpp b/src/object.hpp index e697ba2..3b108fb 100644 --- a/src/object.hpp +++ b/src/object.hpp @@ -25,7 +25,7 @@ class Color : public Vec3d { // Implements phong BRDF class Material { public: - Material(Color color, double defuse, double emissive=0); + Material(Color color, double defuse, double spectral=0, double spectral_pow=0, double emissive=0); Color reflect(const Vec3d &normal, const Vec3d &in, const Vec3d &out, const Color &incol) const; @@ -34,11 +34,13 @@ class Material { } // Whether the material is reflective - bool reflects() const { return m_defuse > 0; } + bool reflects() const { return m_defuse+m_spectral > 0; } private: Color m_color; double m_defuse; double m_emissive; + double m_spectral; + double m_spectral_pow; }; class Shape { |