Minor - Enhances ECS component functionality - V13.5.0

Adds serialization/deserialization to components,
allowing saving and loading of entity states.
Provides ImGui widgets for editing component properties,
improving editor usability.
Passes the D3D device and context to entities and
components enabling resource creation within components.
This commit is contained in:
2025-09-16 18:26:33 +02:00
parent f875580197
commit de05631608
8 changed files with 346 additions and 16 deletions

View File

@@ -82,6 +82,12 @@ public:
*/
void get_reflection_view_matrix(XMMATRIX&) const;
/**
* @brief Calculates and returns the forward direction vector of the camera based on its rotation.
* This vector points in the direction the camera is facing.
* @return A normalized 3D vector representing the camera's forward direction.
*/
XMFLOAT3 get_forward() const {
float pitch = XMConvertToRadians(rotation_x_);
float yaw = XMConvertToRadians(rotation_y_);
@@ -93,7 +99,11 @@ public:
return forwardVec;
}
/**
* @brief Calculates and returns the right direction vector of the camera based on its rotation.
* This vector points to the right side of the camera.
* @return A normalized 3D vector representing the camera's right direction.
*/
XMFLOAT3 get_up() const {
// Construire matrice rotation <20> partir des angles
XMMATRIX rot = XMMatrixRotationRollPitchYaw(