-
Notifications
You must be signed in to change notification settings - Fork 0
/
MeshLoader.h
34 lines (27 loc) · 664 Bytes
/
MeshLoader.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
#pragma once
#ifndef _MeshLoader
#define _MeshLoader
#include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <regex>
#include "GL\freeglut.h"
#ifndef _hStructs
#include "Structures.h"
#endif
using namespace std;
class MeshLoader
{
public:
Mesh* Load(char* path);
static MeshLoader* Instance();
private:
vector<string> whiteSpaceRegex(string line);
void LoadVertices(ifstream& inFile, Mesh& mesh);
void LoadNormals(ifstream& inFile, Mesh& mesh);
void LoadUVs(ifstream& inFile, Mesh& mesh);
void LoadIndices(ifstream& inFile, Mesh& mesh);
static MeshLoader* m_Instance;
};
#endif // !_MeshLoader