Changeset 1668


Ignore:
Timestamp:
10/23/06 20:32:01 (18 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

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

    r1667 r1668  
    821821 
    822822        // take render cost of node into account  
    823         // otherwise danger of being stuck in a local minimum!! 
     823        // otherwise danger of being stuck in a local minimum! 
    824824        const float factor = mRenderCostDecreaseWeight; 
    825825        float priority = factor * renderCostDecr + (1.0f - factor) * oldRenderCost; 
     
    832832        splitCandidate.SetPriority(priority); 
    833833} 
    834  
    835  
    836 /*float VspTree::EvalPriority(const VspSubdivisionCandidate &splitCandidate) const 
    837 { 
    838         // compute global decrease in render cost 
    839         float oldRenderCost; 
    840         const float renderCostDecr = EvalRenderCostDecrease(splitCandidate.mSplitPlane,  
    841                                                                                                                 splitCandidate.mParentData, 
    842                                                                                                                 oldRenderCost); 
    843      
    844         // take render cost of node into account  
    845         // otherwise danger of being stuck in a local minimum!! 
    846         const float factor = mRenderCostDecreaseWeight; 
    847  
    848         float priority = factor * renderCostDecr + (1.0f - factor) * oldRenderCost; 
    849  
    850         if (mHierarchyManager->mConsiderMemory) 
    851         { 
    852                 //cout << "here2 rc: " << factor * renderCostDecr << " pvs: " << (1.0f - factor) * splitCandidate.GetPvsEntriesIncr() << endl;  
    853                 //const float priority = factor * renderCostDecr - (1.0f - factor) * splitCandidate.GetPvsEntriesIncr(); 
    854                 priority /= ((float)splitCandidate.GetPvsEntriesIncr() + mHierarchyManager->mMemoryConst); 
    855         } 
    856  
    857         return priority; 
    858 }*/ 
    859834 
    860835 
     
    865840        float bPvsSize = 0; 
    866841         
    867         AxisAlignedPlane candidatePlane = splitCandidate.mSplitPlane; 
     842        const AxisAlignedPlane candidatePlane = splitCandidate.mSplitPlane; 
    868843         
    869844        Intersectable::NewMail(3); 
     
    881856                float t; 
    882857                // classify ray 
    883                 const int cf =  
    884                         rayInf.ComputeRayIntersection(candidatePlane.mAxis,  
    885                                                                                   candidatePlane.mPosition, t); 
     858                const int cf =  rayInf.ComputeRayIntersection(candidatePlane.mAxis,  
     859                                                                                                          candidatePlane.mPosition, t); 
    886860 
    887861                UpdatePvsEntriesContribution(*ray, true, cf, fPvsSize, bPvsSize, oldPvsSize); 
     
    890864#endif 
    891865        } 
    892         //cout << "pvs entries: " << fPvsSize << " " << bPvsSize << " " << oldPvsSize << endl; 
    893866 
    894867        return (int)(fPvsSize + bPvsSize - oldPvsSize); 
     
    933906         
    934907        if (tData.mDepth > mVspStats.maxDepth) 
    935         {       //Debug << "max depth increases to " << tData.mDepth << " at " << mVspStats.Leaves() << " leaves" << endl; 
     908        {        
    936909                mVspStats.maxDepth = tData.mDepth; 
    937910        } 
     
    996969        return interior; 
    997970} 
    998  
    999  
    1000971 
    1001972 
Note: See TracChangeset for help on using the changeset viewer.