Changeset 462 for trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellBsp.cpp
- Timestamp:
- 12/13/05 17:28:02 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellBsp.cpp
r452 r462 9 9 #include "AxisAlignedBox3.h" 10 10 #include <stack> 11 #include <time.h> 12 #include <iomanip> 11 13 12 #include "Exporter.h" 14 13 #include "Plane3.h" … … 1907 1906 } 1908 1907 1909 void BspTree::EvaluateViewCellsStats( BspViewCellsStatistics &stat) const1910 { 1911 stat.Reset();1908 void BspTree::EvaluateViewCellsStats(ViewCellsStatistics &vcStat) const 1909 { 1910 vcStat.Reset(); 1912 1911 1913 1912 stack<BspNode *> nodeStack; … … 1926 1925 if (node->IsLeaf()) 1927 1926 { 1928 ++ stat.bspLeaves;1927 ++ vcStat.leaves; 1929 1928 1930 1929 BspViewCell *viewCell = dynamic_cast<BspLeaf *>(node)->mViewCell; … … 1934 1933 viewCell->Mail(); 1935 1934 1936 ++ stat.viewCells;1935 ++ vcStat.viewCells; 1937 1936 const int pvsSize = viewCell->GetPvs().GetSize(); 1938 1937 1939 stat.pvs += pvsSize;1938 vcStat.pvs += pvsSize; 1940 1939 1941 1940 if (pvsSize < 1) 1942 ++ stat.emptyPvs;1943 1944 if (pvsSize > stat.maxPvs)1945 stat.maxPvs = pvsSize;1946 1947 if (pvsSize < stat.minPvs)1948 stat.minPvs = pvsSize;1949 1950 if ((int)viewCell->mBspLeaves.size() > stat.maxBspLeaves)1951 stat.maxBspLeaves = (int)viewCell->mBspLeaves.size();1941 ++ vcStat.emptyPvs; 1942 1943 if (pvsSize > vcStat.maxPvs) 1944 vcStat.maxPvs = pvsSize; 1945 1946 if (pvsSize < vcStat.minPvs) 1947 vcStat.minPvs = pvsSize; 1948 1949 if ((int)viewCell->mBspLeaves.size() > vcStat.maxLeaves) 1950 vcStat.maxLeaves = (int)viewCell->mBspLeaves.size(); 1952 1951 } 1953 1952 } … … 2412 2411 } 2413 2412 2414 void BspViewCellsStatistics::Print(ostream &app) const2415 {2416 app << "===== BspViewCells statistics ===============\n";2417 2418 app << setprecision(4);2419 2420 //app << "#N_CTIME ( Construction time [s] )\n" << Time() << " \n";2421 2422 app << "#N_OVERALLPVS ( objects in PVS )\n" << pvs << endl;2423 2424 app << "#N_PMAXPVS ( largest PVS )\n" << maxPvs << endl;2425 2426 app << "#N_PMINPVS ( smallest PVS )\n" << minPvs << endl;2427 2428 app << "#N_PAVGPVS ( average PVS )\n" << AvgPvs() << endl;2429 2430 app << "#N_PEMPTYPVS ( view cells with PVS smaller 2 )\n" << emptyPvs << endl;2431 2432 app << "#N_VIEWCELLS ( number of view cells)\n" << viewCells << endl;2433 2434 app << "#N_AVGBSPLEAVES (average number of BSP leaves per view cell )\n" << AvgBspLeaves() << endl;2435 2436 app << "#N_MAXBSPLEAVES ( maximal number of BSP leaves per view cell )\n" << maxBspLeaves << endl;2437 2438 app << "===== END OF BspViewCells statistics ==========\n";2439 }2440 2413 2441 2414 /*************************************************************/
Note: See TracChangeset
for help on using the changeset viewer.