stuff-from-scratch/src/visual_elements/Scene.h
2022-11-15 09:32:28 +00:00

37 lines
700 B
C++

#pragma once
#include <vector>
#include <memory>
class VisualLayer;
class TriMesh;
class FontsManager;
class RectangleNode;
template <typename T>
class Image;
class Scene
{
public:
Scene() = default;
void syncLayers(const std::vector<VisualLayer*>& layers);
void update(FontsManager* fontsManager, Image<unsigned char>* image = nullptr);
unsigned getNumMeshes() const;
TriMesh* getMesh(std::size_t idx) const;
Image<unsigned char>* getTexture(std::size_t idx) const;
private:
void processRectangleNode(RectangleNode* node);
std::vector<TriMesh*> mWorkingMeshs;
std::vector<VisualLayer*> mLayers;
std::vector<Image<unsigned char>* > mTextures;
};