Ignore:
Timestamp:
09/21/06 12:16:04 (18 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

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

    r1422 r1444  
    234234                (0 
    235235                || (mHierarchyStats.Leaves() >= mTermMaxLeaves)  
    236                 //|| (mGlobalCostMisses >= mTermGlobalCostMissTolerance) 
     236                || (mGlobalCostMisses >= mTermGlobalCostMissTolerance) 
    237237                ||(candidate->GlobalTerminationCriteriaMet()) 
    238238                ); 
    239239 
    240         if (0 && terminationCriteriaMet) 
     240        if (1 && terminationCriteriaMet) 
    241241        { 
    242242                Debug << "hierarchy global termination criteria met:" << endl; 
     
    382382        const bool vspSplit = (sc->Type() == SubdivisionCandidate::VIEW_SPACE); 
    383383 
     384        if (!globalTerminationCriteriaMet) 
     385        { 
     386                // cost ratio of cost decrease / totalCost 
     387                const float costRatio = mCurrentCandidate->GetRenderCostDecrease() / mTotalCost; 
     388                Debug << "ratio: " << costRatio << " min ratio: " << mTermMinGlobalCostRatio << endl; 
     389         
     390                if (costRatio < mTermMinGlobalCostRatio) 
     391                { 
     392                        ++ mGlobalCostMisses; 
     393                } 
     394 
     395                mTotalCost -= mCurrentCandidate->GetRenderCostDecrease(); 
     396        } 
     397 
    384398        if (vspSplit) 
    385399        { 
     
    481495        { 
    482496                mCurrentCandidate = NextSubdivisionCandidate();     
    483                 mTotalCost -= mCurrentCandidate->GetRenderCostDecrease(); 
    484  
    485                 // cost ratio of cost decrease / totalCost 
    486                 const float costRatio = mCurrentCandidate->GetRenderCostDecrease() / mTotalCost; 
    487  
    488                 //Debug << "ratio: " << costRatio << " min ratio: " << mTermMinGlobalCostRatio << endl; 
    489                 if (costRatio < mTermMinGlobalCostRatio) 
    490                 { 
    491                         ++ mGlobalCostMisses; 
    492                 } 
    493                  
     497                         
    494498                /////////////////// 
    495499                //-- subdivide leaf node 
     
    498502                { 
    499503                        cout << mCurrentCandidate->Type() << " "; 
    500                         if (0) cout << "subdividing candidate " << ++ i << " of type " << mCurrentCandidate->Type() << endl; 
     504                        if (0) cout << "subdividing candidate " << ++ i << " of type "  
     505                                                << mCurrentCandidate->Type() << endl; 
    501506                        mHierarchyStats.nodes += 2; 
    502507 
Note: See TracChangeset for help on using the changeset viewer.