Ignore:
Timestamp:
10/16/06 18:59:01 (18 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp

    r1626 r1627  
    470470                Environment::GetSingleton()->GetStringValue("ViewCells.geometryFilename", vcGeomFilename); 
    471471                 
    472                 if (mViewCellsManager->GetType() == ViewCellsManager::BSP) 
    473                 { 
    474                         if (!mViewCellsManager->LoadViewCellsGeometry(vcGeomFilename, extrudeBaseTriangles)) 
     472                if (loadVcGeometry) 
     473                { 
     474                        if (mViewCellsManager->GetType() == ViewCellsManager::BSP) 
    475475                        { 
    476                                 cerr << "loading view cells geometry failed" << endl; 
     476                                if (!mViewCellsManager->LoadViewCellsGeometry(vcGeomFilename, extrudeBaseTriangles)) 
     477                                { 
     478                                        cerr << "loading view cells geometry failed" << endl; 
     479                                } 
    477480                        } 
    478                 } 
    479                 else 
    480                 { 
    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                        } 
    482485                } 
    483486        } 
     
    513516bool Preprocessor::ConstructViewCells() 
    514517{ 
    515   // construct view cells using it's own set of samples 
    516   mViewCellsManager->Construct(this); 
    517    
    518   // visualizations and statistics 
    519   Debug << "finished view cells:" << endl; 
    520   mViewCellsManager->PrintStatistics(Debug); 
    521    
    522   return true; 
     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; 
    523526} 
    524527 
     
    815818 
    816819 
    817 bool Preprocessor::InitRayCast(const string externKdTree, const string internkdtree) 
     820bool Preprocessor::InitRayCast(const string externKdTree, const string internKdTree) 
    818821{ 
    819822        bool loadKdTree = true; 
     
    830833        else 
    831834        { 
    832                 const long startTime = GetTime(); 
    833                 cout << "loading kd tree file " << internkdtree << " ... "; 
    834  
    835                 if (!LoadKdTree(internkdtree)) 
    836                 { 
    837                         cout << "error loading kd tree with filename " << internkdtree << ", 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; 
    838841 
    839842                        BuildKdTree(); 
     
    852855                                delete exporter; 
    853856                        } 
     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; 
    854870                } 
    855871        } 
     
    909925                  } 
    910926                if (i % 10000 == 0) 
    911                   cout<<"\r"<<i<<"/"<<rays.size()<<"\r"; 
     927                  cout<<"\r"<<i<<"/"<<(int)rays.size()<<"\r"; 
    912928        } 
    913929        cout<<endl; 
Note: See TracChangeset for help on using the changeset viewer.