#pragma once #include #include #include #include #include "modelimporter.hpp" class Model : public Asset { public: Model(const std::string& path) { m_filepath = path; } void Load(Renderer*) override { ImportedModel imported = ModelImporter::Import(m_filepath); submeshes = imported.submeshes; submaterials = imported.submaterials; m_loaded = true; } void Unload(Renderer*) override { submeshes.clear(); submaterials.clear(); m_loaded = false; } std::string GetName() override { return Utility::GetFilename(m_filepath); } std::string GetPath() override { return m_filepath; } std::type_index GetType() override { return typeid(Model); } std::vector submeshes; std::vector submaterials; private: std::string m_filepath; };