-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAreaLight.hpp
45 lines (36 loc) · 1.06 KB
/
AreaLight.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef __AREALIGHT__
#define __AREALIGHT__
#include "color/RGB.hpp"
#include "vfield/Point.hpp"
#include "vfield/Direction.hpp"
#include "vfield/Operations.hpp"
/*
____
height___| . |
origin |_____|
|base
*/
//***********************************************************************
// Area light implementation
//***********************************************************************
class AreaLight{
private:
RGB emission;
Point origin;
//Must be normalized
Direction base, height;
float boundU, boundV;
public:
AreaLight();
AreaLight(Point origin, Direction base, Direction height, float boundU, float boundV, RGB emission);
void setEmission(RGB emission);
RGB getEmission();
void setOrigin(Point origin);
Point getOrigin();
void setBase(Direction base);
Direction getBase();
void setHeight(Direction height);
Direction getHeight();
int findIntersectionWithLine(Direction d, Point o, float result[]);
};
#endif