stuff-from-scratch/src/visual_elements/Scene.h

38 lines
700 B
C
Raw Normal View History

2022-11-14 11:19:51 +00:00
#pragma once
#include <vector>
2022-11-14 13:07:11 +00:00
#include <memory>
2022-11-14 11:19:51 +00:00
class VisualLayer;
2022-11-14 13:07:11 +00:00
class TriMesh;
2022-11-15 09:32:28 +00:00
class FontsManager;
2022-11-14 13:07:11 +00:00
class RectangleNode;
template <typename T>
class Image;
2022-11-14 11:19:51 +00:00
class Scene
{
public:
Scene() = default;
2022-11-14 13:07:11 +00:00
void syncLayers(const std::vector<VisualLayer*>& layers);
2022-11-15 09:32:28 +00:00
void update(FontsManager* fontsManager, Image<unsigned char>* image = nullptr);
2022-11-14 13:07:11 +00:00
unsigned getNumMeshes() const;
TriMesh* getMesh(std::size_t idx) const;
2022-11-14 11:19:51 +00:00
2022-11-15 09:32:28 +00:00
Image<unsigned char>* getTexture(std::size_t idx) const;
2022-11-14 11:19:51 +00:00
private:
2022-11-14 13:07:11 +00:00
void processRectangleNode(RectangleNode* node);
std::vector<TriMesh*> mWorkingMeshs;
2022-11-14 11:19:51 +00:00
std::vector<VisualLayer*> mLayers;
2022-11-15 09:32:28 +00:00
std::vector<Image<unsigned char>* > mTextures;
2022-11-14 11:19:51 +00:00
};