-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathObject.hpp
52 lines (30 loc) · 1.06 KB
/
Object.hpp
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
// Object Class
// Damien MATTEI
/* this class is for loading an object in memory vertex and normal are stored at the same index of
* the .obj file allowing consistency for the object but possible redundancy of same vertex and normal
* not shared by different objects. For this reason program use a general vertex and normal storage
* and faces in program are made of list where elements point to unique vertexs and normals */
#ifndef OBJECT_HPP
#define OBJECT_HPP
#include "Face3D.hpp"
using namespace std;
#include <iostream>
#include <vector>
#include <list>
#include "debug.hpp"
template <class T> class Object {
public:
// data
// the name of file
string filename;
std::vector < Point3D<T> *> vertexVector;
std::vector < Vector3D<T> *> normalVector;
std::list < Face3D<T> *> faceList; // todo: verify it is pointer or not
Object();
Object(string);
~Object();
void storeVertex(Point3D<T> &);
void storeVector(Vector3D<T> &);
};
template <class T> ostream& operator<< (ostream &, const Object<T> &);
#endif /* OBJECT_HPP */