#pragma once #include #include #include "src/Rendering/Mesh/Mesh.h" #include "src/Resource/Serializable.h" #include "assimp/Importer.hpp" #include #include #include namespace Nuake { struct MeshComponent { std::string ModelPath; MeshComponent() { //loadModel(path); } void LoadModel(); void Draw(); std::vector> meshes; std::string directory; void ProcessNode(aiNode* node, const aiScene* scene); Ref ProcessMesh(aiMesh* mesh, const aiScene* scene); std::vector LoadMaterialTextures(aiMaterial* mat, aiTextureType type); json Serialize() { BEGIN_SERIALIZE(); SERIALIZE_VAL(ModelPath); END_SERIALIZE(); } bool Deserialize(const std::string str) { BEGIN_DESERIALIZE(); ModelPath = j["ModelPath"]; LoadModel(); return true; } }; }