#include "ObjConverter.h" //#include "PlyConverter.h" #include #include using namespace std; int main(int argc, char* argv[]) { int returnCode = 0; //ObjConverter2 converter; ObjConverter converter; //PlyConverter converter; cout << "converting obj to dem format" << endl; #if 1 /*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 = 3; vector filenames; const string base(model_path + argv[1]); char filename[100]; for (int i = 0; i < numFiles; ++ i) { sprintf(filename, "%s%s%d%s", base.c_str(), ".b", i, ".obj"); filenames.push_back(filename); } //cout << "press any key" << std::cin.get(); 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; }