Changeset 2224 for GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.cpp
- Timestamp:
- 03/09/07 18:30:24 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.cpp
r2210 r2224 837 837 return childPvs; 838 838 } 839 839 840 // assume pvs not sampled sufficiently => take total pvs 840 841 if (avgRayContri >= mMaxAvgRayContri) … … 852 853 const float newPvs = alpha * childPvs + (1.0f - alpha) * totalPvs; 853 854 #endif 854 855 cout<<"a"; 855 856 //cout << "alpha " << alpha << " beta: " << beta << " child: " << childPvs << " parent: " << totalPvs << endl; 856 857 … … 863 864 bool HierarchyManager::ApplySubdivisionCandidate(SubdivisionCandidate *sc, 864 865 SplitQueue &splitQueue, 865 const bool repairQueue) 866 //const bool repairQueue, 867 SubdivisionCandidateContainer &dirtyList) 866 868 { 867 869 const bool terminationCriteriaMet = GlobalTerminationCriteriaMet(sc); 868 const bool success = sc->Apply(splitQueue, terminationCriteriaMet );870 const bool success = sc->Apply(splitQueue, terminationCriteriaMet, dirtyList); 869 871 870 872 if (sc->IsDirty()) … … 934 936 // output stats 935 937 EvalSubdivisionStats(); 936 937 if (repairQueue)938 {939 // reevaluate candidates affected by the split for view space splits,940 // this would be object space splits and other way round941 vector<SubdivisionCandidate *> dirtyList;942 sc->CollectDirtyCandidates(dirtyList, false);943 944 RepairQueue(dirtyList, splitQueue, mRecomputeSplitPlaneOnRepair);945 }946 938 947 939 return true; … … 1046 1038 AxisAlignedBox3 *forcedViewSpace) 1047 1039 { 1040 SubdivisionCandidate::NewMail(); 1041 1048 1042 while (!FinishedConstruction()) 1049 1043 { … … 1053 1047 //-- subdivide leaf node 1054 1048 1055 ApplySubdivisionCandidate(sc, mTQueue, repairQueue); 1049 SubdivisionCandidateContainer dirtyList; 1050 1051 ApplySubdivisionCandidate(sc, mTQueue, dirtyList); 1056 1052 1053 if (repairQueue) 1054 { 1055 // reevaluate candidates affected by the split for view space splits, 1056 // this would be object space splits and other way round 1057 RepairQueue(dirtyList, mTQueue, mRecomputeSplitPlaneOnRepair); 1058 } 1059 1057 1060 // we use objects for evaluating vsp tree construction until 1058 1061 // a certain depth once a certain depth existiert ... … … 1103 1106 //-- subdivide leaf node of either type 1104 1107 1105 ApplySubdivisionCandidate(sc, mTQueue, repairQueue); 1108 SubdivisionCandidateContainer dirtyList; 1109 ApplySubdivisionCandidate(sc, mTQueue, dirtyList); 1106 1110 1111 if (repairQueue) 1112 { 1113 RepairQueue(dirtyList, mTQueue, mRecomputeSplitPlaneOnRepair); 1114 } 1115 1107 1116 DEL_PTR(sc); 1108 1117 } … … 1140 1149 SubdivisionCandidate *sc = NextSubdivisionCandidate(splitQueue); 1141 1150 1142 const bool repairQueue = false; 1143 const bool success = ApplySubdivisionCandidate(sc, splitQueue, repairQueue); 1151 const bool success = ApplySubdivisionCandidate(sc, splitQueue, dirtyCandidates); 1144 1152 1145 1153 if (success) 1146 1154 { 1147 sc->CollectDirtyCandidates(dirtyCandidates, true);1155 //sc->CollectDirtyCandidates(dirtyCandidates, true); 1148 1156 ++ steps; 1149 1157 }
Note: See TracChangeset
for help on using the changeset viewer.