Ignore:
Timestamp:
01/25/06 17:45:45 (18 years ago)
Author:
mattausch
Message:

fixed loading function: the view cell manager is chosen depending on
the type in the file. the view space box is saved with the file

File:
1 edited

Legend:

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

    r574 r577  
    417417                vm->CastBeam(beam); 
    418418 
    419                 Debug << "found " << beam.mViewCells.size() << " view cells and "  
    420                           << beam.mKdNodes.size() << " kd nodes" << endl; 
     419                Debug << "found " << (int)beam.mViewCells.size() << " view cells and "  
     420                          << (int)beam.mKdNodes.size() << " kd nodes" << endl; 
    421421 
    422422                BeamSampleStatistics stats; 
     
    526526  { 
    527527        mViewSpaceBox = box; 
    528         mViewCellsManager->SetViewSpaceBox(*box); 
    529528  } 
    530529  else 
    531530  { 
    532531        mViewSpaceBox = NULL; 
    533         mViewCellsManager->SetViewSpaceBox(mKdTree->GetBox()); 
    534   } 
    535    
     532  } 
     533   
     534  AxisAlignedBox3 vbox = mViewSpaceBox ? *mViewSpaceBox : mKdTree->GetBox(); 
     535 
    536536  //-- load view cells from file if requested 
    537   if (mLoadViewCells) 
    538   {      
    539           // load now because otherwise bounding box not correct 
    540           mViewCellsManager->LoadViewCells(mViewCellsFilename, &mObjects); 
    541   } 
    542   else 
    543   { 
     537  if (!mLoadViewCells) 
     538  { 
     539          mViewCellsManager->SetViewSpaceBox(vbox); 
    544540          // construct view cells using it's own set of samples 
    545541          mViewCellsManager->Construct(this); 
Note: See TracChangeset for help on using the changeset viewer.