Changeset 2145 for GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE
- Timestamp:
- 02/20/07 15:37:34 (18 years ago)
- Location:
- GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE/TerrainFrameListener.cpp
r2121 r2145 162 162 mViewCellsLoaded(false), 163 163 mUseVisibilityFilter(false), 164 mFloorDist(2) 164 mFloorDist(2), 165 mFlushQueue(false) 165 166 { 166 167 //mInputDevice = PlatformManager::getSingleton().createInputReader(); … … 261 262 setTestGeometryForVisibleLeaves(mTestGeometryForVisibleLeaves); 262 263 263 mSceneMgr->setOption("UseDepthPass", &mUseDepthPass); 264 264 //mSceneMgr->setOption("UseDepthPass", &mUseDepthPass); 265 mSceneMgr->getOption("UseDepthPass", &mUseDepthPass); 266 267 if (mUseDepthPass) 268 mUseDepthPassInfo->setCaption(": true"); 269 else 270 mUseDepthPassInfo->setCaption(": false"); 271 272 mSceneMgr->getOption("FlushQueue", &mFlushQueue); 273 274 if (mFlushQueue) 275 LogManager::getSingleton().logMessage("initial setting: flushing queue"); 276 else 277 LogManager::getSingleton().logMessage("initial setting: not flushing queue"); 278 265 279 mSceneMgr->setOption("ShowOctree", &mShowOctree); 266 280 mSceneMgr->setOption("ShowViewCells", &mShowViewCells); … … 1289 1303 } 1290 1304 //----------------------------------------------------------------------- 1305 void TerrainFrameListener::toggleFlushQueue() 1306 { 1307 mFlushQueue = !mFlushQueue; 1308 1309 mSceneMgr->setOption("FlushQueue", &mFlushQueue); 1310 1311 if (mFlushQueue) 1312 { 1313 LogManager::getSingleton().logMessage("flushing queue"); 1314 //mFlushQueueInfo->setCaption(": true"); 1315 } 1316 else 1317 { 1318 LogManager::getSingleton().logMessage("not flushing queue"); 1319 //mFlushQueueInfo->setCaption(": false"); 1320 } 1321 } 1322 1323 //----------------------------------------------------------------------- 1291 1324 void TerrainFrameListener::toggleShowViz() 1292 1325 { … … 1363 1396 switch(e->getKey()) 1364 1397 { 1398 1399 case KC_SUBTRACT: 1400 changeThreshold(-10); 1401 break; 1402 case KC_ADD: 1403 changeThreshold(10); 1404 break; 1405 1365 1406 case KC_ESCAPE: 1366 1407 mShutdownRequested = true; … … 1371 1412 nextAlgorithm(); 1372 1413 break; 1373 1374 case KC_F: 1375 nextFilter(); 1376 break; 1377 case KC_R: 1378 nextSceneDetailLevel(); 1379 break; 1380 case KC_P: 1381 toggleDisplayCameraDetails(); 1382 break; 1383 case KC_G: 1384 mTestGeometryForVisibleLeaves = !mTestGeometryForVisibleLeaves; 1385 setTestGeometryForVisibleLeaves(mTestGeometryForVisibleLeaves); 1386 break; 1387 case KC_T: 1388 toggleShowOctree(); 1389 break; 1390 case KC_X: 1391 toggleUseDepthPass(); 1392 break; 1393 case KC_H: 1394 toggleShowShadows(); 1395 break; 1396 1397 case KC_I: 1398 mUseItemBuffer = !mUseItemBuffer; 1399 break; 1400 case KC_Z: 1401 mCamNode->resetOrientation(); 1402 break; 1403 case KC_U: 1404 mCamNode->resetOrientation(); 1405 mCamNode->setPosition(mApplication->mInitialPosition); 1406 break; 1414 1415 case KC_LSHIFT: 1416 mShiftPressed = true; 1417 break; 1418 case KC_DELETE: 1419 mDeleteObjects = true; 1420 break; 1421 1407 1422 case KC_C: 1408 1423 if (mItemBufferMode != GtpVisibility::QueryManager::GEOMETRY_VISIBILITY) … … 1415 1430 } 1416 1431 break; 1417 1418 case KC_SUBTRACT: 1419 changeThreshold(-10); 1420 break; 1421 case KC_ADD: 1422 changeThreshold(10); 1423 break; 1432 case KC_E: // hack for recording demo using precomputed fps 1433 mSavePrecomputedFps = !mSavePrecomputedFps; 1434 break; 1435 1436 case KC_F: 1437 nextFilter(); 1438 break; 1439 case KC_G: 1440 mTestGeometryForVisibleLeaves = !mTestGeometryForVisibleLeaves; 1441 setTestGeometryForVisibleLeaves(mTestGeometryForVisibleLeaves); 1442 break; 1443 case KC_H: 1444 toggleShowShadows(); 1445 break; 1446 case KC_L: 1447 toggleShowViewCells(); 1448 break; 1449 case KC_M: // hack for recording demo using precomputed fps 1450 mRecordDemo = !mRecordDemo; 1451 break; 1452 case KC_O: 1453 switchMouseMode(); 1454 break; 1455 case KC_P: 1456 toggleDisplayCameraDetails(); 1457 break; 1458 case KC_V: 1459 toggleUseViewCells(); 1460 break; 1461 case KC_Q: 1462 toggleUseVisibilityFilter(); 1463 break; 1464 case KC_R: 1465 nextSceneDetailLevel(); 1466 break; 1467 case KC_T: 1468 toggleShowOctree(); 1469 break; 1470 case KC_U: 1471 mCamNode->resetOrientation(); 1472 mCamNode->setPosition(mApplication->mInitialPosition); 1473 break; 1474 case KC_X: 1475 toggleUseDepthPass(); 1476 break; 1477 case KC_I: 1478 toggleFlushQueue(); 1479 break; 1480 case KC_Z: 1481 mCamNode->resetOrientation(); 1482 break; 1483 1424 1484 1425 1485 /////////////// 1426 1486 //-- visualization 1487 1427 1488 case KC_1: 1428 1489 toggleShowViz(); … … 1431 1492 nextNodeVizMode(); 1432 1493 break; 1433 1494 case KC_7: 1495 mTerrainContentGenerator->WriteObjects(objects_out_filename); 1496 break; 1497 case KC_8: 1498 changeAssumedVisibility(-5); 1499 // changeAssumedVisibility(-500); 1500 break; 1501 case KC_9: 1502 changeAssumedVisibility(5); 1503 // changeAssumedVisibility(500); 1504 break; 1505 1506 //#if USE_PERFHUD 1507 case KC_F1: 1508 toggleShowHelp(); 1509 break; 1434 1510 case KC_F2: 1435 1511 mStatsOn = !mStatsOn; … … 1441 1517 case KC_F4: 1442 1518 toggleRecord(); 1443 break;1444 //#if USE_PERFHUD1445 case KC_F1:1446 toggleShowHelp();1447 1519 break; 1448 1520 … … 1477 1549 takeScreenshot(); 1478 1550 break; 1479 case KC_7: 1480 mTerrainContentGenerator->WriteObjects(objects_out_filename); 1481 break; 1482 case KC_8: 1483 changeAssumedVisibility(-5); 1484 // changeAssumedVisibility(-500); 1485 break; 1486 case KC_9: 1487 changeAssumedVisibility(5); 1488 // changeAssumedVisibility(500); 1489 break; 1490 case KC_LSHIFT: 1491 mShiftPressed = true; 1492 break; 1493 case KC_DELETE: 1494 mDeleteObjects = true; 1495 break; 1496 case KC_M: // hack for recording demo using precomputed fps 1497 mRecordDemo = !mRecordDemo; 1498 break; 1499 case KC_E: // hack for recording demo using precomputed fps 1500 mSavePrecomputedFps = !mSavePrecomputedFps; 1501 break; 1502 case KC_O: 1503 switchMouseMode(); 1504 break; 1505 case KC_V: 1506 toggleUseViewCells(); 1507 break; 1508 case KC_L: 1509 toggleShowViewCells(); 1510 break; 1511 case KC_Q: 1512 toggleUseVisibilityFilter(); 1513 break; 1551 1552 1514 1553 //KEY_PRESSED(KC_F3, 0.3, writeFrames()); 1515 1554 //KEY_PRESSED(KC_F4, 0.3, loadFrames()); -
GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE/TerrainFrameListener.h
r2108 r2145 225 225 */ 226 226 void toggleUseDepthPass(); 227 228 void toggleFlushQueue(); 229 227 230 /** Toggles whether the visualization is shown. 228 231 */ 229 232 void toggleShowViz(); 233 230 234 /** Toggles whether the frames are recorded. 231 235 */ … … 360 364 bool mShowViewCells; 361 365 bool mUseDepthPass; 366 bool mFlushQueue; 362 367 bool mShowVisualization; 363 368 bool mCullCamera;
Note: See TracChangeset
for help on using the changeset viewer.