summaryrefslogtreecommitdiff
path: root/gfx/gl/transform.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-03-03 00:08:47 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2021-03-03 00:08:47 +0000
commit94311f9c4e82b7475802b1934cc0c5b243e0cd2f (patch)
tree5ef23f6c1151917eb723b67c262da0168e42343c /gfx/gl/transform.cpp
parentOur own matrix rotations (diff)
downloadilt-94311f9c4e82b7475802b1934cc0c5b243e0cd2f.tar.bz2
ilt-94311f9c4e82b7475802b1934cc0c5b243e0cd2f.tar.xz
ilt-94311f9c4e82b7475802b1934cc0c5b243e0cd2f.zip
Replace Transform with Location
Simpler, unbinds the transformation matrices for location, now done just in the shader.
Diffstat (limited to 'gfx/gl/transform.cpp')
-rw-r--r--gfx/gl/transform.cpp16
1 files changed, 0 insertions, 16 deletions
diff --git a/gfx/gl/transform.cpp b/gfx/gl/transform.cpp
deleted file mode 100644
index c7004ba..0000000
--- a/gfx/gl/transform.cpp
+++ /dev/null
@@ -1,16 +0,0 @@
-#include "transform.h"
-#include <glm/gtx/transform.hpp>
-#include <maths.h>
-
-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 rotX = glm::rotate(rot.x, west);
- const auto rotY = glm::rotate(rot.y, up);
- const auto rotZ = glm::rotate(rot.z, north);
-
- return posMat * rotY * rotX * rotZ;
-}