#pragma once #include #include #include #include "model.hpp" class Mesh : public Asset { public: Mesh(int index) { m_index = index; } void Load(Renderer* renderer) override; void Unload(Renderer* renderer) override; std::string GetName() override { return m_parentAsset->GetName() + " (" + std::to_string(m_index) + ")"; } std::type_index GetType() override { return typeid(Mesh); } int GetIndex() { return m_index; } std::vector& GetVertices() { return static_cast(m_parentAsset)->submeshes[m_index].vertices; } std::vector& GetIndices() { return static_cast(m_parentAsset)->submeshes[m_index].indices; } private: int m_index = 0; };