blob: 761eb59b6ba64f8427648f94ccab70b94c0ecb98 (
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
43
44
45
46
47
48
49
50
51
52
|
#pragma once
#include "Color.hpp"
#include "GameObject.hpp"
#include "Renderer.hpp"
#include <MacrosCodegen.hpp>
#include <glm/glm.hpp>
#include <vector>
class SimpleGeometryObject : public GameObject {
BRUSSEL_CLASS()
private:
RenderObject mRenderObject;
glm::vec3 mSize;
RgbaColor mXFaceColor;
RgbaColor mYFaceColor;
RgbaColor mZFaceColor;
mutable bool mNeedsRebuildMesh;
public:
SimpleGeometryObject(GameWorld* world);
glm::vec3 GetSize() const { return mSize; }
void SetSize(glm::vec3 size);
RgbaColor GetXFaceColor() const { return mXFaceColor; }
void SetXFaceColor(RgbaColor color);
RgbaColor GetYFaceColor() const { return mYFaceColor; }
void SetYFaceColor(RgbaColor color);
RgbaColor GetZFaceColor() const { return mZFaceColor; }
void SetZFaceColor(RgbaColor color);
virtual std::span<const RenderObject> GetRenderObjects() const override;
};
class BuildingObject : public GameObject {
BRUSSEL_CLASS()
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;
};
|