| 21 | } |
| 22 | |
| 23 | Matrix4 createModelMatrix(const Entity& entity) |
| 24 | { |
| 25 | Matrix4 matrix; |
| 26 | |
| 27 | matrix = glm::translate(matrix, entity.position); |
| 28 | |
| 29 | matrix = glm::rotate(matrix, glm::radians(entity.rotation.x), {1, 0, 0}); |
| 30 | matrix = glm::rotate(matrix, glm::radians(entity.rotation.y), {0, 1, 0}); |
| 31 | matrix = glm::rotate(matrix, glm::radians(entity.rotation.z), {0, 0, 1}); |
| 32 | |
| 33 | return matrix; |
| 34 | } |
| 35 | |
| 36 | Matrix4 createProjMatrix(float fieldOfView) |
| 37 | { |