Ignore:
Timestamp:
10/25/06 20:29:41 (18 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

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

    r1677 r1679  
    319319                                                                 AxisAlignedBox3 *forcedViewSpace) 
    320320{ 
     321        mTimeStamp = 1; 
     322 
    321323        switch (mConstructionType) 
    322324        { 
     
    422424        // then optimizate view space partition for the current osp 
    423425        // and vice versa until iteration depth is reached. 
    424  
     426bool lastSplitWasOsp = true; 
    425427        while (!(viewSpaceQueue.Empty() && objectSpaceQueue.Empty())) 
    426428        { 
     
    432434 
    433435                // should view or object space be subdivided further? 
    434                 if (ospPriority >= vspPriority) 
    435                 { 
     436                //if (ospPriority >= vspPriority) 
     437                if (!lastSplitWasOsp) 
     438                { 
     439                        lastSplitWasOsp = true; 
    436440                        cout << "osp" << endl; 
    437441                        // dirtied view space candidates 
     
    456460                else 
    457461                { 
     462                        lastSplitWasOsp = false; 
    458463                        cout << "vsp" << endl; 
    459464                         
     
    912917                const float threshold = oldCandidate ? oldCandidate->GetPriority() : 1e20; 
    913918                SubdivisionCandidate *sc = NextSubdivisionCandidate(splitQueue);  
    914                 //cout << "here2 " << sc->GetPriority() << " " << threshold << endl; 
     919                //cout << "here2 " << sc->GetRenderCostDecrease() << " " << threshold << endl; 
     920                float rc = (float)sc->GetRenderCostDecrease() / (mInitialRenderCost - mHierarchyStats.mTotalCost + 1.0f); 
     921                float mc = (float)sc->GetPvsEntriesIncr() / (float)mHierarchyStats.mPvsEntries;  
     922 
     923                //cout << "dRc: " << sc->GetRenderCostDecrease() << " dMem: " << sc->GetPvsEntriesIncr() << " ratio1 " << rc << " ratio2 " << mc << " const: " << 1.0f - GetMemoryConst() << endl; 
    915924 
    916925                // minimum slope reached 
     
    15051514 
    15061515 
    1507 void HierarchyManager::FinishObjectSpaceSubdivision(const ObjectContainer &objects, const bool removeRayRefs) const 
     1516void HierarchyManager::FinishObjectSpaceSubdivision(const ObjectContainer &objects,  
     1517                                                                                                        const bool removeRayRefs) const 
    15081518{ 
    15091519        switch (mObjectSpaceSubdivisionType) 
Note: See TracChangeset for help on using the changeset viewer.