Ignore:
Timestamp:
08/11/06 15:23:47 (18 years ago)
Author:
bittner
Message:

code merge

File:
1 edited

Legend:

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

    r1189 r1199  
    16921692void ViewCellsManager::GetPvsStatistics(PvsStatistics &stat) 
    16931693{ 
    1694         // update pvs of view cells tree if necessary 
    1695         UpdatePvs(); 
    1696  
    1697         ViewCellContainer::const_iterator it = mViewCells.begin(); 
    1698  
    1699         stat.viewcells = 0; 
    1700         stat.minPvs = 100000000; 
    1701         stat.maxPvs = 0; 
    1702         stat.avgPvs = 0.0f; 
    1703  
    1704         for (; it != mViewCells.end(); ++ it)  
    1705         { 
    1706                 ViewCell *viewcell = *it; 
    1707  
    1708                 const int pvsSize = mViewCellsTree->GetPvsSize(viewcell); 
    1709  
    1710                 if (pvsSize < stat.minPvs) 
    1711                         stat.minPvs = pvsSize; 
    1712                 if (pvsSize > stat.maxPvs) 
    1713                         stat.maxPvs = pvsSize; 
    1714  
    1715                 stat.avgPvs += pvsSize; 
    1716  
    1717                 ++ stat.viewcells; 
    1718         } 
    1719  
    1720         if (stat.viewcells) 
    1721                 stat.avgPvs/=stat.viewcells; 
     1694  // update pvs of view cells tree if necessary 
     1695  UpdatePvs(); 
     1696   
     1697  ViewCellContainer::const_iterator it = mViewCells.begin(); 
     1698   
     1699  stat.viewcells = 0; 
     1700  stat.minPvs = 100000000; 
     1701  stat.maxPvs = 0; 
     1702  stat.avgPvs = 0.0f; 
     1703   
     1704  for (; it != mViewCells.end(); ++ it)  
     1705        { 
     1706          ViewCell *viewcell = *it; 
     1707 
     1708          //      bool mCountKdPvs = false; 
     1709          const int pvsSize = mViewCellsTree->GetPvsSize(viewcell); 
     1710 
     1711 
     1712          if (pvsSize < stat.minPvs) 
     1713                stat.minPvs = pvsSize; 
     1714          if (pvsSize > stat.maxPvs) 
     1715                stat.maxPvs = pvsSize; 
     1716           
     1717          stat.avgPvs += pvsSize; 
     1718           
     1719          ++ stat.viewcells; 
     1720        } 
     1721   
     1722  if (stat.viewcells) 
     1723        stat.avgPvs/=stat.viewcells; 
    17221724} 
    17231725 
Note: See TracChangeset for help on using the changeset viewer.