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

Legend:

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

    r1845 r1893  
    827827                const int maxCostMisses = splitCandidate.mParentData.mMaxCostMisses; 
    828828                // max cost threshold violated? 
    829                 splitCandidate.SetMaxCostMisses(maxCostRatioViolated  ? maxCostMisses + 1: maxCostMisses); 
     829                splitCandidate.SetMaxCostMisses(maxCostRatioViolated ?  
     830                                                                                maxCostMisses + 1: maxCostMisses); 
    830831        } 
    831832         
     
    848849        const float factor = mRenderCostDecreaseWeight; 
    849850 
    850         float priority; 
    851  
    852         if (1) 
    853         { 
    854                 priority = factor * renderCostDecr + (1.0f - factor) * oldRenderCost; 
    855                 if (mHierarchyManager->mConsiderMemory) 
    856                 { 
    857                         priority /= ((float)splitCandidate.GetPvsEntriesIncr() + mMemoryConst); 
    858                 } 
    859         } 
    860         else 
    861         { 
    862                 if (!mHierarchyManager->mConsiderMemory) 
    863                 { 
    864                         priority = factor * renderCostDecr + (1.0f - factor) * oldRenderCost; 
    865                 } 
    866                 else 
    867                 { 
    868                         const float ratio =  
    869                                 renderCostDecr / ((float)splitCandidate.GetPvsEntriesIncr() + mMemoryConst); 
    870  
    871                         priority = factor * ratio + (1.0f - factor) * oldRenderCost; 
    872                 } 
     851        float priority = factor * renderCostDecr + (1.0f - factor) * oldRenderCost; 
     852 
     853        if (mHierarchyManager->mConsiderMemory) 
     854        { 
     855                priority /= ((float)splitCandidate.GetPvsEntriesIncr() + mMemoryConst); 
     856        } 
     857 
     858        ///////////// 
     859        // avg ray contri 
     860 
     861        const float avgRayContri = splitCandidate.mParentData.GetAvgRayContribution(); 
     862        cout << "vsp avgRayContri: " << avgRayContri << endl; 
     863 
     864        // avg ray contri very high. i.e., the result is influenced by undersampling 
     865        // => decrease priority 
     866        if (avgRayContri > 99925) 
     867        { 
     868                priority /= avgRayContri; 
    873869        } 
    874870 
     
    18691865        VspLeaf *leaf = dynamic_cast<VspLeaf *>(data.mNode); 
    18701866 
    1871  
    18721867        if (data.mPvs > mVspStats.maxPvs) 
    18731868        { 
     
    18851880        { 
    18861881        ++ mVspStats.maxDepthNodes; 
    1887                 //Debug << "new max depth: " << mVspStats.maxDepthNodes << endl; 
    18881882        } 
    18891883 
     
    19081902        ++ mCreatedViewCells; 
    19091903 
    1910 #ifdef GTPGTP_DEBUG 
     1904#ifdef GTP_DEBUG 
    19111905        Debug << "BSP stats: " 
    19121906                  << "Depth: " << data.mDepth << " (max: " << mTermMaxDepth << "), " 
Note: See TracChangeset for help on using the changeset viewer.