Changeset 143 for trunk/VUT/work
- Timestamp:
- 06/21/05 18:14:30 (20 years ago)
- Location:
- trunk/VUT/work/TestCullingTerrain
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/work/TestCullingTerrain/TerrainFrameListener.cpp
r141 r143 353 353 } 354 354 //----------------------------------------------------------------------- 355 void TerrainFrameListener::ApplyVisibilityQuery(bool fromPoint, bool relativeVisibility)355 void TerrainFrameListener::ApplyVisibilityQuery(bool fromPoint, bool projectedPixels) 356 356 { 357 357 InfoContainer<GtpVisibility::NodeInfo> visibleNodes; … … 362 362 mVisibilityManager->GetQueryManager()-> 363 363 ComputeFromPointVisibility(mCamNode->getPosition(), &visibleNodes, 364 &visibleGeometry, relativeVisibility);364 &visibleGeometry, projectedPixels); 365 365 } 366 366 else 367 367 { 368 368 mVisibilityManager->GetQueryManager()->ComputeCameraVisibility(*mCamera, 369 &visibleNodes, &visibleGeometry, relativeVisibility);369 &visibleNodes, &visibleGeometry, projectedPixels); 370 370 } 371 371 … … 377 377 for (geomIt = visibleGeometry.begin(); geomIt != geomIt_end; ++geomIt) 378 378 { 379 averageGeometryVis += (*geomIt).GetVisib ility();380 381 std::stringstream d; d << "Geometry visibility: " << (*geomIt).GetVisib ility();379 averageGeometryVis += (*geomIt).GetVisiblePixels(); 380 381 std::stringstream d; d << "Geometry visibility: " << (*geomIt).GetVisiblePixels(); 382 382 LogManager::getSingleton().logMessage(d.str()); 383 383 } … … 387 387 for (nodesIt = visibleNodes.begin(); nodesIt != nodesIt_end; ++nodesIt) 388 388 { 389 averageNodeVis += (*nodesIt).GetVisib ility();390 391 std::stringstream d; d << "Node visibility: " << (*nodesIt).GetVisib ility();389 averageNodeVis += (*nodesIt).GetVisiblePixels(); 390 391 std::stringstream d; d << "Node visibility: " << (*nodesIt).GetVisiblePixels(); 392 392 LogManager::getSingleton().logMessage(d.str()); 393 393 } … … 405 405 //-- visibility queries stats 406 406 int idx = fromPoint ? 1 : 0; 407 idx += relativeVisibility? 2 : 0;407 idx += projectedPixels ? 2 : 0; 408 408 409 409 sprintf(str, ": %s", queryTypeCaptions[idx].c_str()); -
trunk/VUT/work/TestCullingTerrain/TerrainFrameListener.h
r139 r143 117 117 and their visibility information. 118 118 @param fromnPoint if query should be from point or from camera 119 @param relativeVisibilityif query should return number of visible pixels or the ratio119 @param projectedPixels if query should return number of visible pixels or the ratio 120 120 visible pixels / projected pixels. 121 121 */ 122 void ApplyVisibilityQuery(bool fromPoint, bool relativeVisibility);122 void ApplyVisibilityQuery(bool fromPoint, bool projectedPixels); 123 123 124 124 void toggleShowQueryStats();
Note: See TracChangeset
for help on using the changeset viewer.