Changeset 1160 for GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
- Timestamp:
- 07/26/06 17:38:01 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
r1159 r1160 2214 2214 2215 2215 2216 void ViewCellsManager::SetScalarPvsSize(ViewCell *vc, 2217 const int pvsSize) const 2216 void ViewCellsManager::UpdateScalarPvsSize(ViewCell *vc, const int pvsSize, const int entriesInPvs) const 2218 2217 { 2219 2218 vc->mPvsSize = pvsSize; 2219 vc->mEntriesInPvs = entriesInPvs; 2220 2220 2221 vc->mPvsSizeValid = true; 2221 2222 } … … 3198 3199 { 3199 3200 pvs = root->GetPvs(); 3200 SetScalarPvsSize(root, pvs.GetSize());3201 UpdateScalarPvsSize(root, pvs.CountPvs(), pvs.GetSize()); 3201 3202 3202 3203 return; … … 3253 3254 } 3254 3255 3255 // set new pvs size3256 SetScalarPvsSize(interior, pvs.GetSize());3256 // set correct pvs size for interior 3257 UpdateScalarPvsSize(interior, pvs.CountPvs(), pvs.GetSize()); 3257 3258 3258 3259 #else … … 4081 4082 { 4082 4083 pvs = root->GetPvs(); 4083 SetScalarPvsSize(root, root->GetPvs().CountPvs());4084 UpdateScalarPvsSize(root, pvs.CountPvs(), pvs.GetSize()); 4084 4085 4085 4086 return; … … 4138 4139 4139 4140 // set new pvs size 4140 SetScalarPvsSize(interior, pvs.GetSize());4141 UpdateScalarPvsSize(interior, pvs.CountPvs(), pvs.GetSize()); 4141 4142 4142 4143 … … 5121 5122 // terminate traversal 5122 5123 if (root->IsLeaf()) 5123 { 5124 { 5125 // we assume that pvs is explicitly stored in leaves 5124 5126 pvs = root->GetPvs(); 5125 SetScalarPvsSize(root, root->GetPvs().GetSize());5127 UpdateScalarPvsSize(root, pvs.CountPvs(), pvs.GetSize()); 5126 5128 5127 5129 return; … … 5179 5181 5180 5182 // set new pvs size 5181 SetScalarPvsSize(interior, pvs.GetSize());5183 UpdateScalarPvsSize(interior, pvs.CountPvs(), pvs.GetSize()); 5182 5184 5183 5185 … … 5797 5799 if (!mStoreKdPvs) 5798 5800 { 5799 viewcell-> GetPvs().AddSample(ray.mTerminationObject, ray.mPdf);5801 viewcell->AddPvsSample(ray.mTerminationObject, ray.mPdf, ray.mRelativePvsContribution); 5800 5802 } 5801 5803 else … … 5803 5805 /// get current leaf the point 5804 5806 KdLeaf *leaf = mOspTree->GetLeaf(ray.mTermination); 5805 5806 5807 KdIntersectable *entry = mOspTree->GetOrCreateKdIntersectable(leaf); 5807 5808 5808 viewcell-> GetPvs().AddSample(entry, ray.mPdf);5809 viewcell->AddPvsSample(entry, ray.mPdf, ray.mRelativePvsContribution); 5809 5810 } 5810 5811 } … … 5812 5813 #if COUNT_ORIGIN_OBJECTS 5813 5814 if (ray.mOriginObject) 5814 viewcell-> GetPvs().AddSample(ray.mOriginObject, ray.mPdf);5815 viewcell->AddPvsSample(ray.mOriginObject, ray.mPdf, ray.mPvsContribution); 5815 5816 #endif 5816 5817 }
Note: See TracChangeset
for help on using the changeset viewer.