Ignore:
Timestamp:
12/14/06 23:02:53 (18 years ago)
Author:
mattausch
Message:

added avg ray contrib

File:
1 edited

Legend:

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

    r1893 r1895  
    3131#define STUPID_METHOD 0 
    3232 
     33 
     34 
    3335/*******************************************************************/ 
    3436/*              class HierarchyManager implementation              */ 
     
    151153                "Hierarchy.Construction.maxRepairs", mMaxRepairs); 
    152154 
    153         // compare to bytes 
     155        Environment::GetSingleton()->GetFloatValue( 
     156                "Hierarchy.Construction.maxAvgRayContri", mMaxAvgRayContri); 
     157 
     158        // for comparing it with byte - value 
    154159        mTermMaxMemory *= (1024.0f * 1024.0f); 
    155160 
     
    168173        Debug << "max steps of same kind: " << mMaxStepsOfSameType << endl; 
    169174        Debug << "max repairs: " << mMaxRepairs << endl; 
     175        Debug << "max avg ray contribution: " << mMaxAvgRayContri << endl; 
     176 
    170177 
    171178        switch (mConstructionType) 
     
    769776 
    770777        // memory size in byte 
    771         mHierarchyStats.mMemory += (float)ObjectPvs::GetEntrySizeByte() * pvsEntriesIncr; 
     778        float mem = (float)ObjectPvs::GetEntrySizeByte() * pvsEntriesIncr; 
     779 
     780        // high avg ray contri, the result is influenced by undersampling 
     781        // => decrease priority 
     782        if (0 && (sc->GetAvgRayContribution() > mMaxAvgRayContri)) 
     783        { 
     784                const float factor = 1.0f + sc->GetAvgRayContribution() - mMaxAvgRayContri; 
     785                cout << "here5 " << factor << endl; 
     786 
     787                mem *= factor; 
     788        } 
     789         
     790        mHierarchyStats.mMemory += mem; 
    772791        mHierarchyStats.mRenderCostDecrease = sc->GetRenderCostDecrease(); 
    773792         
    774793        mPriority = sc->GetPriority(); 
     794 
     795        ////////// 
     796        // show current memory 
    775797 
    776798        static float memoryCount = 0; 
Note: See TracChangeset for help on using the changeset viewer.