43 lines
816 B
C++
43 lines
816 B
C++
#pragma once
|
|
|
|
#include "TextData.h"
|
|
|
|
#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;
|
|
|
|
const std::vector<TextData>& getTextData() const;
|
|
|
|
private:
|
|
void processRectangleNode(RectangleNode* node);
|
|
|
|
std::vector<VisualLayer*> mLayers;
|
|
std::vector<TriMesh*> mWorkingMeshs;
|
|
std::vector<Image<unsigned char>* > mTextures;
|
|
|
|
std::vector<TextData> mTextData;
|
|
};
|