mirror of
https://github.com/zhenyan121/Cubed.git
synced 2026-08-08 17:57:02 +08:00
Add RenderTransform component to smooth position/direction updates and use it in entity and shadow passes.
30 lines
485 B
C++
30 lines
485 B
C++
#pragma once
|
|
#include <glm/glm.hpp>
|
|
namespace Cubed {
|
|
struct Position {
|
|
glm::vec3 value{0.0f};
|
|
};
|
|
|
|
struct Orientation {
|
|
float yaw = 0.0f;
|
|
float pitch = 0.0f;
|
|
float roll = 0.0f;
|
|
};
|
|
|
|
struct Direction {
|
|
glm::vec3 value{0.0f};
|
|
};
|
|
|
|
struct Transform {
|
|
Position position{};
|
|
Orientation orientation{};
|
|
Direction direction{};
|
|
};
|
|
|
|
struct RenderTransform {
|
|
Position position{};
|
|
Orientation orientation{};
|
|
Direction direction{};
|
|
};
|
|
|
|
} // namespace Cubed
|