aboutsummaryrefslogtreecommitdiff
path: root/src/ObjModel.h
blob: 5ceed26d6d220c7641284795ef305f44ebeadff7 (plain) (blame)
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
#include"Vertice.h"
#include"Bitmap.h"
#include<vector>
#include<string>
#include<sstream>
#include<fstream>
#include<exception>
#include<chrono>

struct Triangle {
	int p[3][3];
};

struct Texture_Coordinates {
	float u, v;
};

class ObjModel
{
public:
	std::vector<Vertice> vertices;
	std::vector<Texture_Coordinates> uvcoo;
	std::vector<Vector4f> normals;
	std::vector<Triangle> faces;
  std::chrono::duration<double> loadingTime;
	ObjModel();
	ObjModel(std::string fileName);
	ObjModel(const ObjModel& a);
	ObjModel multiplyMatrix(Matrix4f& a);
	void divideW();
	void screenspace(int width, int height);
};