Changeset 605 for trunk/VUT/GtpVisibilityPreprocessor/src/ViewCell.cpp
- Timestamp:
- 02/08/06 15:05:04 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/ViewCell.cpp
r604 r605 160 160 161 161 162 void ViewCell::UpdateViewCellsStats(ViewCellsStatistics &vcStat)163 {164 ++ vcStat.viewCells;165 166 const int pvsSize = mPvs.GetSize();167 168 vcStat.pvs += pvsSize;169 170 if (pvsSize == 0)171 ++ vcStat.emptyPvs;172 173 if (pvsSize > vcStat.maxPvs)174 vcStat.maxPvs = pvsSize;175 176 if (pvsSize < vcStat.minPvs)177 vcStat.minPvs = pvsSize;178 179 if (!mValid)180 ++ vcStat.invalid;181 }182 183 184 162 float ViewCell::GetArea() const 185 163 { … … 477 455 mViewCellsManager->GetPvsStatistics(pvsStats); 478 456 479 static float expectedValue = pvsStats.avgPvs;457 //static float expectedValue = pvsStats.avgPvs; 480 458 481 459 // the current view cells are kept in this container … … 521 499 522 500 mStats << "#Pass\n" << pass << endl 523 << "#Merged\n" << mergeStats.merged << endl 524 << "#Viewcells\n" << realNumActiveViewCells << endl 525 << "#RenderCostIncrease\n" << 0 << endl 526 << "#TotalRenderCost\n" << totalRenderCost << endl 527 << "#CurrentPvs\n" << 0 << endl 528 << "#ExpectedCost\n" << realExpectedCost << endl 529 << "#AvgRenderCost\n" << realAvgRenderCost << endl 530 << "#Deviation\n" << mDeviation << endl 531 << "#TotalPvs\n" << totalPvs << endl 532 << "#PvsSizeDecrease\n" << 0 << endl 533 << "#Volume\n" << 0 << endl 534 << "#Dummy\n" << 0 << endl; 501 << "#Merged\n" << mergeStats.merged << endl 502 << "#Viewcells\n" << realNumActiveViewCells << endl 503 << "#RenderCostIncrease\n" << 0 << endl 504 << "#TotalRenderCost\n" << totalRenderCost << endl 505 << "#CurrentPvs\n" << 0 << endl 506 << "#ExpectedCost\n" << realExpectedCost << endl 507 << "#AvgRenderCost\n" << realAvgRenderCost << endl 508 << "#Deviation\n" << mDeviation << endl 509 << "#TotalPvs\n" << totalPvs << endl 510 << "#PvsSizeDecrease\n" << 0 << endl 511 << "#Volume\n" << endl; 535 512 536 513 //-- use priority queue to merge leaf pairs … … 584 561 } 585 562 586 #ifdef _DEBUG587 Debug << "abs mergecost: " << mMergeQueue.top().GetMergeCost() <<588 << " rel mergecost: " << mMergeQueue.top().GetRenderCost() / mExpectedCost <<589 << " max ratio: " << mMergeMaxCostRatio << endl590 << " expected value: " << realExpectedCost << endl;591 #endif592 563 593 564 … … 637 608 ++ mergeStats.siblings; 638 609 #endif 639 //if (((mergeStats.merged % statsOut) == 0) ||640 //(realNumActiveViewCells == mMergeMinViewCells))641 //{610 if (((mergeStats.merged % statsOut) == 0) || 611 (realNumActiveViewCells == mMergeMinViewCells)) 612 { 642 613 cout << "merged " << mergeStats.merged << " view cells" << endl; 643 614 … … 646 617 << "#Merged\n" << mergeStats.merged << endl 647 618 << "#Viewcells\n" << realNumActiveViewCells << endl 648 619 << "#RenderCostIncrease\n" << renderCostIncr << endl 649 620 << "#TotalRenderCost\n" << totalRenderCost << endl 650 621 << "#CurrentPvs\n" << mergedVc->GetPvs().GetSize() << endl 651 << "#ExpectedCost\n" << realExpectedCost / (float) realNumActiveViewCells<< endl622 << "#ExpectedCost\n" << realExpectedCost << endl 652 623 << "#AvgRenderCost\n" << realAvgRenderCost << endl 653 624 << "#Deviation\n" << mDeviation << endl 654 625 << "#TotalPvs\n" << totalPvs << endl 655 626 << "#PvsSizeDecrease\n" << -pvsDiff << endl 656 << "#Volume\n" << mergedVc->GetVolume() << endl 657 << "#Dummy\n" << (float)mergedVc->GetPvs().GetSize() * mergedVc->GetVolume() / mViewCellsManager->GetViewSpaceBox().GetVolume() << endl; 658 // } 627 << "#Volume\n" << mergedVc->GetVolume() << endl; 628 } 659 629 } 660 630 else … … 1489 1459 tstack.push(vc); 1490 1460 1491 Debug << "current size: " << pvsSize << endl;1492 1493 1461 while (!tstack.empty()) 1494 1462 { … … 1563 1531 return vc; 1564 1532 } 1533 1534 1535 1536 void ViewCellsTree::UpdateViewCellsStats(ViewCell *vc, ViewCellsStatistics &vcStat) 1537 { 1538 ++ vcStat.viewCells; 1539 1540 const int pvsSize = GetPvsSize(vc); 1541 1542 vcStat.pvs += pvsSize; 1543 1544 if (pvsSize == 0) 1545 ++ vcStat.emptyPvs; 1546 1547 if (pvsSize > vcStat.maxPvs) 1548 vcStat.maxPvs = pvsSize; 1549 1550 if (pvsSize < vcStat.minPvs) 1551 vcStat.minPvs = pvsSize; 1552 1553 if (!vc->GetValid()) 1554 ++ vcStat.invalid; 1555 } 1556 1565 1557 1566 1558 … … 1643 1635 1644 1636 1637 1645 1638 /************************************************************************/ 1646 1639 /* MergeStatistics implementation */
Note: See TracChangeset
for help on using the changeset viewer.