diff options
Diffstat (limited to 'source/GameObject.cpp')
-rw-r--r-- | source/GameObject.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/source/GameObject.cpp b/source/GameObject.cpp index 0dccf38..ce515bd 100644 --- a/source/GameObject.cpp +++ b/source/GameObject.cpp @@ -29,7 +29,12 @@ GameObject::GameObject(GameWorld* world) } GameObject::GameObject(Kind kind, GameWorld* world) - : mWorld{ world } + : mEditorAttachment{ nullptr } + , mWorld{ world } + , mParent{ nullptr } + , mRot(1.0f, 0.0f, 0.0f, 0.0f) + , mPos(0.0f, 0.0f, 0.0f) + , mScale(1.0f, 1.0f, 1.0f) , mKind{ kind } { } @@ -142,7 +147,7 @@ PodVector<GameObject*> GameObject::RemoveAllChildren() { return result; } -const glm::vec3& GameObject::GetPos() { +const glm::vec3& GameObject::GetPos() const { return mPos; } @@ -158,6 +163,14 @@ void GameObject::SetRotation(const glm::quat& rotation) { mRot = rotation; } +const glm::vec3& GameObject::GetScale() const { + return mScale; +} + +void GameObject::SetScale(const glm::vec3& scale) { + mScale = scale; +} + std::span<const RenderObject> GameObject::GetRenderObjects() const { return {}; } |