Changeset 2066 for GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.cpp
- Timestamp:
- 01/31/07 01:51:57 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.cpp
r2021 r2066 26 26 #define USE_FIXEDPOINT_T 0 27 27 #define COUNT_ORIGIN_OBJECTS 1 28 29 #define STORE_PVS 0 28 30 29 31 … … 822 824 leaf->SetViewCell(viewCell); 823 825 824 //-- update pvs 825 int conSamp = 0; 826 float sampCon = 0.0f; 827 AddToPvs(leaf, *tData.mRays, sampCon, conSamp); 828 829 // update scalar pvs size lookup 830 ObjectPvs &pvs = viewCell->GetPvs(); 831 mViewCellsManager->UpdateScalarPvsSize(viewCell, pvs.EvalPvsCost(), pvs.GetSize()); 832 833 834 mBspStats.contributingSamples += conSamp; 835 mBspStats.sampleContributions += (int)sampCon; 836 826 if (STORE_PVS) 827 { 828 ////////// 829 //-- update pvs 830 831 int conSamp = 0; 832 float sampCon = 0.0f; 833 834 AddToPvs(leaf, *tData.mRays, sampCon, conSamp); 835 836 // update scalar pvs size lookup 837 ObjectPvs &pvs = viewCell->GetPvs(); 838 mViewCellsManager->UpdateScalarPvsSize(viewCell, pvs.EvalPvsCost(), pvs.GetSize()); 839 840 mBspStats.contributingSamples += conSamp; 841 mBspStats.sampleContributions += (int)sampCon; 842 } 843 844 ////////// 837 845 //-- store additional info 846 838 847 if (mStoreRays) 839 848 { … … 966 975 leaf->SetViewCell(viewCell); 967 976 968 //-- update pvs 969 int conSamp = 0; 970 float sampCon = 0.0f; 971 AddToPvs(leaf, *tData.mRays, sampCon, conSamp); 972 973 // update scalar pvs size value 974 ObjectPvs &pvs = viewCell->GetPvs(); 975 mViewCellsManager->UpdateScalarPvsSize(viewCell, 976 pvs.EvalPvsCost(), 977 pvs.GetSize()); 978 979 mBspStats.contributingSamples += conSamp; 980 mBspStats.sampleContributions += (int)sampCon; 977 if (STORE_PVS) 978 { 979 ///////// 980 //-- update pvs 981 982 int conSamp = 0; 983 float sampCon = 0.0f; 984 985 AddToPvs(leaf, *tData.mRays, sampCon, conSamp); 986 987 // update scalar pvs size value 988 ObjectPvs &pvs = viewCell->GetPvs(); 989 mViewCellsManager->UpdateScalarPvsSize(viewCell, 990 pvs.EvalPvsCost(), 991 pvs.GetSize()); 992 993 mBspStats.contributingSamples += conSamp; 994 mBspStats.sampleContributions += (int)sampCon; 995 } 981 996 982 997 viewCell->mLeaves.push_back(leaf); … … 1254 1269 if (ray->mTerminationObject) 1255 1270 { 1271 cout << "m"; 1256 1272 if (vc->AddPvsSample(ray->mTerminationObject, ray->mPdf, contribution)) 1257 1273 madeContrib = true;
Note: See TracChangeset
for help on using the changeset viewer.