Changeset 1627 for GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp
- Timestamp:
- 10/16/06 18:59:01 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp
r1626 r1627 470 470 Environment::GetSingleton()->GetStringValue("ViewCells.geometryFilename", vcGeomFilename); 471 471 472 if ( mViewCellsManager->GetType() == ViewCellsManager::BSP)473 { 474 if ( !mViewCellsManager->LoadViewCellsGeometry(vcGeomFilename, extrudeBaseTriangles))472 if (loadVcGeometry) 473 { 474 if (mViewCellsManager->GetType() == ViewCellsManager::BSP) 475 475 { 476 cerr << "loading view cells geometry failed" << endl; 476 if (!mViewCellsManager->LoadViewCellsGeometry(vcGeomFilename, extrudeBaseTriangles)) 477 { 478 cerr << "loading view cells geometry failed" << endl; 479 } 477 480 } 478 }479 else480 {481 cerr << "loading view cells geometry is not implemented for this manager" << endl;481 else 482 { 483 cerr << "loading view cells geometry is not implemented for this manager" << endl; 484 } 482 485 } 483 486 } … … 513 516 bool Preprocessor::ConstructViewCells() 514 517 { 515 516 517 518 519 520 521 522 518 // construct view cells using it's own set of samples 519 mViewCellsManager->Construct(this); 520 521 // visualizations and statistics 522 Debug << "finished view cells:" << endl; 523 mViewCellsManager->PrintStatistics(Debug); 524 525 return true; 523 526 } 524 527 … … 815 818 816 819 817 bool Preprocessor::InitRayCast(const string externKdTree, const string intern kdtree)820 bool Preprocessor::InitRayCast(const string externKdTree, const string internKdTree) 818 821 { 819 822 bool loadKdTree = true; … … 830 833 else 831 834 { 832 constlong startTime = GetTime();833 cout << "loading kd tree file " << intern kdtree << " ... ";834 835 if (!LoadKdTree(intern kdtree))836 { 837 cout << "error loading kd tree with filename " << intern kdtree << ", rebuilding it instead ..." << endl;835 long startTime = GetTime(); 836 cout << "loading kd tree file " << internKdTree << " ... "; 837 838 if (!LoadKdTree(internKdTree)) 839 { 840 cout << "error loading kd tree with filename " << internKdTree << ", rebuilding it instead ..." << endl; 838 841 839 842 BuildKdTree(); … … 852 855 delete exporter; 853 856 } 857 } 858 859 // export kd tree? 860 startTime = GetTime(); 861 cout << "exporting kd tree ... "; 862 863 if (!ExportKdTree(internKdTree)) 864 { 865 cout << " error exporting kd tree with filename " << internKdTree << endl; 866 } 867 else 868 { 869 cout << "finished in " << TimeDiff(startTime, GetTime()) * 1e-3 << " secs" << endl; 854 870 } 855 871 } … … 909 925 } 910 926 if (i % 10000 == 0) 911 cout<<"\r"<<i<<"/"<< rays.size()<<"\r";927 cout<<"\r"<<i<<"/"<<(int)rays.size()<<"\r"; 912 928 } 913 929 cout<<endl;
Note: See TracChangeset
for help on using the changeset viewer.