-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLight.hpp
More file actions
36 lines (30 loc) · 837 Bytes
/
Copy pathLight.hpp
File metadata and controls
36 lines (30 loc) · 837 Bytes
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
#ifndef LIGHT_HPP
#define LIGHT_HPP
#include "Vector3.hpp"
#include "Shape.hpp"
struct LightContribution {
Vector3 direction, color;
};
class Light {
public:
virtual LightContribution contributeLight(Hit h, Scene* sc) = 0;
};
class DirectionalLight : public Light {
public:
DirectionalLight(Vector3 direction, Vector3 color);
DirectionalLight(Vector3 direction);
DirectionalLight();
LightContribution contributeLight(Hit h, Scene* sc) override;
private:
Vector3 direction, color;
};
class PointLight : public Light {
public:
PointLight(Vector3 position, Vector3 color);
PointLight(Vector3 position);
PointLight();
LightContribution contributeLight(Hit h, Scene* sc) override;
private:
Vector3 position, color;
};
#endif