- Timestamp:
- 01/27/06 16:27:22 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellsManager.cpp
r577 r579 356 356 357 357 358 void ViewCellsManager::EvaluateRenderStatistics(float &totalRenderCost, 359 float &expectedRenderCost, 360 float &variance) 361 { 362 ViewCellContainer::const_iterator it, it_end = mViewCells.end(); 363 364 //-- compute expected value 365 366 totalRenderCost = 0; 367 368 for (it = mViewCells.begin(); it != it_end; ++ it) 369 { 370 ViewCell *vc = *it; 371 372 totalRenderCost += vc->GetPvs().GetSize() * vc->GetVolume(); 373 } 374 375 expectedRenderCost = totalRenderCost / (float)mViewCells.size(); 376 377 378 //-- compute variance 379 380 variance = 0; 381 382 for (it = mViewCells.begin(); it != it_end; ++ it) 383 { 384 ViewCell *vc = *it; 385 386 float renderCost = vc->GetPvs().GetSize() * vc->GetVolume(); 387 388 const float var = (expectedRenderCost - renderCost) * (expectedRenderCost - renderCost); 389 390 variance += var; 391 } 392 393 variance /= (float)mViewCells.size(); 394 } 395 396 397 358 398 void ViewCellsManager::AddViewCell(ViewCell *viewCell) 359 399 {
Note: See TracChangeset
for help on using the changeset viewer.