Changeset 518 for trunk


Ignore:
Timestamp:
01/11/06 18:28:37 (19 years ago)
Author:
mattausch
Message:
 
Location:
trunk/VUT/GtpVisibilityPreprocessor/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/VUT/GtpVisibilityPreprocessor/src/Preprocessor.cpp

    r508 r518  
    248248 
    249249        //-- parse view cells construction method 
    250         bool loadViewCells = false; 
    251         environment->GetBoolValue("ViewCells.loadFromFile", loadViewCells); 
    252  
    253         //-- load view cells from file if requested 
    254         if (loadViewCells) 
    255         { 
    256                 char buff[100]; 
    257                 environment->GetStringValue("ViewCells.filename", buff); 
    258                 string vcFilename(buff); 
    259                 mViewCellsManager->LoadViewCells(vcFilename, &mObjects); 
    260         } 
    261  
    262  
     250        environment->GetBoolValue("ViewCells.loadFromFile", mLoadViewCells); 
     251 
     252         
    263253        if (mUseGlRenderer) 
    264254          renderer = new GlRendererBuffer(1024, 768, mSceneGraph, mViewCellsManager); 
  • trunk/VUT/GtpVisibilityPreprocessor/src/Preprocessor.h

    r508 r518  
    126126  bool mUseGlRenderer; 
    127127   
     128  bool mLoadViewCells; 
     129 
    128130protected: 
    129131 
  • trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellsManager.cpp

    r517 r518  
    100100void ViewCellsManager::ComputeSampleContributions(const VssRayContainer &rays) 
    101101{ 
     102        Debug << "here2" << endl; 
    102103        // view cells not yet constructed 
    103104        if (!ViewCellsConstructed()) 
    104105                return; 
     106        Debug << "here " << rays.size() << endl; 
    105107 
    106108        VssRayContainer::const_iterator it, it_end = rays.end(); 
     
    342344  Ray hray(ray); 
    343345  float tmin = 0, tmax = 1.0; 
    344  
     346Debug << "here3" << endl; 
    345347  //hray.Init(ray.GetOrigin(), ray.GetDir(), Ray::LINE_SEGMENT); 
    346348  if (!GetSceneBbox().GetRaySegment(hray, tmin, tmax) || (tmin > tmax)) 
     
    353355                                  termination, 
    354356                                  viewcells); 
    355   //Debug << "constribution: " << (int)viewcells.size() << endl; 
     357  Debug << "constribution: " << (int)viewcells.size() << endl; 
    356358  // copy viewcells memory efficiently 
    357359  const bool storeViewcells = false; 
  • trunk/VUT/GtpVisibilityPreprocessor/src/VssPreprocessor.cpp

    r517 r518  
    401401        mViewCellsManager->SetViewSpaceBox(mKdTree->GetBox()); 
    402402  } 
     403 
     404  //-- load view cells from file if requested 
     405  if (mLoadViewCells) 
     406  { 
     407          char buff[100]; 
     408          environment->GetStringValue("ViewCells.filename", buff); 
     409          string vcFilename(buff); 
     410          mViewCellsManager->LoadViewCells(vcFilename, &mObjects); 
     411  } 
     412 
     413 
    403414  VssTree *vssTree = NULL; 
    404415 
     
    497508        ExportRays(filename, mVssRays, numExportRays); 
    498509  } 
     510 
     511  /// compute view cell contribution of rays if view cells manager already constructed 
     512  mViewCellsManager->ComputeSampleContributions(mVssRays); 
    499513 
    500514  // construct view cells 
Note: See TracChangeset for help on using the changeset viewer.