Transformable now uses a matrix

This commit is contained in:
Robert 2021-01-23 13:19:13 +01:00
parent 30736781ab
commit 3e6884356f
4 changed files with 63 additions and 199 deletions

View file

@ -10,6 +10,8 @@
#define TRANSFORMABLE_HPP
#include <core.hpp>
#include <glm/glm.hpp>
#include <glm/gtx/quaternion.hpp>
namespace oglu
{
@ -258,12 +260,13 @@ namespace oglu
protected:
// TODO: Separate translation, rotation and scaling matrices.
// Combine them only when the user wants the transformation matrix
float* position; ///< Position vector
float* rotation; ///< Rotation matrix
float* scaling; ///< Scaling vector
glm::mat4 transformation;
float* transformation;
bool calculateMatrix; ///< Wether GetMatrix() needs to re-calculate the transformation matrix
glm::vec3 scale;
glm::quat orientation;
glm::vec3 translation;
glm::vec3 skew;
glm::vec4 perspective;
};
}