-
Notifications
You must be signed in to change notification settings - Fork 0
/
objParser.h
47 lines (41 loc) · 935 Bytes
/
objParser.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
#ifndef OBJPARSER_H
#define OBJPARSER_H
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <vector>
#include <map>
#include <cstdio>
#include <memory>
#include <boost/shared_ptr.hpp>
#include <math.h>
#include <cfloat>
#include "halfEdge.h"
using namespace std;
extern map<Vertex *, int> indexMap;
extern vector<Vertex *> vertexList;
extern vector<face *> faceList;
extern map<pair<int, int>, h_edge *> edgeList;
extern int meshImportFlag;
extern map<int, int> proxyCount;
extern std::map<face *, GLVector*> faceNormalMap;
extern std::map<Vertex *, GLVector*> vertexNormalMap;
extern void calculateVertexNormal();
extern void calculateFaceNormal();
GLVector* findVertexNormal(Vertex* );
/**
* for reading .obj file.
*
* @param name of file
* @return void
*/
void loadMesh(string);
/**
* For saving .obj file.
*
* @param filename
* @return void
*/
void saveMesh();
#endif