11 #include <glm/glm.hpp>
12 #include <glm/gtc/quaternion.hpp>
16 class TransformComponentInstance;
27 glm::vec3
mScale = { 1.0f, 1.0f, 1.0f };
46 glm::quat
mRotate = { 0.0f, 0.0f, 0.0f, 1.0f };
47 glm::vec3
mScale = { 1.0f, 1.0f, 1.0f };
93 const glm::mat4x4& getLocalTransform()
const;
101 void setLocalTransform(
const glm::mat4x4& matrix);
108 void overrideLocalTransform(
const glm::mat4x4& matrix);
115 const glm::mat4x4& getGlobalTransform()
const;
134 void update(
const glm::mat4& parentTransform);
140 void setTranslate(
const glm::vec3& translate);
151 void setRotate(
const glm::quat& rotate);
163 void setScale(
const glm::vec3& scale);
168 const glm::vec3&
getScale()
const {
return mScale; }
175 void setUniformScale(
float scale);
197 mutable bool mWorldDirty =
true;
200 mutable bool mLocalDirty =
true;
203 mutable glm::mat4x4 mLocalMatrix;
204 mutable glm::mat4x4 mGlobalMatrix;
207 glm::vec3 mTranslate = glm::vec3(0.0f, 0.0f, 0.0f);
208 glm::quat mRotate = glm::quat();
209 glm::vec3 mScale = glm::vec3(1.0f, 1.0f, 1.0f);
210 float mUniformScale = 1.0f;
Definition: errorstate.h:19
virtual void update(double deltaTime)
Definition: component.h:64
Definition: component.h:43
Definition: component.h:151
Definition: templateapp.h:17