Separated BRDF from light source.
This commit is contained in:
@@ -6,22 +6,14 @@
|
||||
|
||||
class DirectionalLight: public Light {
|
||||
public:
|
||||
DirectionalLight() {
|
||||
m_position = vec3(0.0f);
|
||||
m_diffuse = vec3(1.0f);
|
||||
m_specular = vec3(1.0f);
|
||||
}
|
||||
DirectionalLight(): Light() { }
|
||||
|
||||
DirectionalLight(vec3 _p, vec3 _d, vec3 _s) {
|
||||
m_position = _p;
|
||||
m_diffuse = _d;
|
||||
m_specular = _s;
|
||||
}
|
||||
DirectionalLight(BRDF * _brdf, vec3 _p, vec3 _d, vec3 _s): Light(_brdf, _p, _d, _s) { }
|
||||
|
||||
virtual vec3 direction(vec3 point);
|
||||
virtual float distance(vec3 point);
|
||||
virtual vec3 diffuse(vec3 normal, Ray & r, float t, Material & m) const;
|
||||
virtual vec3 specular(vec3 normal, Ray & r, float t, Material & m) const;
|
||||
virtual vec3 diffuse(vec3 normal, Ray & r, vec3 i_pos, Material & m) const;
|
||||
virtual vec3 specular(vec3 normal, Ray & r, vec3 i_pos, Material & m) const;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user