Changeset 2187 for GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.cpp
- Timestamp:
- 03/05/07 11:07:44 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.cpp
r2176 r2187 668 668 const bool globalCriteriaMet) 669 669 { 670 mSubdivTimer.Entry(); 671 670 672 // todo remove dynamic cast 671 673 VspSubdivisionCandidate *sc = … … 686 688 const int maxCostMisses = sc->GetMaxCostMisses(); 687 689 688 newNode = SubdivideNode(*sc, 689 tFrontData, 690 tBackData); 691 690 newNode = SubdivideNode(*sc, tFrontData, tBackData); 691 692 692 // how often was max cost ratio missed in this branch? 693 693 tFrontData.mMaxCostMisses = maxCostMisses; … … 766 766 } 767 767 768 mSubdivTimer.Exit(); 769 768 770 return newNode; 769 771 } … … 773 775 bool computeSplitPlane) 774 776 { 777 mEvalTimer.Entry(); 778 775 779 if (computeSplitPlane) 776 780 { … … 825 829 826 830 splitCandidate.SetPriority(priority); 831 832 mEvalTimer.Exit(); 827 833 } 828 834 … … 887 893 VspTraversalData &backData) 888 894 { 895 mNodeTimer.Entry(); 896 889 897 VspLeaf *leaf = static_cast<VspLeaf *>(sc.mParentData.mNode); 890 898 … … 993 1001 AddViewCellReferences(backLeaf->GetViewCell()); 994 1002 #endif 1003 1004 mNodeTimer.Exit(); 995 1005 996 1006 return interior; … … 1023 1033 1024 1034 if (entry) 1025 { cout<<"a";1035 { 1026 1036 madeContrib = 1027 1037 vc->GetPvs().AddSample(entry, ray->mPdf); … … 1052 1062 1053 1063 void VspTree::SortSubdivisionCandidates(const RayInfoContainer &rays, 1054 const int axis, 1055 float minBand, 1056 float maxBand) 1057 { 1064 const int axis, 1065 float minBand, 1066 float maxBand) 1067 { 1068 mSortTimer.Entry(); 1069 1058 1070 mLocalSubdivisionCandidates->clear(); 1059 1071 … … 1102 1114 stable_sort(mLocalSubdivisionCandidates->begin(), mLocalSubdivisionCandidates->end()); 1103 1115 //sort(mLocalSubdivisionCandidates->begin(), mLocalSubdivisionCandidates->end()); 1116 1117 mSortTimer.Exit(); 1104 1118 } 1105 1119 … … 1408 1422 float &pBack) 1409 1423 { 1424 mSplitTimer.Entry(); 1425 1410 1426 float nPosition[3]; 1411 1427 float nCostRatio[3]; … … 1502 1518 pFront = nProbFront[bestAxis]; 1503 1519 pBack = nProbBack[bestAxis]; 1520 1521 mSplitTimer.Exit(); 1504 1522 1505 1523 return nCostRatio[bestAxis]; … … 3191 3209 { 3192 3210 BvhLeaf *leaf = mHierarchyManager->mBvHierarchy->GetLeaf(obj); 3193 UpdateContributionsToPvs(leaf, cf, frontPvs, backPvs, totalPvs );3211 UpdateContributionsToPvs(leaf, cf, frontPvs, backPvs, totalPvs, false); 3194 3212 break; 3195 3213 } … … 3242 3260 int pvs = 0; 3243 3261 3244 switch (mHierarchyManager->GetObjectSpaceSubdivisionType())3262 switch (mHierarchyManager->GetObjectSpaceSubdivisionType()) 3245 3263 { 3246 3264 case HierarchyManager::NO_OBJ_SUBDIV:
Note: See TracChangeset
for help on using the changeset viewer.