-
Notifications
You must be signed in to change notification settings - Fork 0
/
model.h
50 lines (42 loc) · 982 Bytes
/
model.h
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#pragma once
// #include <iostream> // including iostream breaks the build somehow, what is going on?
#include <string>
#include <vector>
#include <assimp/Importer.hpp>
#include <assimp/scene.h>
#include <assimp/postprocess.h>
#include "typedefs.h"
#include "texture.h"
struct vertex
{
glm::vec3 Positions;
glm::vec3 Normals;
glm::vec2 TextureCoordinates;
};
struct material
{
std::string Name; // Material Name
glm::vec3 AmbientColor; // Ka
glm::vec3 DiffuseColor; // Kd
glm::vec3 SpecularColor; // Ks
f32 Shininess; // Ns
f32 RefractionIndex; // Ni, also called optical density
i32 IlluminationModel; // illum
};
struct mesh
{
u32 VAO;
u32 VBO;
u32 EBO;
std::string Name;
std::vector<vertex> Attributes;
std::vector<u32> Indices;
material Material;
std::vector<texture> Textures;
};
struct model
{
std::string Name;
std::vector<mesh> Meshes;
std::string Path;
};