4 #include <ThirdParty/glm/glm/glm.hpp> 16 explicit TransformComponent(glm::vec3 position, glm::vec3 rotation,
bool isStatic) noexcept;
17 explicit TransformComponent(glm::vec3 position, glm::vec3 rotation, glm::vec3 scale) noexcept;
18 explicit TransformComponent(glm::vec3 position, glm::vec3 rotation, glm::vec3 scale,
bool isStatic) noexcept;
20 void SetPosition(glm::vec3 position) noexcept;
21 void SetPosition(
float x,
float y,
float z) noexcept;
22 glm::vec3 GetPosition() noexcept;
24 void SetRotation(glm::vec3 rotation) noexcept;
25 void SetRotation(
float x,
float y,
float z) noexcept;
26 glm::vec3 GetRotation() noexcept;
28 void SetScale(glm::vec3 scale) noexcept;
29 void SetScale(
float x,
float y,
float z) noexcept;
30 glm::vec3 GetScale() noexcept;
32 void SetModelMatrix(glm::mat4x4 modelMatrix) noexcept;
33 void SetModelMatrix(
float modelMatrix[16]) noexcept;
34 void SetModelMatrix(glm::vec4 modelMatrix[4]) noexcept;
35 glm::mat4x4 GetModelMatrix() noexcept;
37 void SetIsStatic(
bool isStatic) noexcept;
38 bool GetIsStatic() noexcept;
40 void Translate(glm::vec3 positionToAdd) noexcept;
41 void Translate(
float x) noexcept;
42 void Translate(
float x,
float y) noexcept;
43 void Translate(
float x,
float y,
float z) noexcept;
45 void AddRotate(glm::vec3 rotationToAdd) noexcept;
46 void AddRotate(
float x) noexcept;
47 void AddRotate(
float x,
float y) noexcept;
48 void AddRotate(
float x,
float y,
float z) noexcept;
50 void AddScale(glm::vec3 scaleToAdd) noexcept;
51 void AddScale(
float x) noexcept;
52 void AddScale(
float x,
float y) noexcept;
53 void AddScale(
float x,
float y,
float z) noexcept;
55 glm::vec3 GetRight() noexcept;
56 glm::vec3 GetUp() noexcept;
57 glm::vec3 GetForward() noexcept;
60 void LookAt(glm::vec3 targetPosition) noexcept;
61 void RotateAround(
float angle, glm::vec3 axis) noexcept;
63 void Update()
override;
64 void UpdateModelMatrix() noexcept;
76 bool shouldRecalculateModelMatrix =
false;
78 glm::mat4x4 modelMatrix;
This is the base class for components. NOTE: only the Entity class is allowed to create this object...