Changeset 610 for trunk/VUT/GtpVisibilityPreprocessor/src/ViewCell.cpp
- Timestamp:
- 02/09/06 12:14:11 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/ViewCell.cpp
r608 r610 1286 1286 1287 1287 // compress root node 1288 P ropagateUpVisibility(interior);1288 PullUpVisibility(interior); 1289 1289 } 1290 1290 } … … 1328 1328 1329 1329 1330 void ViewCellsTree::P ropagateUpVisibility(ViewCellInterior *interior)1330 void ViewCellsTree::PullUpVisibility(ViewCellInterior *interior) 1331 1331 { 1332 1332 Intersectable::NewMail((int)interior->mChildren.size()); … … 1536 1536 } 1537 1537 1538 1539 void ViewCellsTree::PropagateUpPvs(ViewCell *vc) 1540 { 1541 while (vc->GetParent()) 1542 { 1543 vc->GetParent()->GetPvs().Merge(vc->GetPvs()); 1544 vc = vc->GetParent(); 1545 } 1546 } 1538 1547 1539 1548 … … 1624 1633 1625 1634 1635 bool ViewCellsTree::Export(ofstream &stream) 1636 { 1637 ExportViewCell(mRoot, stream); 1638 1639 return true; 1640 } 1641 1642 1643 void ViewCellsTree::ExportViewCell(ViewCell *viewCell, ofstream &stream) 1644 { 1645 ObjectPvsMap::iterator it, it_end = viewCell->GetPvs().mEntries.end(); 1646 1647 if (0) // test with empty pvs 1648 for (it = viewCell->GetPvs().mEntries.begin(); it != it_end; ++ it) 1649 { 1650 stream << (*it).first->GetId() << " "; 1651 } 1652 1653 stream << "\" />" << endl; 1654 1655 if (viewCell->IsLeaf()) 1656 { 1657 stream << "<Leaf "; 1658 stream << "id=\"" << viewCell->GetId() << "\" "; 1659 stream << "active=\"" << viewCell->mIsActive << "\" "; 1660 stream << "mergecost=\"" << viewCell->GetMergeCost() << "\" "; 1661 stream << "pvs=\""; 1662 stream << "</Leaf>" << endl; 1663 } 1664 else 1665 { 1666 ViewCellInterior *interior = dynamic_cast<ViewCellInterior *>(viewCell); 1667 1668 stream << "<Interior "; 1669 stream << "id=\"" << viewCell->GetId() << "\" "; 1670 stream << "active=\"" << viewCell->mIsActive << "\" "; 1671 stream << "mergecost=\"" << viewCell->GetMergeCost() << "\" "; 1672 stream << "pvs=\""; 1673 1674 ViewCellContainer::const_iterator it, it_end = interior->mChildren.end(); 1675 1676 for (it = interior->mChildren.begin(); it != it_end; ++ it) 1677 { 1678 ExportViewCell(*it, stream); 1679 } 1680 1681 stream << "</Interior>" << endl; 1682 } 1683 } 1684 1685 1626 1686 1627 1687 /**************************************************************************/ … … 1704 1764 1705 1765 1766 1767 1768 1706 1769 /************************************************************************/ 1707 1770 /* MergeStatistics implementation */
Note: See TracChangeset
for help on using the changeset viewer.