aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/Transform.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe/api/Transform.h')
-rw-r--r--src/crepe/api/Transform.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/crepe/api/Transform.h b/src/crepe/api/Transform.h
new file mode 100644
index 0000000..c451c16
--- /dev/null
+++ b/src/crepe/api/Transform.h
@@ -0,0 +1,27 @@
+#pragma once
+
+#include <cstdint>
+
+#include "api/Point.h"
+
+#include "Component.h"
+
+namespace crepe::api {
+
+class Transform : public Component {
+ // FIXME: What's the difference between the `Point` and `Position`
+ // classes/structs? How about we replace both with a universal `Vec2` that
+ // works similar (or the same) as those found in GLSL?
+
+public:
+ Transform(uint32_t id, const Point &, double, double);
+ ~Transform();
+ //! Translation (shift)
+ Point position;
+ //! Rotation, in radians
+ double rotation;
+ //! Multiplication factor
+ double scale;
+};
+
+} // namespace crepe::api