#pragma once
#include "asset_render.h"
#include "mesh.h"
#include "material.h"
class aiNode;
class aiMesh;
class aiScene;
namespace engineapi {
	class Model : public Asset {
	protected:
		vector<Mesh*> mMeshes;
		Material*	mMaterial;
	public:
		using Asset::Asset;
		void BeginLoad()override;
		void ProcessNode(const aiNode* pNode, const aiScene* pScene);
		Mesh* ProcessMesh(const aiMesh* mesh);
		vector<Mesh*>& GetMeshs() {
			return mMeshes;
		}
		void SetMaterial(Material* material) {
			mMaterial = material;
		}
		void Use();
	};
};