diff options
Diffstat (limited to 'source/SceneThings.hpp')
-rw-r--r-- | source/SceneThings.hpp | 39 |
1 files changed, 30 insertions, 9 deletions
diff --git a/source/SceneThings.hpp b/source/SceneThings.hpp index f8ad000..da551c0 100644 --- a/source/SceneThings.hpp +++ b/source/SceneThings.hpp @@ -1,21 +1,42 @@ #pragma once +#include "Color.hpp" #include "GameObject.hpp" +#include "Renderer.hpp" +#include <glm/glm.hpp> #include <vector> -class BuildingObject : public GameObject { +class SimpleGeometryObject : public GameObject { private: - RcPtr<GpuMesh> mMesh; - RcPtr<Material> mMaterial; + RenderObject mRenderObject; + glm::vec2 mSize; + RgbaColor mColor; public: - using GameObject::GameObject; + SimpleGeometryObject(GameWorld* world); + + glm::vec2 GetSize() const { return mSize; } + void SetSize(glm::vec2 size); + RgbaColor GetColor() const { return mColor; } + void SetColor(RgbaColor color); + virtual std::span<const RenderObject> GetRenderObjects() const override; + +private: + void UpdateRenderObject(); +}; - virtual Tags::GameObjectType GetTypeTag() const override { return Tags::GOT_Building; } +class BuildingObject : public GameObject { +private: + RenderObject mRenderObject; + +public: + BuildingObject(GameWorld* world); - void SetMeshMaterial(Material* material); - virtual const Material* GetMeshMaterial() const override; - void SetMesh(GpuMesh* mesh); - virtual const GpuMesh* GetMesh() const override; + // TODO + // void SetMeshMaterial(Material* material); + // virtual const Material* GetMeshMaterial() const override; + // void SetMesh(GpuMesh* mesh); + // virtual const GpuMesh* GetMesh() const override; + virtual std::span<const RenderObject> GetRenderObjects() const override; }; |