Changeset 801 for GTP/trunk/Lib/Vis/Preprocessing/src/ViewCell.cpp
- Timestamp:
- 04/24/06 08:21:10 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCell.cpp
r752 r801 262 262 float ViewCell::GetRenderCost() const 263 263 { 264 return (float)mPvs.GetSize() * GetVolume(); 264 //return (float)mPvs.GetSize() * GetVolume(); 265 return (float)mPvsSize * GetVolume(); 265 266 } 266 267 … … 575 576 576 577 //const float maxAvgCost = 350; 577 while (!mMergeQueue.empty())// NumActiveViewCells > mMergeMinViewCells))578 while (!mMergeQueue.empty())//nmNumActiveViewCells > mMergeMinViewCells)) 578 579 { 579 580 //-- reset merge queue if the ratio of current expected cost / real expected cost … … 661 662 realAvgRenderCost = (float)totalPvs / (float)realNumActiveViewCells; 662 663 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 667 mergedVc->SetMergeCost(1.0f / (float)realNumActiveViewCells); 665 668 666 669 //if (mViewCellsManager->EqualToSpatialNode(mergedVc)) … … 736 739 mMergeQueue.pop(); 737 740 } 738 741 //hack!! 742 //mRoot->GetPvs().Clear(); 739 743 // TODO delete because makes no sense here 740 744 mergeStats.expectedRenderCost = realExpectedCost; … … 1608 1612 void ViewCellsTree::GetPvs(ViewCell *vc, ObjectPvs &pvs) const 1609 1613 { 1614 // pvs is stored in each cell 1615 if (mViewCellsStorage == PVS_IN_INTERIORS) 1616 { 1617 pvs = vc->GetPvs(); 1618 return; 1619 } 1620 1610 1621 Intersectable::NewMail(); 1611 1622 1612 if (mViewCellsStorage == PVS_IN_INTERIORS)1613 pvs = vc->GetPvs();1614 1623 1615 1624 int pvsSize = 0; … … 1631 1640 tstack.pop(); 1632 1641 1642 // add new pvs 1633 1643 pvs.AddPvs(vc->GetPvs()); 1634 1644
Note: See TracChangeset
for help on using the changeset viewer.