Line | |
---|
1 | #ifndef _VBOFORMATCONVERTER_H
|
---|
2 | #define _VBOFORMATCONVERTER_H
|
---|
3 |
|
---|
4 | #include "SimpleVec.h"
|
---|
5 | #include <string>
|
---|
6 | #include <vector>
|
---|
7 |
|
---|
8 |
|
---|
9 | typedef std::vector<SimpleVec> VertexArray;
|
---|
10 | typedef std::pair<float, float> Texcoord;
|
---|
11 |
|
---|
12 | class ogzstream;
|
---|
13 |
|
---|
14 | /** Converts obj format into objects readable by our format
|
---|
15 | */
|
---|
16 | class VboFormatConverter
|
---|
17 | {
|
---|
18 | public:
|
---|
19 |
|
---|
20 | VboFormatConverter();
|
---|
21 |
|
---|
22 | bool Convert(const std::string &inputFilename,
|
---|
23 | const std::string &outputFilename);
|
---|
24 | //const std::string textureFilename) const;
|
---|
25 |
|
---|
26 | ~VboFormatConverter();
|
---|
27 |
|
---|
28 | protected:
|
---|
29 |
|
---|
30 | struct Geometry
|
---|
31 | {
|
---|
32 | SimpleVec *mVertices;
|
---|
33 | SimpleVec *mNormals;
|
---|
34 | SimpleVec *mTangents;
|
---|
35 | Texcoord *mTexcoords;
|
---|
36 |
|
---|
37 | int mVertexCount;
|
---|
38 | int mTexcoordCount;
|
---|
39 | };
|
---|
40 |
|
---|
41 | void WriteGeometry(ogzstream &str, Geometry *geom);
|
---|
42 |
|
---|
43 | bool ReadFile(const std::string &inputFilename);
|
---|
44 | bool WriteFile(const std::string &outputFilename);
|
---|
45 |
|
---|
46 |
|
---|
47 | std::vector<Geometry *> mGeometry;
|
---|
48 |
|
---|
49 | int mNumShapes;
|
---|
50 | };
|
---|
51 |
|
---|
52 |
|
---|
53 |
|
---|
54 | #endif
|
---|
Note: See
TracBrowser
for help on using the repository browser.