Ignore:
Timestamp:
03/09/07 18:30:24 (17 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

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

    r2210 r2224  
    837837                return childPvs; 
    838838        } 
     839 
    839840        // assume pvs not sampled sufficiently => take total pvs 
    840841        if (avgRayContri >= mMaxAvgRayContri) 
     
    852853        const float newPvs = alpha * childPvs + (1.0f - alpha) * totalPvs; 
    853854#endif 
    854  
     855cout<<"a"; 
    855856        //cout << "alpha " << alpha << " beta: " << beta << " child: " << childPvs << " parent: " << totalPvs << endl; 
    856857         
     
    863864bool HierarchyManager::ApplySubdivisionCandidate(SubdivisionCandidate *sc,  
    864865                                                                                                 SplitQueue &splitQueue, 
    865                                                                                                  const bool repairQueue) 
     866                                                                                                 //const bool repairQueue, 
     867                                                                                                 SubdivisionCandidateContainer &dirtyList) 
    866868{ 
    867869        const bool terminationCriteriaMet = GlobalTerminationCriteriaMet(sc); 
    868         const bool success = sc->Apply(splitQueue, terminationCriteriaMet); 
     870        const bool success = sc->Apply(splitQueue, terminationCriteriaMet, dirtyList); 
    869871 
    870872        if (sc->IsDirty()) 
     
    934936        // output stats 
    935937        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 round 
    941                 vector<SubdivisionCandidate *> dirtyList; 
    942                 sc->CollectDirtyCandidates(dirtyList, false); 
    943  
    944                 RepairQueue(dirtyList, splitQueue, mRecomputeSplitPlaneOnRepair); 
    945         } 
    946938 
    947939        return true; 
     
    10461038                                                                           AxisAlignedBox3 *forcedViewSpace) 
    10471039{ 
     1040        SubdivisionCandidate::NewMail(); 
     1041 
    10481042        while (!FinishedConstruction()) 
    10491043        { 
     
    10531047                //-- subdivide leaf node 
    10541048 
    1055                 ApplySubdivisionCandidate(sc, mTQueue, repairQueue); 
     1049                SubdivisionCandidateContainer dirtyList; 
     1050 
     1051                ApplySubdivisionCandidate(sc, mTQueue, dirtyList); 
    10561052                                 
     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 
    10571060                // we use objects for evaluating vsp tree construction until  
    10581061                // a certain depth once a certain depth existiert ... 
     
    11031106                //-- subdivide leaf node of either type 
    11041107 
    1105         ApplySubdivisionCandidate(sc, mTQueue, repairQueue); 
     1108                SubdivisionCandidateContainer dirtyList; 
     1109        ApplySubdivisionCandidate(sc, mTQueue, dirtyList); 
    11061110                 
     1111                if (repairQueue) 
     1112                { 
     1113                        RepairQueue(dirtyList, mTQueue, mRecomputeSplitPlaneOnRepair); 
     1114                } 
     1115 
    11071116                DEL_PTR(sc); 
    11081117        } 
     
    11401149                SubdivisionCandidate *sc = NextSubdivisionCandidate(splitQueue);  
    11411150                         
    1142                 const bool repairQueue = false; 
    1143                 const bool success = ApplySubdivisionCandidate(sc, splitQueue, repairQueue); 
     1151                const bool success = ApplySubdivisionCandidate(sc, splitQueue, dirtyCandidates); 
    11441152 
    11451153                if (success) 
    11461154                { 
    1147                         sc->CollectDirtyCandidates(dirtyCandidates, true); 
     1155                        //sc->CollectDirtyCandidates(dirtyCandidates, true); 
    11481156                        ++ steps; 
    11491157                } 
Note: See TracChangeset for help on using the changeset viewer.