8#define GLM_FORCE_RADIANS
9#define GLM_FORCE_DEPTH_ZERO_TO_ONE
10#define GLM_ENABLE_EXPERIMENTAL
11#include <glm/vec4.hpp>
12#include <glm/mat4x4.hpp>
14#include <glm/gtc/quaternion.hpp>
15#include <glm/gtx/quaternion.hpp>
16#include <glm/gtc/matrix_transform.hpp>
17#include <glm/gtc/matrix_inverse.hpp>
59 void UpdateLocalMatrix();
61 void UpdateWorldMatrix();
67 const glm::mat4& GetWorldMatrix();
73 void SetPosition(
const glm::vec3& position);
80 void SetRotation(
const glm::quat& rotation);
90 void SetRotation(
const glm::vec3& rotation);
96 void SetScale(
const glm::vec3& scale);
123 const glm::vec3&
GetScale()
const {
return mScale; }
130 glm::vec3 GetForward()
const;
137 glm::vec3 GetRight()
const;
144 glm::vec3 GetUp()
const;
150 glm::vec3 GetWorldPosition()
const;
158 glm::quat GetWorldRotation()
const;
164 glm::vec3 GetWorldScale()
const;
Represents a 3D transformable scene component with position, rotation, and scale.
const glm::vec3 & GetPosition() const
Gets the current position.
SceneComponent(const SceneComponent &rhs)=delete
const glm::vec3 & GetRotation() const
Gets the current rotation as Euler angles (in radians).
virtual ~SceneComponent()=default
Destructor.
const glm::vec3 & GetScale() const
Gets the current scale.
SceneComponent & operator=(const SceneComponent &rhs)=delete
const glm::quat & GetRotationQuat() const
Gets the current rotation as a quaternion.