Changeset 3268 for GTP/trunk/App/Demos/Vis/FriendlyCulling/Converter
- Timestamp:
- 01/11/09 22:54:05 (16 years ago)
- Location:
- GTP/trunk/App/Demos/Vis/FriendlyCulling/Converter
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/Converter/ObjConverter2.cpp
r3265 r3268 128 128 for (int j = 0; j < 3; ++ j) 129 129 { 130 if (tIndices[idx[j]] >= (int)texcoords.size())131 cerr << "error: texcoord indices exceed array size " << texcoords.size() << " " << tIndices[idx[j]] << endl;130 //if (tIndices[idx[j]] >= (int)texcoords.size()) 131 //cerr << "error: texcoord indices exceed array size " << texcoords.size() << " " << tIndices[idx[j]] << endl; 132 132 const int tidx = min((int)texcoords.size() - 1, tIndices[idx[j]]); 133 133 … … 240 240 vector<string>::const_iterator it, it_end = filenames.end(); 241 241 242 ofstream outstr("mydebug.log"); 243 242 244 for (it = filenames.begin(); it != it_end; ++ it) 243 245 { … … 245 247 246 248 cout << "\n==================\n loading file " << filename << endl; 249 250 outstr << "loading file: " << filename << endl; 251 outstr << flush; 247 252 248 253 if (!ReadFile(filename)) … … 253 258 } 254 259 255 cout << "\n*******************\n 260 cout << "\n*******************\nwriting file " << outputFilename << endl; 256 261 257 262 if (!WriteFile(outputFilename)) … … 385 390 { 386 391 cerr << "loading material library failed" << endl; 387 exit(0);392 return false; 388 393 } 389 394 } … … 538 543 } 539 544 545 ofile.close(); 546 540 547 return true; 541 548 } … … 545 552 { 546 553 FILE *file; 547 548 554 if ((file = fopen(matFileName.c_str(), "r")) == NULL) return false; 549 555 … … 610 616 } 611 617 618 fclose(file); 619 612 620 return true; 613 621 } -
GTP/trunk/App/Demos/Vis/FriendlyCulling/Converter/main.cpp
r3265 r3268 31 31 #else 32 32 33 //const int numFiles = 879;34 const int numFiles = 10;33 const int numFiles = 879; 34 //const int numFiles = 300; 35 35 36 36 vector<string> filenames; 37 37 const string base(model_path + argv[1]); 38 38 39 char filename[100]; 40 39 41 for (int i = 0; i < numFiles; ++ i) 40 42 { 41 char filename[100];42 43 sprintf(filename, "%s%s%d%s", base.c_str(), ".b", i, ".obj"); 43 44 filenames.push_back(filename); 44 45 } 46 47 //cout << "press any key" << std::cin.get(); 45 48 46 49 if (!converter.Convert2(filenames, model_path + argv[2]))
Note: See TracChangeset
for help on using the changeset viewer.