-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodel.h
More file actions
36 lines (30 loc) · 824 Bytes
/
model.h
File metadata and controls
36 lines (30 loc) · 824 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
29
30
31
32
33
34
35
36
#ifndef MODEL_H
#define MODEL_H
#include <vector>
#include "geometry.h"
#include "tgaimage.h"
class Model
{
private:
std::vector<vec3f> verts;
std::vector<vec3f> text_verts;
std::vector<vec3f> norms;
std::vector<std::vector<int>> faces;
TGAImage diffusemap = {};
TGAImage specularmap = {};
TGAImage normalmap = {};
public:
Model(const char* fileName);
~Model();
int num_verts();
int num_faces();
vec2f uv(int iface, int nvert);
vec3f vert(int i);
vec3f text_vert(int i);
vec3f norm (int iface, int nvert);
std::vector<int> face(int i);
TGAColor diffuse(vec2f uv);
TGAColor normal_Map(vec2f uv);
TGAColor specular(vec2f uv);
};
#endif