#pragma once

#include "TextData.h"
#include "SceneInfo.h"
#include "Color.h"
#include "Transform.h"

#include <vector>
#include <memory>

class RootNode;
class AbstractVisualNode;
class SceneItem;

class Scene
{
public:
    Scene();

    ~Scene();

    void addNode(AbstractVisualNode* node);

    const std::vector<SceneItem*>& getItems() const;

    const Color& getBackgroundColor() const;

    bool isEmpty() const;

    bool shouldShowMeshOutline() const;

    void setBackgroundColor(const Color&);

    void setShowMeshOutline(bool shouldShow);

    void setFontsManager(FontsManager* fontsManager);

    void setSupportsGeometryPrimitives(bool supports);

    void update();
private:
    void updateNode(AbstractVisualNode* node, const Transform& transform);

    Color mBackGroundColor;
    std::unique_ptr<RootNode> mRootNode;
    std::vector<SceneItem*> mSceneItems;
    std::unique_ptr<SceneInfo> mSceneInfo;
};
