From 7129d65df7b02d7412ee5d56debd5a9c094db5ad Mon Sep 17 00:00:00 2001 From: rtk0c Date: Sat, 7 May 2022 15:36:35 -0700 Subject: Changeset: 23 Fix camera view matrix, [WIP] guizmo --- source/GameObject.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'source/GameObject.cpp') 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::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 GameObject::GetRenderObjects() const { return {}; } -- cgit v1.2.3-70-g09d2