From a849c199d970e153580c312a24cfdfa099bc7b69 Mon Sep 17 00:00:00 2001 From: rtk0c Date: Sat, 9 Apr 2022 13:29:41 -0700 Subject: Changeset: 4 More work on editor --- source/GameObject.hpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'source/GameObject.hpp') 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 mEditorAttachment = nullptr; + std::unique_ptr mEditorAttachment = nullptr; GameWorld* mWorld = nullptr; GameObject* mParent = nullptr; PodVector mChildren; @@ -40,12 +40,17 @@ public: GameObject* RemoveChild(GameObject* child); PodVector 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 -- cgit v1.2.3-70-g09d2