-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModel.h
More file actions
28 lines (23 loc) · 694 Bytes
/
Copy pathModel.h
File metadata and controls
28 lines (23 loc) · 694 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef MODEL_H
#define MODEL_H
#include <assimp/Importer.hpp>
#include <assimp/scene.h>
#include <assimp/postprocess.h>
#include <iostream>
#include <vector>
#include "Mesh.h"
#include "Shader.h"
class Model {
public:
Model(std::string path);
void draw(const Shader &shader) const;
private:
std::vector<Mesh> m_meshes;
std::string m_directory;
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);
std::vector<Texture> textures_loaded;
};
unsigned int TextureFromFile(const char* path, const std::string& directory);
#endif