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

Revision 3275, 1.1 KB checked in by mattausch, 15 years ago (diff)
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 = 3;
35
36        vector<string> filenames;
37        const string base(model_path + argv[1]);
38
39        char filename[100];
40
41        for (int i = 0; i < numFiles; ++ i)
42        {
43                sprintf(filename, "%s%s%d%s", base.c_str(), ".b", i, ".obj");
44                filenames.push_back(filename);
45        }
46
47        //cout << "press any key" << std::cin.get();
48
49        if (!converter.Convert2(filenames, model_path + argv[2]))
50        {
51                cerr << "conversion failed" << endl;
52
53                std::cin.get();
54                exit(0);
55        }
56#endif
57
58        cout << "conversion successful" << endl;
59        //cout << "press any key" << std::cin.get();
60
61        return 0;
62}
63
Note: See TracBrowser for help on using the repository browser.