Ignore:
Timestamp:
04/24/06 08:21:10 (18 years ago)
Author:
mattausch
Message:

debug version for testing subdivision

File:
1 edited

Legend:

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

    r752 r801  
    262262float ViewCell::GetRenderCost() const 
    263263{ 
    264         return (float)mPvs.GetSize() * GetVolume(); 
     264        //return (float)mPvs.GetSize() * GetVolume(); 
     265        return (float)mPvsSize * GetVolume(); 
    265266} 
    266267 
     
    575576 
    576577        //const float maxAvgCost = 350; 
    577         while (!mMergeQueue.empty())//NumActiveViewCells > mMergeMinViewCells)) 
     578        while (!mMergeQueue.empty())//nmNumActiveViewCells > mMergeMinViewCells)) 
    578579        { 
    579580                //-- reset merge queue if the ratio of current expected cost / real expected cost 
     
    661662                        realAvgRenderCost = (float)totalPvs / (float)realNumActiveViewCells; 
    662663         
    663                         // set merge cost to this node 
    664                         mergedVc->SetMergeCost(totalRenderCost); 
     664                        // set merge cost to this node for priority traversal 
     665                        //mergedVc->SetMergeCost(totalRenderCost); 
     666// HACK 
     667mergedVc->SetMergeCost(1.0f / (float)realNumActiveViewCells); 
    665668 
    666669                        //if (mViewCellsManager->EqualToSpatialNode(mergedVc)) 
     
    736739                mMergeQueue.pop(); 
    737740        } 
    738  
     741//hack!! 
     742//mRoot->GetPvs().Clear(); 
    739743        // TODO delete because makes no sense here 
    740744        mergeStats.expectedRenderCost = realExpectedCost; 
     
    16081612void ViewCellsTree::GetPvs(ViewCell *vc, ObjectPvs &pvs) const 
    16091613{ 
     1614        // pvs is stored in each cell 
     1615        if (mViewCellsStorage == PVS_IN_INTERIORS) 
     1616        { 
     1617                pvs = vc->GetPvs(); 
     1618                return; 
     1619        } 
     1620 
    16101621        Intersectable::NewMail(); 
    16111622 
    1612         if (mViewCellsStorage == PVS_IN_INTERIORS) 
    1613                 pvs = vc->GetPvs(); 
    16141623 
    16151624        int pvsSize = 0; 
     
    16311640                tstack.pop(); 
    16321641 
     1642                // add new pvs 
    16331643                pvs.AddPvs(vc->GetPvs()); 
    16341644 
Note: See TracChangeset for help on using the changeset viewer.