mirror of
https://github.com/Linloir/SceneEditor.git
synced 2025-12-17 15:38:11 +08:00
28 lines
621 B
C++
28 lines
621 B
C++
#pragma once
|
|
|
|
#include <vector>
|
|
#include <string>
|
|
#include <Assimp/Importer.hpp>
|
|
#include <Assimp/scene.h>
|
|
#include <Assimp/postprocess.h>
|
|
|
|
#include "mesh.h"
|
|
#include "shader.h"
|
|
|
|
class Model {
|
|
private:
|
|
std::vector<Mesh*> _meshes;
|
|
std::string _directory;
|
|
|
|
public:
|
|
Model(std::string path);
|
|
|
|
private:
|
|
void loadModel(std::string path);
|
|
void processNode(aiNode* node, const aiScene* scene);
|
|
Mesh* processMesh(aiMesh* mesh, const aiScene* scene);
|
|
std::vector<Texture> loadMaterialTextures(aiMaterial* mat, aiTextureType type, std::string typeName);
|
|
|
|
public:
|
|
void render(ShaderProgram shader);
|
|
}; |