blob: da551c0788414da85c0e07c78816514c53d43f19 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
#pragma once
#include "Color.hpp"
#include "GameObject.hpp"
#include "Renderer.hpp"
#include <glm/glm.hpp>
#include <vector>
class SimpleGeometryObject : public GameObject {
private:
RenderObject mRenderObject;
glm::vec2 mSize;
RgbaColor mColor;
public:
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();
};
class BuildingObject : public GameObject {
private:
RenderObject mRenderObject;
public:
BuildingObject(GameWorld* world);
// 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;
};
|