Elevate Engine 1
Loading...
Searching...
No Matches
DirectionalLight.cpp
Go to the documentation of this file.
1#include "eepch.h"
2#include "DirectionalLight.h"
3#include <glm/geometric.hpp>
4
6
7namespace Elevate
8{
10 {
11 glm::vec3 dir;
12
13 glm::vec3 rotation = gameObject->GetRotation();
14 dir.x = cos(rotation.x) * cos(rotation.y);
15 dir.y = sin(rotation.x);
16 dir.z = cos(rotation.x) * sin(rotation.y);
17 dir = glm::normalize(dir);
18
19 return dir;
20 }
21}
GameObject * gameObject
Definition Component.h:73
const glm::vec3 CalculateDirection() const