Ignore:
Timestamp:
01/24/07 01:33:39 (17 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

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

    r2032 r2048  
    285285        } 
    286286 
    287         string viewCellsFile = ReplaceSuffix(filename, ".obj", ".vc"); 
    288         //viewCellsFile = ReplaceSuffix(filename, ".dat", ".vc"); 
    289  
    290         const int numViewCells = 5; 
    291         const int numViewPoints = 20; 
     287        string viewCellPointsFile; 
     288 
     289        if (strstr(filename.c_str(), ".obj")) 
     290                viewCellPointsFile = ReplaceSuffix(filename, ".obj", ".vc"); 
     291        else if (strstr(filename.c_str(), ".dat")) 
     292                viewCellPointsFile = ReplaceSuffix(filename, ".dat", ".vc"); 
     293        else if (strstr(filename.c_str(), ".x3d")) 
     294                viewCellPointsFile = ReplaceSuffix(filename, ".x3d", ".vc"); 
     295 
     296        bool importRandomViewCells; 
     297        Environment::GetSingleton()->GetBoolValue("ViewCells.importRandomViewCells", 
     298                                                                                           importRandomViewCells); 
     299 
     300        if (importRandomViewCells) 
     301        { 
     302                cout << "importing random view cells" << endl; 
     303                preprocessor->mViewCellsManager->ImportRandomViewCells(viewCellPointsFile); 
     304                cout << "finished" << endl; 
     305        } 
    292306 
    293307        bool useHwGlobalLines; 
     
    377391                } 
    378392 
    379                 vector<ViewCellPoints *> myViewCells; 
    380  
    381                 preprocessor->mViewCellsManager->GenerateRandomViewCells(myViewCells, numViewCells, numViewPoints); 
    382                 cout << "exporting random view cells" << endl; 
    383                 preprocessor->mViewCellsManager->ExportRandomViewCells(viewCellsFile, myViewCells); 
    384  
    385                 //preprocessor->mViewCellsManager->ImportRandomViewCells(viewCellsFile, myViewCells); 
    386                 CLEAR_CONTAINER(myViewCells); 
    387  
    388                 //preprocessor->renderer->EvalPvsStat(); 
     393                bool exportRandomViewCells; 
     394                Environment::GetSingleton()->GetBoolValue("ViewCells.exportRandomViewCells", 
     395                                                                                                  exportRandomViewCells); 
     396 
     397                if (exportRandomViewCells) 
     398                { 
     399                        cout << "exporting random view cells" << endl; 
     400                        preprocessor->mViewCellsManager->ExportRandomViewCells(viewCellPointsFile); 
     401                        cout << "finished" << endl; 
     402                } 
     403 
     404                /*bool evaluatePixelError; 
     405                Environment::GetSingleton()->GetBoolValue("Preprocessor.evaluatePixelError",  evaluatePixelError); 
     406 
     407                if (evaluatePixelError) 
     408                { 
     409                        cout << "evaluating pixel error" << endl; 
     410                        preprocessor->ComputeRenderError(); 
     411                }*/ 
    389412 
    390413                qApp->exec(); 
Note: See TracChangeset for help on using the changeset viewer.