forked from imagina-gmin317-2015/tp7
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gameobject.h
56 lines (39 loc) · 997 Bytes
/
gameobject.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
48
49
50
51
52
53
54
55
56
#ifndef GAMEOBJECT_H
#define GAMEOBJECT_H
#include <QVector3D>
#include <QString>
#include <QFile>
enum Format { PLY, STL, OBJ };
class GameObject
{
public:
GameObject();
GameObject(QVector3D pos, QVector3D rot, QVector3D _scale);
GameObject(QVector3D pos, QVector3D rot, QVector3D _scale, QString _localPath);
GameObject(QVector3D pos, QVector3D rot, QVector3D _scale, QString _localPath, int L);
void setLOD(int l, QString name);
void open(QString localPath);
void display();
private:
void openPLY(QString localPath);
void openSTL(QString localPath);
void openOBJ(QString localPath);
void displayPLY();
void displaySTL();
void displayOBJ();
public:
QVector3D position;
QVector3D scale;
QVector3D rotation;
QString localPath;
Format format;
QVector3D* vertex;
int nb_vertex;
QVector3D* normals;
QVector3D* index;
int nb_ind;
int LOD;
signals:
public slots:
};
#endif // GAMEOBJECT_H