| 8 | namespace Maths |
| 9 | { |
| 10 | Matrix4 createViewMatrix(const Camera& camera) |
| 11 | { |
| 12 | Matrix4 matrix; |
| 13 | |
| 14 | matrix = glm::rotate(matrix, glm::radians(camera.rotation.x), {1, 0, 0}); |
| 15 | matrix = glm::rotate(matrix, glm::radians(camera.rotation.y), {0, 1, 0}); |
| 16 | matrix = glm::rotate(matrix, glm::radians(camera.rotation.z), {0, 0, 1}); |
| 17 | |
| 18 | matrix = glm::translate(matrix, -camera.position); |
| 19 | |
| 20 | return matrix; |
| 21 | } |
| 22 | |
| 23 | Matrix4 createModelMatrix(const Entity& entity) |
| 24 | { |