(hopefully) finished Box::Clip()
[MicroTrace.git] / QuadAreaLight.hxx
1 #ifndef QUADAREALIGHT_HXX
2 #define QUADAREALIGHT_HXX
3
4 #include "Light.hxx"
5
6 class QuadAreaLight : public Light
7 {
8 public:
9 //! Points p1 to p4 are assumed to define a planar rectangular region and have to be given counter-clockwise
10 QuadAreaLight(Scene* scene, const Vec3f& intensity, const Vec3f& p1, const Vec3f& p2, const Vec3f& p3, const Vec3f& p4);
11 virtual ~QuadAreaLight();
12
13 virtual bool Illuminate(Ray& shadow_ray, Vec3f& intensity);
14 virtual bool IsArea();
15
16 const Vec3f& GetNormal(const Vec3f& position) const;
17
18 private:
19 QuadAreaLight();
20
21 // defines the quad by one point and to vectors
22 Vec3f m_p0, m_e1, m_e2;
23 // normal
24 Vec3f m_n;
25 // emission(red, green, blue)
26 Vec3f m_intensity;
27 // area
28 float m_area;
29 };
30 #endif
This page took 0.041342 seconds and 5 git commands to generate.