Update updatestructures to have transform with translation, rotation and scale.

This commit is contained in:
Kalle Bladin
2016-08-18 16:59:51 -04:00
parent ae1f8e457b
commit 628f8b479f
10 changed files with 37 additions and 44 deletions
@@ -559,8 +559,9 @@ void RenderableFov::render(const RenderData& data) {
// setup the data to the shader
// Model transform and view transform needs to be in double precision
glm::dmat4 modelTransform =
glm::translate(glm::dmat4(1.0), data.positionVec3) * // Translation
glm::dmat4(data.rotation);
glm::translate(glm::dmat4(1.0), data.modelTransform.translation) * // Translation
glm::dmat4(data.modelTransform.rotation) *
glm::scale(glm::dmat4(1.0), glm::dvec3(data.modelTransform.scale));
glm::mat4 modelViewProjectionTransform =
data.camera.projectionMatrix() *
glm::mat4(data.camera.combinedViewMatrix() *