9#include <glm/gtc/matrix_transform.hpp>
58 void SetScale(
const glm::vec2& scale);
virtual ~SceneComponent2D()=default
Destructor.
const glm::vec2 & GetScale() const
Gets the current scale.
SceneComponent2D()
Constructs a SceneComponent2D at the origin, with zero rotation and unit scale.
const glm::vec2 & GetPosition() const
Gets the current position.
void SetScale(const glm::vec2 &scale)
Sets the scale in each dimension.
float GetRotation() const
Gets the current rotation angle (in degrees).
const glm::mat4 & GetModelMatrix() const
Gets the model matrix for this component.
void SetRotation(float angleDegrees)
Sets the rotation angle in degrees.
void SetPosition(const glm::vec2 &position)
Sets the position in 2D space.
void UpdateModelMatrix()
Updates the model matrix from the current position, rotation, and scale.