// // Created by sebastian on 08.02.26. // #include "AssetManager.h" #include #include #include "../loader/OBJLoader.h" std::shared_ptr AssetManager::loadModel(const std::string &name, const std::string &objPath, const std::string &texturePath, Loader &loader) { if (models.contains(name)) { return models[name]; } auto model = OBJLoader::loadModel(objPath, texturePath, loader); models[name] = model; return model; } std::shared_ptr AssetManager::getModel(const std::string &name) { assert(models.contains(name) && "Model not found!"); return models.at(name); } void AssetManager::insertGeneratedModel(const std::string &name, std::shared_ptr model) { assert(!models.contains(name) && "Model already exists!"); models[name] = std::move(model); }