aboutsummaryrefslogtreecommitdiff
path: root/source/GameObject.cpp
diff options
context:
space:
mode:
authorrtk0c <[email protected]>2022-05-07 15:36:35 -0700
committerrtk0c <[email protected]>2022-05-07 15:36:35 -0700
commit7129d65df7b02d7412ee5d56debd5a9c094db5ad (patch)
tree55b551554d6aba9de7fb004c0c250800dfb87611 /source/GameObject.cpp
parentcde94efdd44553f3f6575ce84b44c6799e1a1425 (diff)
Changeset: 23 Fix camera view matrix, [WIP] guizmo
Diffstat (limited to 'source/GameObject.cpp')
-rw-r--r--source/GameObject.cpp17
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 {};
}