source: GTP/trunk/App/Demos/Vis/FriendlyCulling/Converter/main.cpp @ 3262

Revision 3262, 1.1 KB checked in by mattausch, 15 years ago (diff)

working on pompeii loading. fixed bug in obj conversion

Line 
1#include "ObjConverter2.h"
2#include <iostream>
3#include <time.h>
4
5using namespace std;
6
7
8int main(int argc, char* argv[])
9{
10        int returnCode = 0;
11
12        ObjConverter2 converter;
13
14        cout << "converting obj to dem format" << endl;
15#if 0   
16        if (!converter.LoadMaterials(model_path + argv[3]))
17        {
18                cerr << "loading materials failed" << endl;
19
20                std::cin.get();
21                exit(0);
22        }
23
24        if (!converter.Convert(model_path + argv[1], model_path + argv[2]))
25        {
26                cerr << "conversion failed" << endl;
27
28                std::cin.get();
29                exit(0);
30        }
31#else
32       
33        //const int numFiles = 879;
34        const int numFiles = 300;
35
36        vector<string> filenames;
37        const string base(model_path + argv[1]);
38
39        for (int i = 0; i < numFiles; ++ i)
40        {
41                char filename[100];
42                sprintf(filename, "%s%s%d%s", base.c_str(), ".b", i, ".obj");
43                filenames.push_back(filename);
44        }
45
46        if (!converter.Convert2(filenames, model_path + argv[2]))
47        {
48                cerr << "conversion failed" << endl;
49
50                std::cin.get();
51                exit(0);
52        }
53#endif
54
55        cout << "conversion successful" << endl;
56        //cout << "press any key" << std::cin.get();
57
58        return 0;
59}
60
Note: See TracBrowser for help on using the repository browser.