-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDirectionalLight.cpp
26 lines (22 loc) · 1004 Bytes
/
DirectionalLight.cpp
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
#include "DirectionalLight.h"
Mimema::DirectionalLight::DirectionalLightState::DirectionalLightState(const glm::vec3& direction,
const glm::vec3& color, float intensity) {
this->direction = direction;
this->color = color;
this->intensity = intensity;
}
Mimema::DirectionalLight::DirectionalLightState
Mimema::DirectionalLight::DirectionalLightState::operator*(float alpha) const {
return {direction * alpha,
color * alpha,
intensity * alpha};
}
Mimema::DirectionalLight::DirectionalLightState
Mimema::DirectionalLight::DirectionalLightState::operator+(const Mimema::DirectionalLight::DirectionalLightState& rhs) const {
return {direction + rhs.direction,
color + rhs.color,
intensity + rhs.intensity};
}
Mimema::DirectionalLight::DirectionalLight(const DirectionalLightState& directionalLightState) : directionalLightState(directionalLightState) {
// None
}