aboutsummaryrefslogtreecommitdiff
path: root/source/GameObject.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/GameObject.hpp')
-rw-r--r--source/GameObject.hpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/source/GameObject.hpp b/source/GameObject.hpp
index 750ae4a..cb83da3 100644
--- a/source/GameObject.hpp
+++ b/source/GameObject.hpp
@@ -1,6 +1,6 @@
#pragma once
-#include "EditorCoreAPI.hpp"
+#include "EditorAttachment.hpp"
#include "GameObjectTypeTag.hpp"
#include "Material.hpp"
#include "Mesh.hpp"
@@ -13,7 +13,7 @@
class GameWorld;
class GameObject {
public: // NOTE: public for editors
- std::unique_ptr<EditorGameObjectAttachment, EditorGameObjectAttachmentDeleter> mEditorAttachment = nullptr;
+ std::unique_ptr<EditorAttachment> mEditorAttachment = nullptr;
GameWorld* mWorld = nullptr;
GameObject* mParent = nullptr;
PodVector<GameObject*> mChildren;
@@ -40,12 +40,17 @@ public:
GameObject* RemoveChild(GameObject* child);
PodVector<GameObject*> RemoveAllChildren();
- EditorGameObjectAttachment* GetEditorAttachment() const { return mEditorAttachment.get(); }
- void SetEditorAttachment(EditorGameObjectAttachment* attachment) { mEditorAttachment.reset(attachment); }
+ EditorAttachment* GetEditorAttachment() const { return mEditorAttachment.get(); }
+ void SetEditorAttachment(EditorAttachment* attachment) { mEditorAttachment.reset(attachment); }
+
+ const glm::vec3& GetPos();
+ void SetPos(const glm::vec3& pos);
+
+ const glm::quat& GetRotation() const;
+ void SetRotation(const glm::quat& rotation);
// Tag
- virtual Tags::GameObjectMemoryManagement
- GetMemoryManagement() const;
+ virtual Tags::GameObjectMemoryManagement GetMemoryManagement() const;
virtual Tags::GameObjectType GetTypeTag() const;
// Visuals