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

30 lines
523 B
C
Raw Normal View History

2022-11-14 11:19:51 +00:00
#pragma once
2022-11-15 15:50:36 +00:00
#include "TextData.h"
2022-11-14 11:19:51 +00:00
#include <vector>
2022-11-14 13:07:11 +00:00
#include <memory>
2022-11-14 11:19:51 +00:00
2022-11-16 15:06:08 +00:00
class RootNode;
class AbstractVisualNode;
class SceneItem;
2022-11-15 09:32:28 +00:00
class FontsManager;
2022-11-14 13:07:11 +00:00
2022-11-14 11:19:51 +00:00
class Scene
{
public:
2022-11-16 15:06:08 +00:00
Scene();
2022-11-15 15:50:36 +00:00
2022-11-16 15:06:08 +00:00
void update(FontsManager* fontsManager);
2022-11-14 13:07:11 +00:00
2022-11-16 15:06:08 +00:00
unsigned getNumItems() const;
2022-11-14 13:07:11 +00:00
2022-11-16 15:06:08 +00:00
SceneItem* getItem(std::size_t idx) const;
2022-11-14 13:07:11 +00:00
2022-11-16 15:06:08 +00:00
RootNode* getRootNode() const;
2022-11-15 15:50:36 +00:00
private:
2022-11-16 15:06:08 +00:00
void updateNode(AbstractVisualNode* node, FontsManager* fontsManager);
std::unique_ptr<RootNode> mRootNode;
std::vector<SceneItem*> mSceneItems;
2022-11-14 11:19:51 +00:00
};