// // Created by sebastian on 08.02.26. // #ifndef MODELCOMPONENT_H #define MODELCOMPONENT_H #include #include #include "Component.h" #include "../../layer/entities/ModelStage.h" #include "../../renderer/model/TexturedModel.h" class ModelComponent: public Component { public: ModelComponent(const std::vector& stages) : stages(stages) {}; ModelComponent(std::shared_ptr model) { activeModel = std::move(model); } void updateStage() { for (const auto& stage : stages) { if (stage.isActive()) { activeModel = stage.model; return; } } } [[nodiscard]] std::shared_ptr getActiveModel() const { return activeModel; } private: std::vector stages; std::shared_ptr activeModel; }; #endif //MODELCOMPONENT_H