Changeset 141 for trunk/VUT/work
- Timestamp:
- 06/21/05 11:18:09 (20 years ago)
- Location:
- trunk/VUT/work
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/work/TestCullingTerrain/TerrainFrameListener.cpp
r140 r141 373 373 float averageGeometryVis = 0; 374 374 375 for (int i=0; i < visibleGeometry.size(); ++i) 376 { 377 averageGeometryVis += visibleGeometry[i].GetVisibility(); 378 379 std::stringstream d; d << "Geometry visibility: " << visibleGeometry[i].GetVisibility(); 375 InfoContainer<GtpVisibility::MeshInfo>::iterator geomIt, geomIt_end = visibleGeometry.end(); 376 377 for (geomIt = visibleGeometry.begin(); geomIt != geomIt_end; ++geomIt) 378 { 379 averageGeometryVis += (*geomIt).GetVisibility(); 380 381 std::stringstream d; d << "Geometry visibility: " << (*geomIt).GetVisibility(); 380 382 LogManager::getSingleton().logMessage(d.str()); 381 383 } 382 for (int i=0; i < visibleNodes.size(); ++i) 383 { 384 averageNodeVis += visibleNodes[i].GetVisibility(); 385 386 std::stringstream d; d << "Node visibility: " << visibleNodes[i].GetVisibility(); 384 385 InfoContainer<GtpVisibility::NodeInfo>::iterator nodesIt, nodesIt_end = visibleNodes.end(); 386 387 for (nodesIt = visibleNodes.begin(); nodesIt != nodesIt_end; ++nodesIt) 388 { 389 averageNodeVis += (*nodesIt).GetVisibility(); 390 391 std::stringstream d; d << "Node visibility: " << (*nodesIt).GetVisibility(); 387 392 LogManager::getSingleton().logMessage(d.str()); 388 393 } 389 394 390 averageNodeVis /= (float)visibleNodes.size(); 391 averageGeometryVis /= (float)visibleGeometry.size(); 395 if ((int)visibleNodes.size()) 396 averageNodeVis /= (float)visibleNodes.size(); 397 if ((int)visibleGeometry.size()) 398 averageGeometryVis /= (float)visibleGeometry.size(); 392 399 393 400 char str[100]; … … 437 444 Vector3(camPos.x, 5000.0f, camPos.z), Vector3::NEGATIVE_UNIT_Y)) 438 445 { 439 const int overTerrain = 200;440 mCamNode->setPosition(camPos.x, queryResult.y + overTerrain, camPos.z);446 const int terrainOffs = 10; 447 mCamNode->setPosition(camPos.x, queryResult.y + terrainOffs, camPos.z); 441 448 } 442 449 }
Note: See TracChangeset
for help on using the changeset viewer.