Ignore:
Timestamp:
10/04/06 20:43:07 (18 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

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

    r1566 r1570  
    6565        { 
    6666                VssRay *newRay = ReverseSampling(currentRay, hitTriangle, oldRay); 
     67                // ray is not pushed into the queue => can delete ray 
    6768                if (!HandleRay(newRay)) 
    68                 { 
    6969                        delete newRay; 
    70                 } 
     70                 
    7171                return true; 
    7272        } 
     
    7878bool GvsPreprocessor::HandleRay(VssRay *vssRay) 
    7979{ 
    80         mViewCellsManager->ComputeSampleContribution(*vssRay, true, false); 
     80        const bool storeRaysForViz = true; 
     81        mViewCellsManager->ComputeSampleContribution(*vssRay, true, storeRaysForViz); 
    8182                 
    8283        // some pvs contribution for this ray? 
     
    8586                //cout << " h " << mSampleContriPerPass << " " << mSamplesPerPass << " " << mTotalSamples << endl; 
    8687                mRayQueue.push(vssRay); 
    87                 mVssRays.push_back(new VssRay(*vssRay)); 
     88 
     89                if (storeRaysForViz) 
     90                { 
     91                        ViewCellContainer::const_iterator vit, vit_end = vssRay->mViewCells.end(); 
     92                        for (vit = vssRay->mViewCells.begin(); vit != vit_end; ++ vit) 
     93                        { 
     94                                (*vit)->mVssRays.push_back(new VssRay(*vssRay)); 
     95                        } 
     96                } 
     97                //mVssRays.push_back(new VssRay(*vssRay)); 
    8898        ++ mSampleContriPerPass; 
    8999 
     
    443453                mViewCellsManager->PrintPvsStatistics(mStats); 
    444454 
     455                char str[64]; sprintf(str, "tmp/pass%04d-", mPass); 
     456                 
    445457                // visualization 
    446 //              mViewCellsManager->Visualize(mVssRays); 
     458                const bool exportRays = true; 
     459                const bool exportPvs = true; 
     460                mViewCellsManager->ExportSingleViewCells(mObjects, 10, false, exportPvs, exportRays, 100, str); 
     461                // remove pass samples 
     462                ViewCellContainer::const_iterator vit, vit_end = mViewCellsManager->GetViewCells().end(); 
     463 
     464                for (vit = mViewCellsManager->GetViewCells().begin(); vit != vit_end; ++ vit) 
     465                { 
     466                        CLEAR_CONTAINER((*vit)->mVssRays); 
     467                } 
     468 
    447469                CLEAR_CONTAINER(mVssRays); 
    448470                // ComputeRenderError(); 
Note: See TracChangeset for help on using the changeset viewer.