20#ifndef YOURGAME_TRAFO_H
21#define YOURGAME_TRAFO_H
23#define GLM_ENABLE_EXPERIMENTAL
51 void pointTo(glm::vec3
const &eye, glm::vec3
const ¢er, glm::vec3
const &up);
52 void lookAt(glm::vec3
const &eye, glm::vec3
const ¢er, glm::vec3
const &up);
62 glm::vec3 m_eye = glm::vec3(0.0f, 0.0f, 0.0f);
63 glm::quat m_rot = glm::quat(1.0f, 0.0f, 0.0f, 0.0f);
64 glm::vec3 m_scale = glm::vec3(1.0f, 1.0f, 1.0f);
67 glm::mat4 m_mat = glm::mat4(1.0f);
68 glm::mat4 m_matRot = glm::mat4(1.0f);
70 bool m_matInvalidated =
false;
71 void updateMatrixIfInvalidated();
glm::vec3 getAxisGlobal(math::Axis ax) const
Definition trafo.cpp:188
void setRotation(glm::quat const &rot)
Definition trafo.cpp:96
glm::quat getRotation() const
Definition trafo.cpp:210
void setTranslation(glm::vec3 const &trans)
Definition trafo.cpp:102
void resetScale()
Definition trafo.cpp:108
glm::mat4 mat()
Definition trafo.cpp:26
glm::vec3 getAxisLocal(math::Axis ax)
Definition trafo.cpp:170
void rotateLocal(float angle, math::Axis ax)
Definition trafo.cpp:32
void translateLocal(float distance, math::Axis ax)
Definition trafo.cpp:58
void setIdentity()
Definition trafo.cpp:162
void pointTo(glm::vec3 const &eye, glm::vec3 const ¢er, glm::vec3 const &up)
Definition trafo.cpp:123
void setScaleLocal(glm::vec3 const &scale)
Definition trafo.cpp:84
void lerp(float t, Trafo const &target, Trafo *dst)
Definition trafo.cpp:140
glm::vec3 getScale() const
Definition trafo.cpp:215
void rotateGlobal(float angle, math::Axis ax)
Definition trafo.cpp:45
void translateGlobal(float distance, math::Axis ax)
Definition trafo.cpp:72
void resetRotation()
Definition trafo.cpp:113
void lookAt(glm::vec3 const &eye, glm::vec3 const ¢er, glm::vec3 const &up)
Definition trafo.cpp:132
void resetTranslation()
Definition trafo.cpp:118
glm::vec3 getEye() const
Definition trafo.cpp:205