diff options
author | rtk0c <[email protected]> | 2022-04-09 13:29:41 -0700 |
---|---|---|
committer | rtk0c <[email protected]> | 2022-04-09 13:29:41 -0700 |
commit | a849c199d970e153580c312a24cfdfa099bc7b69 (patch) | |
tree | 1b5faa8d40953ee451103b94349bb84c738677ee /source/GameObject.hpp | |
parent | e7ef3f208c109357538b1f68af10bcd78db95c95 (diff) |
Changeset: 4 More work on editor
Diffstat (limited to 'source/GameObject.hpp')
-rw-r--r-- | source/GameObject.hpp | 17 |
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 |