-
Notifications
You must be signed in to change notification settings - Fork 0
/
Light.h
40 lines (32 loc) · 884 Bytes
/
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
#ifndef LIGHT_H
#define LIGHT_H
#include <string>
#include "Color.h"
class Light
{
protected:
std::string type;
Color id, is; // Intensity diffuse, itensity specular
public:
Light()
{
}
Light(std::string type, Color id, Color is)
: type(type), id(id), is(is)
{
}
virtual ~Light()
{
}
inline const auto& GetType() const { return type; }
inline const auto& GetDiffuseIntensity() const { return id; }
inline const auto& GetSpecularIntensity() const { return is; }
friend std::ostream& operator << (std::ostream& os, const Light& l)
{
os << "Type: " << l.GetType() << '\n'
<< "Intensity Diffuse: (" << l.id.r << ", " << l.id.g << ", " << l.id.b << ")\n"
<< "Intensity Specular: (" << l.is.r << ", " << l.is.g << ", " << l.is.b << ")\n";
return os;
}
};
#endif