#pragma once #include "mesh.h" #include "simpleengine/gfx/texture.h" #include #include #include //#include namespace simpleengine::gfx { /** * @brief A Model is a group of Meshes read from the 3D model file. * * The engine uses assimp, so all formats that it supports can be found here: * https://github.com/assimp/assimp/blob/master/doc/Fileformats.md * */ class Model : public simpleengine::Transformable { protected: std::string model_directory; // May be needed public: std::vector meshes; Model(std::string file_path); void load_model(std::string path); void process_node(std::unordered_map>>& processed_textures, aiNode* node, const aiScene* scene); gfx::Mesh process_mesh(std::unordered_map>>& processed_textures, aiMesh* mesh, const aiScene* scene); std::unordered_map> load_all_textures(aiMaterial* material); std::vector> load_material_texture(std::unordered_map>>& processed_textures, aiMaterial* material, aiTextureType type); }; }