#ifndef TRANSFORM_H
#define TRANSFORM_H

#include <glm/mat4x4.hpp>
#include <glm/vec3.hpp>
#include <glm/ext.hpp>

struct Transform
{
    glm::vec3 m_position;
    glm::quat m_rotation;

    static createTransform();

    void getPosition(float* pos) { memcpy(pos, glm::value_ptr(m_position), sizeof(float)*3); }
    void setPosition(const float* pos) { memcpy(glm::value_ptr(m_position), pos, sizeof(float)*3); }
    void getRotation(float* rot) { memcpy(rot, glm::value_ptr(m_rotation), sizeof(float)*4); }
    void setRotation(const float* rot) { memcpy(glm::value_ptr(m_rotation), rot, sizeof(float)*4); }

    glm::mat4 getMatrix() const;
    void setFromMatrix(const glm::mat4& mat);
};

#endif // TRANSFORM_H
