Changeset 2686 for GTP/trunk/Lib/Vis/Preprocessing/src/main.cpp
- Timestamp:
- 05/18/08 00:30:13 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/main.cpp
r2681 r2686 59 59 60 60 61 static string GetViewPointsListName(const string &filename) 62 { 63 string viewCellPointsFile; 64 65 char buff[200]; 66 Environment::GetSingleton()->GetStringValue("ViewCells.randomViewPointsList", buff); 67 68 string vpList(buff); 69 70 if (vpList == "") 71 { 72 // if not specified, take file that has same prefix as scene file 73 if (strstr(filename.c_str(), ".obj")) 74 viewCellPointsFile = ReplaceSuffix(filename, ".obj", ".vc"); 75 else if (strstr(filename.c_str(), ".dat")) 76 viewCellPointsFile = ReplaceSuffix(filename, ".dat", ".vc"); 77 else if (strstr(filename.c_str(), ".x3d")) 78 viewCellPointsFile = ReplaceSuffix(filename, ".x3d", ".vc"); 79 } 80 else 81 { 82 viewCellPointsFile = vpList; 83 } 84 85 return viewCellPointsFile; 86 } 87 61 88 62 89 void Cleanup() … … 240 267 cout << "view cells successfully loaded" << endl; 241 268 242 string viewCellPointsFile; 243 244 if (strstr(filename.c_str(), ".obj")) 245 viewCellPointsFile = ReplaceSuffix(filename, ".obj", ".vc"); 246 else if (strstr(filename.c_str(), ".dat")) 247 viewCellPointsFile = ReplaceSuffix(filename, ".dat", ".vc"); 248 else if (strstr(filename.c_str(), ".x3d")) 249 viewCellPointsFile = ReplaceSuffix(filename, ".x3d", ".vc"); 269 270 const string viewCellPointsFile = GetViewPointsListName(filename); 250 271 251 272 bool importRandomViewCells; 252 Environment::GetSingleton()->GetBoolValue("ViewCells.importRandomViewCells", 253 importRandomViewCells); 273 Environment::GetSingleton()->GetBoolValue("ViewCells.importRandomViewCells", importRandomViewCells); 254 274 255 275 if (importRandomViewCells) 256 276 { 257 cout << "importing random view cells" << endl; 277 cout << "importing random view points" << endl; 278 258 279 if (preprocessor->mViewCellsManager->ImportViewCellsList(viewCellPointsFile)) 259 280 cout << "successfully loaded " << viewCellPointsFile << endl; 260 281 else 261 cerr << "error: file << " << viewCellPointsFile << " not found , generating random view points!" << endl;282 cerr << "error: file << " << viewCellPointsFile << " not found" << endl; 262 283 } 263 284 … … 369 390 //rendererWidget->SetWindowTitle("Global Visualization"); 370 391 371 if ( 1) //not working with vbo392 if (0 && !rendererWidget->GetUseVbos()) // viewer not working with vbo 372 393 { 373 394 cout << "starting the qt viewer" << endl;
Note: See TracChangeset
for help on using the changeset viewer.