1 #ifndef LIGHT_HXX
2 #define LIGHT_HXX
3
4 #include "Vec3f.hxx"
5 #include "Ray.hxx"
6
7 class Scene; // forward declaration
8
9 class Light
10 {
11 protected:
12 Scene *scene;
13 public:
14 Vec3f intensity; // emission (red, green, blue)
15
16 Light(Scene *scene, const Vec3f &intensity) : scene(scene), intensity(intensity)
17 {};
18
19 virtual ~Light(){};
20
21 virtual void Illuminate(Ray &ray, Vec3f &intensity) = 0;
22 // ray.org specifies the point to be illuminated
23
24 virtual void Initialize(TravellingPhoton &photon, Vec3f &intensity) = 0;
25 };
26
27 #endif
syntax highlighted by Code2HTML, v. 0.9.1