#include "ObjConverter2.h" #include #include using namespace std; int main(int argc, char* argv[]) { int returnCode = 0; ObjConverter2 converter; cout << "converting obj to dem format" << endl; #if 0 if (!converter.LoadMaterials(model_path + argv[3])) { cerr << "loading materials failed" << endl; std::cin.get(); exit(0); } if (!converter.Convert(model_path + argv[1], model_path + argv[2])) { cerr << "conversion failed" << endl; std::cin.get(); exit(0); } #else //const int numFiles = 879; const int numFiles = 300; vector filenames; const string base(model_path + argv[1]); for (int i = 0; i < numFiles; ++ i) { char filename[100]; sprintf(filename, "%s%s%d%s", base.c_str(), ".b", i, ".obj"); filenames.push_back(filename); } if (!converter.Convert2(filenames, model_path + argv[2])) { cerr << "conversion failed" << endl; std::cin.get(); exit(0); } #endif cout << "conversion successful" << endl; //cout << "press any key" << std::cin.get(); return 0; }