11#include <glm/gtc/matrix_transform.hpp>
78 void SetPosition(
const glm::vec2& position);
84 void SetRotation(
float angleDegrees);
90 void SetScale(
const glm::vec2& scale);
108 const glm::vec2&
GetScale()
const {
return mScale; }
116 glm::vec2 GetWorldPosition()
const;
124 float GetWorldRotation()
const;
132 glm::vec2 GetWorldScale()
const;
141 const glm::mat4& GetWorldMatrix();
153 void UpdateLocalMatrix();
163 void UpdateWorldMatrix();
Represents a hierarchical 2D transform component.
virtual ~SceneComponent2D()=default
Destructor.
SceneComponent2D & operator=(const SceneComponent2D &rhs)=delete
SceneComponent2D(const SceneComponent2D &rhs)=delete
const glm::vec2 & GetScale() const
Gets the current scale.
const glm::vec2 & GetPosition() const
Gets the current position.
float GetRotation() const
Gets the current rotation angle (in degrees).
SceneComponent2D * mParent