--- /dev/null
+#ifndef QUADAREALIGHT_HXX
+#define QUADAREALIGHT_HXX
+
+#include "Light.hxx"
+
+class QuadAreaLight : public Light
+{
+public:
+ //! Points p1 to p4 are assumed to define a planar rectangular region and have to be given counter-clockwise
+ QuadAreaLight(Scene* scene, const Vec3f& intensity, const Vec3f& p1, const Vec3f& p2, const Vec3f& p3, const Vec3f& p4);
+ virtual ~QuadAreaLight();
+
+ virtual bool Illuminate(Ray& shadow_ray, Vec3f& intensity);
+ virtual bool IsArea();
+
+ const Vec3f& GetNormal(const Vec3f& position) const;
+
+private:
+ QuadAreaLight();
+
+ // defines the quad by one point and to vectors
+ Vec3f m_p0, m_e1, m_e2;
+ // normal
+ Vec3f m_n;
+ // emission(red, green, blue)
+ Vec3f m_intensity;
+ // area
+ float m_area;
+};
+#endif