-
Notifications
You must be signed in to change notification settings - Fork 1
/
Light.h
61 lines (50 loc) · 1.16 KB
/
Light.h
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
class Light{
int type;
vec3 color;
vec3 position;
vec3 direction;
double angle1, angle2;
public:
Light(int t, double r, double g, double b, double x, double y, double z);
Light(int t, double r, double g, double b, double x, double y, double z, double px, double py, double pz, double a1, double a2);
int getType();
vec3 getColor();
vec3 getPosition();
vec3 getDirection();
double getAngle1();
double getAngle2();
};
Light::Light(int t, double r, double g, double b, double x, double y, double z){
type = t;
color = vec3(r,g,b);
position = vec3(x,y,z);
direction = vec3(0.0,0.0,0.0);
angle1 = 0.0;
angle2 = 0.0;
}
Light::Light(int t, double r, double g, double b, double x, double y, double z, double px, double py, double pz, double a1, double a2){
type = t;
color = vec3(r,g,b);
position = vec3(x,y,z);
direction = normalize(vec3(px,py,pz));
angle1 = a1;
angle2 = a2;
}
int Light::getType(){
return type;
}
vec3 Light::getColor(){
return color;
}
vec3 Light::getPosition(){
return position;
}
vec3 Light::getDirection(){
return direction;
}
double Light::getAngle1(){
return angle1;
}
double Light::getAngle2(){
return angle2;
}