#pragma once

#include "SceneItem.h"
#include "Texture.h"

#include <vector>
#include <string>
#include <unordered_map>
#include <memory>

class AbstractMesh;
//class Texture;

class SceneModel : public SceneItem
{
public:
    SceneModel(std::unique_ptr<AbstractMesh> mesh);

    AbstractMesh* getMesh() const;

    void updateMesh(std::unique_ptr<AbstractMesh> mesh);
    void updateMesh(AbstractMesh* mesh);

    void setShowOutline(bool showOutline)
    {
        mShowOutline = showOutline;
    }

    bool getShowOutline() const
    {
        return mShowOutline;
    }

    Type getType() const override;

private:

    AbstractMesh* mRawMesh{nullptr};
    std::unique_ptr<AbstractMesh> mMesh;
    std::unique_ptr<Texture> mColorMap;

    bool mMeshIsDirty{true};
    bool mColorMapIsDirty{true};
    bool mShowOutline{false};
};
