glm matrix initialization

This commit is contained in:
saschawillems 2017-09-24 18:17:07 +02:00
parent e7b371eef3
commit cd8274c294
49 changed files with 127 additions and 127 deletions

View file

@ -492,7 +492,7 @@ public:
// Update matrices
glm::vec3 pos = glm::vec3(-((dim * offset.x) / 2.0f) + offset.x / 2.0f + x * offset.x, -((dim * offset.y) / 2.0f) + offset.y / 2.0f + y * offset.y, -((dim * offset.z) / 2.0f) + offset.z / 2.0f + z * offset.z);
*modelMat = glm::translate(glm::mat4(), pos);
*modelMat = glm::translate(glm::mat4(1.0f), pos);
*modelMat = glm::rotate(*modelMat, rotations[index].x, glm::vec3(1.0f, 1.0f, 0.0f));
*modelMat = glm::rotate(*modelMat, rotations[index].y, glm::vec3(0.0f, 1.0f, 0.0f));
*modelMat = glm::rotate(*modelMat, rotations[index].z, glm::vec3(0.0f, 0.0f, 1.0f));