Changeset 2705 for GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
- Timestamp:
- 05/24/08 11:59:35 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
r2702 r2705 1445 1445 1446 1446 1447 float ViewCellsManager::ComputeRenderCost( const int tri, constint obj) //const1447 float ViewCellsManager::ComputeRenderCost(int tri, int obj) //const 1448 1448 { 1449 1449 return max((float)tri * mTriangleWeight, (float)obj * mObjectWeight); … … 2374 2374 { 2375 2375 #ifdef USE_VERBOSE_PVS 2376 KdIntersectable *kdObj = static_cast<KdIntersectable *>(obj); 2377 2378 const AxisAlignedBox3 box = kdObj->GetBox(); 2376 const AxisAlignedBox3 box = obj->GetBox(); 2379 2377 const float dist = Distance(vc->GetBox().Center(), box.Center()); 2380 2378 … … 2431 2429 //hasAbsContribution = viewCell->GetPvs().AddSample(obj,ray.mPdf); 2432 2430 2433 //if (hasAbsContribution) UpdateStatsForViewCell(viewCell, obj); 2434 2431 if (hasAbsContribution) 2432 { 2433 if (QT_VISUALIZATION_SHOWN) 2434 { 2435 int numTriangles; 2436 2437 if (obj->Type() == Intersectable::KD_INTERSECTABLE) 2438 { 2439 numTriangles = GetPreprocessor()->mKdTree->GetNumObjects(static_cast<KdIntersectable *>(obj)->GetItem()); 2440 } 2441 else if (obj->Type() == Intersectable::SCENEGRAPHLEAF_INTERSECTABLE) 2442 { 2443 numTriangles = static_cast<SceneGraphLeafIntersectable *>(obj)->GetItem()->mGeometry.size(); 2444 } 2445 2446 UpdateStatsForViewCell(viewCell, obj, numTriangles); 2447 } 2448 } 2435 2449 } 2436 2450 else
Note: See TracChangeset
for help on using the changeset viewer.