Ignore:
Timestamp:
07/26/06 17:38:01 (18 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

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

    r1159 r1160  
    22142214 
    22152215 
    2216 void ViewCellsManager::SetScalarPvsSize(ViewCell *vc,  
    2217                                                                                 const int pvsSize) const 
     2216void ViewCellsManager::UpdateScalarPvsSize(ViewCell *vc, const int pvsSize, const int entriesInPvs) const 
    22182217{ 
    22192218        vc->mPvsSize = pvsSize; 
     2219        vc->mEntriesInPvs = entriesInPvs; 
     2220 
    22202221        vc->mPvsSizeValid = true; 
    22212222} 
     
    31983199        { 
    31993200                pvs = root->GetPvs(); 
    3200                 SetScalarPvsSize(root, pvs.GetSize()); 
     3201                UpdateScalarPvsSize(root, pvs.CountPvs(), pvs.GetSize()); 
    32013202                 
    32023203                return; 
     
    32533254        } 
    32543255         
    3255         // set new pvs size 
    3256     SetScalarPvsSize(interior, pvs.GetSize()); 
     3256        // set correct pvs size for interior 
     3257        UpdateScalarPvsSize(interior, pvs.CountPvs(), pvs.GetSize()); 
    32573258 
    32583259#else 
     
    40814082        { 
    40824083                pvs = root->GetPvs(); 
    4083                 SetScalarPvsSize(root, root->GetPvs().CountPvs()); 
     4084                UpdateScalarPvsSize(root, pvs.CountPvs(), pvs.GetSize()); 
    40844085                 
    40854086                return; 
     
    41384139         
    41394140        // set new pvs size 
    4140         SetScalarPvsSize(interior, pvs.GetSize()); 
     4141        UpdateScalarPvsSize(interior, pvs.CountPvs(), pvs.GetSize()); 
    41414142         
    41424143 
     
    51215122        // terminate traversal 
    51225123        if (root->IsLeaf()) 
    5123         { 
     5124        {  
     5125                // we assume that pvs is explicitly stored in leaves 
    51245126                pvs = root->GetPvs(); 
    5125                 SetScalarPvsSize(root, root->GetPvs().GetSize()); 
     5127                UpdateScalarPvsSize(root, pvs.CountPvs(), pvs.GetSize()); 
    51265128                 
    51275129                return; 
     
    51795181         
    51805182        // set new pvs size 
    5181         SetScalarPvsSize(interior, pvs.GetSize()); 
     5183        UpdateScalarPvsSize(interior, pvs.CountPvs(), pvs.GetSize()); 
    51825184         
    51835185 
     
    57975799                                        if (!mStoreKdPvs) 
    57985800                                        { 
    5799                                                 viewcell->GetPvs().AddSample(ray.mTerminationObject, ray.mPdf); 
     5801                                                viewcell->AddPvsSample(ray.mTerminationObject, ray.mPdf, ray.mRelativePvsContribution); 
    58005802                                        } 
    58015803                                        else 
     
    58035805                                                /// get current leaf the point 
    58045806                                                KdLeaf *leaf = mOspTree->GetLeaf(ray.mTermination); 
    5805  
    58065807                                                KdIntersectable *entry = mOspTree->GetOrCreateKdIntersectable(leaf); 
    58075808 
    5808                                                 viewcell->GetPvs().AddSample(entry, ray.mPdf); 
     5809                                                viewcell->AddPvsSample(entry, ray.mPdf, ray.mRelativePvsContribution); 
    58095810                                        } 
    58105811                                } 
     
    58125813#if COUNT_ORIGIN_OBJECTS 
    58135814                                 if (ray.mOriginObject) 
    5814                                          viewcell->GetPvs().AddSample(ray.mOriginObject, ray.mPdf); 
     5815                                         viewcell->AddPvsSample(ray.mOriginObject, ray.mPdf, ray.mPvsContribution); 
    58155816#endif 
    58165817                        } 
Note: See TracChangeset for help on using the changeset viewer.