Changeset 2359
- Timestamp:
- 05/09/07 10:23:23 (18 years ago)
- Location:
- GTP/trunk/App/Demos/Vis
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE/TerrainFrameListener.cpp
r2352 r2359 487 487 //-- set parameters for visualization 488 488 489 // important for visualization => draw octree bounding boxes 490 if (0) mSceneMgr->setOption("ShowOctree", &mShowVisualization); 489 // draw octree bounding boxes because 490 // interesting for chc visualization 491 if (mNodeVizMode != NODEVIZ_RENDER_PVS) 492 { 493 mSceneMgr->setOption("ShowOctree", &mShowVisualization); 494 } 491 495 492 496 /////////////// … … 506 510 -mCamera->getDerivedDirection().z)); 507 511 508 const float moveFactor = 200;509 // move by a constant so view plane is on bottom of viewport 512 // move by a constant so view plane is on "bottom" of viewport 513 const float moveFactor = 1000; 510 514 mVizCamera->moveRelative(Vector3(0, moveFactor, 0)); 511 515 } … … 1107 1111 if (pureRenderTime) 1108 1112 { 1109 mPureRenderTimeFps = 1000.0 / (float) pureRenderTime;1113 mPureRenderTimeFps = 1000.0f / (float) pureRenderTime; 1110 1114 } 1111 1115 currentFps = mPureRenderRenderTimeFps; … … 1392 1396 mNodeVizMode = (mNodeVizMode + 1) % NODEVIZ_MODES_NUM; 1393 1397 1394 bool renderNodesForViz = (mNodeVizMode == NODEVIZ_RENDER_NODES) || 1398 bool renderNodesForViz = 1399 (mNodeVizMode == NODEVIZ_RENDER_NODES) || 1395 1400 (mNodeVizMode == NODEVIZ_RENDER_NODES_AND_CONTENT); 1401 1396 1402 bool renderNodesContentForViz = (mNodeVizMode == NODEVIZ_RENDER_NODES_AND_CONTENT); 1397 1403 //bool renderNodesContentForViz = mNodeVizMode == NODEVIZ_RENDER_GEOMETRY; 1398 1404 1405 bool renderPvsForViz = (mNodeVizMode == NODEVIZ_RENDER_PVS); 1406 1399 1407 mSceneMgr->setOption("RenderNodesForViz", &renderNodesForViz); 1400 1408 mSceneMgr->setOption("RenderNodesContentForViz", &renderNodesContentForViz); 1409 mSceneMgr->setOption("RenderPvsForViz", &renderPvsForViz); 1401 1410 } 1402 1411 //----------------------------------------------------------------------- -
GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE/TerrainFrameListener.h
r2352 r2359 164 164 // visualization modes for scene nodes 165 165 enum { 166 NODEVIZ_NONE, 167 NODEVIZ_RENDER_NODES, 168 NODEVIZ_RENDER_NODES_AND_CONTENT, 166 NODEVIZ_NONE, 167 NODEVIZ_RENDER_NODES, 168 NODEVIZ_RENDER_NODES_AND_CONTENT, 169 NODEVIZ_RENDER_PVS, 169 170 NODEVIZ_MODES_NUM}; 170 171 -
GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE/TestCullingTerrainApplication.cpp
r2353 r2359 419 419 mSunLight->setSpecularColour(1, 1, 1); 420 420 421 //-- Fog 422 423 // NB it's VERY important to set this before calling setWorldGeometry 421 // it's VERY important to set fog before calling setWorldGeometry 424 422 // because the vertex program picked will be different 425 423 ColourValue fadeColour(0.93, 0.86, 0.76); … … 474 472 { 475 473 // the objects are generated randomly distributed over the terrain 476 if (1) generateScene( 500, 0); // create robots477 if (0) generateScene( 300, 1); // create ninjas478 if ( 0) generateScene(1000, 2); // create trees474 if (1) generateScene(1000, 0); // create robots 475 if (0) generateScene(100, 1); // create ninjas 476 if (1) generateScene(500, 2); // create trees 479 477 } 480 478 int MaxDepth=30; … … 649 647 // place on the ground object 650 648 if (success) 651 mCamNode->setPosition( 652 mCamNode->getPosition().x, 653 minVal + dist, 654 mCamNode->getPosition().z); 649 { 650 mCamNode->setPosition(mCamNode->getPosition().x, 651 minVal + dist, 652 mCamNode->getPosition().z); 653 } 655 654 656 655 OGRE_DELETE(raySceneQuery); 656 657 657 return success; 658 658 } -
GTP/trunk/App/Demos/Vis/KdTreeDemo/OGRE/src/TestKdTreeAppListener.cpp
r1516 r2359 512 512 (nodeVizMode == NODEVIZ_RENDER_NODES_AND_CONTENT); 513 513 bool renderNodesContentForViz = (nodeVizMode == NODEVIZ_RENDER_NODES_AND_CONTENT); 514 bool renderPvsForViz = nodeVizMode == NODEVIZ_RENDER_PVS; 514 515 515 516 mSceneMgr->setOption("RenderNodesForViz", &renderNodesForViz); 516 517 mSceneMgr->setOption("RenderNodesContentForViz", &renderNodesContentForViz); 518 mSceneMgr->setOption("RenderPvsForViz", &renderPvs); 519 517 520 } 518 521 else
Note: See TracChangeset
for help on using the changeset viewer.