-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDirectionalLight.h
34 lines (24 loc) · 972 Bytes
/
DirectionalLight.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
#ifndef MIMEMA_DIRECTIONALLIGHT_H
#define MIMEMA_DIRECTIONALLIGHT_H
#define GLM_ENABLE_EXPERIMENTAL
#include <glm/mat4x4.hpp>
#include <glm/gtx/transform.hpp>
#include <glm/gtx/string_cast.hpp>
#include "tracy/Tracy.hpp"
namespace Mimema {
struct DirectionalLight {
struct DirectionalLightState {
glm::vec3 direction = {0, -1, 0};
glm::vec3 color = {1, 1, 1};
float intensity = 1;
DirectionalLightState() = default;
DirectionalLightState(const glm::vec3& direction, const glm::vec3& color, float intensity);
DirectionalLightState operator*(float alpha) const;
DirectionalLightState operator+(const DirectionalLightState& rhs) const;
};
DirectionalLightState directionalLightState;
DirectionalLight() = default;
explicit DirectionalLight(const DirectionalLightState& directionalLightState);
};
}
#endif //MIMEMA_DIRECTIONALLIGHT_H