Ignore:
Timestamp:
01/09/09 19:50:56 (15 years ago)
Author:
mattausch
Message:

worked on powerplant loading

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/Converter/main.cpp

    r3247 r3261  
    1 #include "ObjConverter.h" 
     1#include "ObjConverter2.h" 
    22#include <iostream> 
    33#include <time.h> 
     
    55using namespace std; 
    66 
    7 static string model_path("data/city/model/"); 
    87 
    98int main(int argc, char* argv[]) 
     
    1110        int returnCode = 0; 
    1211 
    13         ObjConverter converter; 
     12        ObjConverter2 converter; 
    1413 
    1514        cout << "converting obj to dem format" << endl; 
    16          
     15#if 0    
    1716        if (!converter.LoadMaterials(model_path + argv[3])) 
    1817        { 
     
    3029                exit(0); 
    3130        } 
     31#else 
     32         
     33        //const int numFiles = 879; 
     34        const int numFiles = 100; 
     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 
    3254 
    3355        cout << "conversion successful" << endl; 
    34         cout << "press any key" << std::cin.get(); 
     56        //cout << "press any key" << std::cin.get(); 
    3557 
    3658        return 0; 
Note: See TracChangeset for help on using the changeset viewer.