#pragma once

#include "BasicMaterial.h"
#include "Transform.h"

#include <string>

class SceneItem
{
public:

    enum class Type
    {
        UNSET,
        MODEL,
        TEXT
    };

    SceneItem();

    virtual ~SceneItem();

    const Material* getMaterial() const;

    const BasicMaterial& getSolidMaterial() const;

    const Transform& getTransform() const;

    virtual Type getType() const = 0;

    const std::string& getName() const;

    bool isVisible() const;

    void setIsVisible(bool isVisible);

    void setName(const std::string& name);

    void updateSolidMaterial(const BasicMaterial& material);

    void updateTransform(const Transform& transform);

protected:
    Transform mTransform;

    BasicMaterial mSolidMaterial;
    std::unique_ptr<Material> mMaterial;

    bool mMaterialIsDirty{true};

    bool mTransformIsDirty{true};
    bool mIsVisible{true};

    std::string mName;
};
