Changeset 1142 for GTP/trunk/Lib/Vis/Preprocessing/src/ViewCell.cpp
- Timestamp:
- 07/19/06 00:26:49 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCell.cpp
r1141 r1142 1677 1677 1678 1678 1679 int ViewCellsTree::CountKdPvs(const ViewCellLeaf *vc) const 1680 { 1681 ObjectPvsMap::const_iterator oit, oit_end = vc->GetPvs().mEntries.end(); 1682 1679 int ViewCellsTree::GetPvsSize(ViewCell *vc) const 1680 { 1683 1681 int pvsSize = 0; 1684 1682 1685 1683 Intersectable::NewMail(); 1686 1684 1687 for (oit = vc->GetPvs().mEntries.begin(); oit != oit_end; ++ oit) 1688 { 1689 Intersectable *obj = (*oit).first; 1690 1691 /* KdLeaf *leaf = ; 1692 1693 pvsSize += ((int)leaf->mObjects.size() - (int)leaf->mMultipleObjects.size()); 1694 1695 //-- handle objects of several kd leaves separately 1696 ObjectContainer::const_iterator oit, oit_end = leaf->mMultipleObjects.end(); 1697 1698 for (oit = leaf->mMultipleObjects.begin(); oit != oit_end; ++ oit) 1699 { 1700 Intersectable *object = *oit; 1701 1702 // object not previously in left pvs 1703 if (!object->Mailed()) 1704 { 1705 object->Mail(); 1706 ++ pvsSize; 1707 } 1708 } 1709 }*/ 1710 } 1711 1712 return pvsSize; 1713 } 1714 1715 1716 int ViewCellsTree::GetPvsSize(ViewCell *vc, const bool countKdPvs) const 1717 { 1718 int pvsSize = 0; 1719 1720 Intersectable::NewMail(); 1721 1722 ////////////////////////// 1723 // for interiors, pvs can be stored using different methods 1685 //////////////////////////////////////////////// 1686 //-- for interiors, pvs can be stored using different methods 1687 /////////////////////////////////////////////// 1724 1688 1725 1689 switch (mViewCellsStorage) … … 1730 1694 if (vc->IsLeaf()) 1731 1695 { 1732 if (countKdPvs) 1733 pvsSize = vc->GetPvs().CountPvs(); 1734 else 1735 pvsSize = CountKdPvs(dynamic_cast<ViewCellLeaf *>(vc)); 1736 break; 1696 pvsSize = vc->GetPvs().CountPvs(); 1737 1697 } 1738 1698
Note: See TracChangeset
for help on using the changeset viewer.