-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLight.h
42 lines (32 loc) · 783 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
40
41
#pragma once
#include "EMath.h"
#include "SDL.h"
#include "Ray.h"
using namespace Elite;
class Light {
public:
Light(RGBColor color, float intensity);
~Light() = default;
Light(const Light& other) = delete;
Light(Light&& other) = delete;
Light& operator=(Light&& other) = delete;
Light& operator=(const Light& other) = delete;
bool IsLightOn() const {
return m_IsOn;
}
void ChangeLightStatus() {
if (m_IsOn) {
m_IsOn = false;
}
else {
m_IsOn = true;
}
}
virtual RGBColor Irradiance(HitRecord& hitrecord) = 0;
virtual FVector3 GetDirection(const HitRecord& hitRecord) const = 0;
virtual FVector3 GetTowardPointDirection(const HitRecord& hitRecord) const = 0;
protected:
const RGBColor m_Color;
const float m_Intensity;
bool m_IsOn = true;
};