summaryrefslogtreecommitdiff
path: root/MapTool/t3d/objreader.h
blob: 6e518e8e67f9fce1bac5cd28357f4664a7aa2621 (plain)
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
#ifndef T3DOBJREADER_H
#define T3DOBJREADER_H

#include <QtCore/QList>
#include <QtCore/QVector>
#include <QtCore/QString>
#include <QtCore/QStringList>
#include <QtCore/QHash>
#include "model.h"

class T3DObjReader {
private:
	T3DModel *m_model;
	T3DMesh *m_currentMesh;

	QVector<Vec> known_vertices;
	QVector<Vec2> known_texcoords;
	QVector<Vec> known_normals;

public:
	T3DObjReader(T3DModel &model);

	void parseLine(QString line);

	T3DModel *model() { return m_model; }

	QHash<QString, T3DMaterial *> materials;
};

#endif // T3DOBJREADER_H