Changeset 2647 for GTP/trunk/Lib


Ignore:
Timestamp:
03/18/08 16:29:14 (16 years ago)
Author:
bittner
Message:
 
Location:
GTP/trunk/Lib/Vis/Preprocessing/src
Files:
6 edited

Legend:

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

    r2606 r2647  
    16921692        RegisterOption("ViewCells.importRandomViewCells", 
    16931693                                   optBool,  
    1694                                    "view_cells_import_random_viewcells=",  
     1694                                   "view_cells_import_random_viewcells",  
    16951695                                   "false"); 
    16961696 
    16971697        RegisterOption("ViewCells.exportRandomViewCells", 
    16981698                                   optBool,  
    1699                                    "view_cells_export_random_viewcells=",  
     1699                                   "view_cells_export_random_viewcells",  
    17001700                                   "false"); 
    17011701 
  • GTP/trunk/Lib/Vis/Preprocessing/src/GlRenderer.cpp

    r2643 r2647  
    138138                                                                                                 mPvsStatFrames); 
    139139         
     140        Debug<<"Info: will evaluate pixel error with "<<mPvsStatFrames<<" samples"<<endl; 
    140141         
    141142        mPvsErrorBuffer.resize(mPvsStatFrames); 
     
    15711572   
    15721573  glFinish(); 
     1574 
     1575  static bool first = true; 
     1576  if (first) { 
     1577         
     1578 
     1579        bool exportRandomViewCells; 
     1580        Environment::GetSingleton()->GetBoolValue("ViewCells.exportRandomViewCells", 
     1581                                                                                          exportRandomViewCells); 
     1582         
     1583        if (0 && exportRandomViewCells) 
     1584          { 
     1585                char buff[512]; 
     1586                Environment::GetSingleton()->GetStringValue("Scene.filename", buff); 
     1587                string filename(buff); 
     1588 
     1589                string viewCellPointsFile; 
     1590                 
     1591                if (strstr(filename.c_str(), ".obj")) 
     1592                  viewCellPointsFile = ReplaceSuffix(filename, ".obj", ".vc"); 
     1593                else if (strstr(filename.c_str(), ".dat")) 
     1594                  viewCellPointsFile = ReplaceSuffix(filename, ".dat", ".vc"); 
     1595                else if (strstr(filename.c_str(), ".x3d")) 
     1596                  viewCellPointsFile = ReplaceSuffix(filename, ".x3d", ".vc"); 
     1597                 
     1598                 
     1599                cout << "exporting random view cells" << endl; 
     1600                preprocessor->mViewCellsManager->ExportRandomViewCells(viewCellPointsFile); 
     1601                cout << "finished" << endl; 
     1602          } 
     1603        first = false; 
     1604  } 
     1605 
    15731606  cout<<endl<<flush; 
    15741607} 
     
    16301663   
    16311664  glFinish(); 
     1665 
     1666   
    16321667  cout << endl << flush; 
    16331668} 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp

    r2645 r2647  
    15541554                  viewPoints.push_back(*rit); 
    15551555          } 
    1556  
     1556           
    15571557          if (viewPoints.size() != renderer->mPvsErrorBuffer.size()) { 
    15581558                renderer->mPvsErrorBuffer.resize(viewPoints.size()); 
     
    15631563        } else 
    15641564          renderer->EvalPvsStat(); 
    1565  
     1565         
    15661566        mStats << 
    15671567          "#AvgPvsRenderError\n" <<renderer->mPvsStat.GetAvgError()<<endl<< 
  • GTP/trunk/Lib/Vis/Preprocessing/src/RandomViewCellsHandler.cpp

    r2598 r2647  
    214214{ 
    215215        // export ten view cells with 100 random view points inside each 
    216         const int numViewCells = 100; 
    217         const int numViewPoints = 10; 
     216  const int numViewCells = 100; 
     217  //  const int numViewPoints = 10; 
     218  const int numViewPoints = 100; 
    218219 
    219220        GenerateRandomViewCells(mViewCellPointsList, numViewCells, numViewPoints); 
  • GTP/trunk/Lib/Vis/Preprocessing/src/default.env

    r2638 r2647  
    554554Preprocessor { 
    555555  # internal 
    556   #rayCastMethod 0 
     556  # rayCastMethod 0 
    557557  # Intel 
    558   #rayCastMethod 1 
     558  rayCastMethod 1 
    559559  # Havran - 2 - static scene 
    560560  # rayCastMethod 2 
  • GTP/trunk/Lib/Vis/Preprocessing/src/main.cpp

    r2643 r2647  
    321321                                                                 preprocessor->mKdTree); 
    322322                 
     323        } 
     324 
     325        bool exportRandomViewCells; 
     326        Environment::GetSingleton()->GetBoolValue("ViewCells.exportRandomViewCells", 
     327                                                                                          exportRandomViewCells); 
     328         
     329        if (exportRandomViewCells) 
     330          { 
     331                cout << "exporting random view cells" << endl; 
     332                preprocessor->mViewCellsManager->ExportRandomViewCells(viewCellPointsFile); 
     333                cout << "finished" << endl; 
    323334          } 
    324          
     335 
    325336        if (preprocessor->mUseGlRenderer || preprocessor->mUseGlDebugger) 
    326337        { 
     
    366377                } 
    367378 
    368                 bool exportRandomViewCells; 
    369                 Environment::GetSingleton()->GetBoolValue("ViewCells.exportRandomViewCells", 
    370                         exportRandomViewCells); 
    371  
    372                 if (exportRandomViewCells) 
    373                 { 
    374                         cout << "exporting random view cells" << endl; 
    375                         preprocessor->mViewCellsManager->ExportRandomViewCells(viewCellPointsFile); 
    376                         cout << "finished" << endl; 
    377                 } 
    378379 
    379380                /*bool evaluatePixelError; 
Note: See TracChangeset for help on using the changeset viewer.