Ignore:
Timestamp:
01/19/06 02:35:58 (18 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

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

    r551 r552  
    704704        cout<<"Average PVS size = "<<avgPvs<<endl; 
    705705 
     706        const int nSamples = mViewCellsManager->GetConstructionSamples(); 
     707 
    706708        //Debug << "samples: " << samples << " construction samples " << mViewCellsManager->GetConstructionSamples() << endl; 
    707709        // construct view cells after vss 
    708710        if (!mViewCellsManager->ViewCellsConstructed() && 
    709                 (samples + mInitialSamples >  mViewCellsManager->GetConstructionSamples())) 
     711                ((samples + mInitialSamples > nSamples)  || (samples >= mVssSamples))) 
    710712        { 
     713                Debug << "samples " << samples << " initial " << mInitialSamples << " " << samples + mInitialSamples << endl; 
    711714                VssRayContainer constructionRays; 
    712                 vssTree->CollectRays(constructionRays,  
    713                                                          mViewCellsManager->GetConstructionSamples()); 
    714                 mViewCellsManager->Construct(mObjects, constructionRays); 
     715                vssTree->CollectRays(constructionRays, nSamples); 
     716 
     717                Debug << "collected rays: " << constructionRays.size() << endl; 
     718 
     719                // test if we really have enough rays 
     720                if ((samples >= mVssSamples) || (constructionRays.size() >= nSamples)) 
     721                        mViewCellsManager->Construct(mObjects, constructionRays); 
    715722        } 
    716723 
     
    739746  } 
    740747 
     748 
    741749  Debug << vssTree->stat << endl; 
    742750  VssRayContainer viewCellRays; 
Note: See TracChangeset for help on using the changeset viewer.