summaryrefslogtreecommitdiff
path: root/gfx/gl/transform.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/gl/transform.cpp')
-rw-r--r--gfx/gl/transform.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/gfx/gl/transform.cpp b/gfx/gl/transform.cpp
index b7230f7..8aa118b 100644
--- a/gfx/gl/transform.cpp
+++ b/gfx/gl/transform.cpp
@@ -1,17 +1,15 @@
#include "transform.h"
#include <glm/gtx/transform.hpp>
-Transform::Transform(glm::vec3 pos, glm::vec3 rot, glm::vec3 scale) : pos {pos}, rot {rot}, scale {scale} { }
+Transform::Transform(glm::vec3 pos, glm::vec3 rot) : pos {pos}, rot {rot} { }
glm::mat4
Transform::GetModel() const
{
const auto posMat = glm::translate(pos);
- const auto scaleMat = glm::scale(scale);
const auto rotX = glm::rotate(rot.x, glm::vec3(1.0, 0.0, 0.0));
const auto rotY = glm::rotate(rot.y, glm::vec3(0.0, 1.0, 0.0));
const auto rotZ = glm::rotate(rot.z, glm::vec3(0.0, 0.0, 1.0));
- const auto rotMat = rotY * rotX * rotZ;
- return posMat * rotMat * scaleMat;
+ return posMat * rotY * rotX * rotZ;
}