Changeset 103 for trunk/VUT/work
- Timestamp:
- 05/18/05 02:06:32 (20 years ago)
- Location:
- trunk/VUT/work
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/work/TestCulling/TestCullingApplication.cpp
r100 r103 57 57 58 58 // Create a skybox 59 //mSceneMgr->setSkyBox(true, "Examples/CloudyNoonSkyBox", 1000, false);59 //mSceneMgr->setSkyBox(true, "Examples/CloudyNoonSkyBox", 2000, false); 60 60 ColourValue fadeColour(0.1, 0.1, 0.6); 61 61 mWindow->getViewport(0)->setBackgroundColour(fadeColour); -
trunk/VUT/work/TestCullingTerrain/TestCullingTerrainApplication.cpp
r100 r103 38 38 { 39 39 // create the camera 40 mCamera = mSceneMgr->createCamera(" CullCamera");40 mCamera = mSceneMgr->createCamera("PlayerCam"); 41 41 42 42 /** set a nice viewpoint … … 108 108 109 109 // Create a skybox 110 mSceneMgr->setSkyBox(true, "Examples/SpaceSkyBox", 7000, false); 111 //mSceneMgr->setSkyDome( true, "Examples/CloudySky", 5, 8, 500, false ); 112 110 mSceneMgr->setSkyBox(true, "Examples/SpaceSkyBox", 5000, false); 111 113 112 std::string terrain_cfg("terrain.cfg"); 114 113 #if OGRE_PLATFORM == OGRE_PLATFORM_APPLE … … 127 126 128 127 mTerrainContentGenerator = new TerrainContentGenerator(mSceneMgr); 128 mTerrainContentGenerator->SetMaxPos(Vector3(3000.0f, 5000.0f, 3000.0f)); 129 130 mTerrainContentGenerator->GenerateScene(1500, "robot.mesh"); 129 131 // mTerrainContentGenerator->GenerateScene(500, "ninja.mesh"); 130 mTerrainContentGenerator->SetMaxPos(Vector3(3000.0f, 5000.0f, 3000.0f));131 mTerrainContentGenerator->GenerateScene(1500, "robot.mesh");132 132 133 133 // no limitations needed anymore: the user can set … … 188 188 mVizCamera(vizCamera), 189 189 mShowVisualization(false), 190 mRenderNodesForViz(false), 190 191 mVizCameraHeight(Real(2500.0)), 191 192 mCamNode(camNode), 192 mCullCamera( true)193 mCullCamera(false) 193 194 { 194 195 // Reduce move speed … … 235 236 mSceneMgr->setOption("ShowOctree", &mShowOctree); 236 237 mSceneMgr->setOption("CullCamera", &mCullCamera); 237 238 pOver->show(); 238 mSceneMgr->setOption("ShowVisualization", &mShowVisualization); 239 mSceneMgr->setOption("RenderNodesForViz", &mRenderNodesForViz); 240 241 pOver->show(); 239 242 } 240 243 //----------------------------------------------------------------------- … … 327 330 // important for visualization => draw octree bounding boxes 328 331 mSceneMgr->setOption("ShowOctree", &mShowVisualization); 332 // also render geometry? 333 mSceneMgr->setOption("RenderNodesForViz", &mRenderNodesForViz); 329 334 330 335 // -- setup visualization camera … … 370 375 371 376 KEY_PRESSED(KC_O, 0.3, toggleUseOptimization()); 372 KEY_PRESSED(KC_ E, 0.3, toggleShowOctree());377 KEY_PRESSED(KC_T, 0.3, toggleShowOctree()); 373 378 KEY_PRESSED(KC_C, 0.3, toggleUseVisibilityCulling()); 374 KEY_PRESSED(KC_V, 0.3, toggleShowViz()); 379 KEY_PRESSED(KC_1, 0.3, toggleShowViz()); 380 KEY_PRESSED(KC_2, 0.3, toggleRenderNodesForViz()); 375 381 376 382 if (!mShowVisualization) … … 505 511 { 506 512 Viewport *vizvp = mWindow->addViewport(mVizCamera, 507 VIZ_VIEWPORT_Z_ORDER, 0.6, 0 , 0.4, 0.4);513 VIZ_VIEWPORT_Z_ORDER, 0.6, 0.6, 0.4, 0.4); 508 514 509 515 vizvp->setBackgroundColour(ColourValue(0.0, 0.3, 0.2, 1)); … … 513 519 mVizCamera->setAspectRatio(Real(vizvp->getActualWidth()) / 514 520 Real(vizvp->getActualHeight())); 515 516 521 //vizvp->setClearEveryFrame(false); 517 522 … … 520 525 plane.d = 1000; 521 526 plane.normal = Vector3::UNIT_Y; 522 mSceneMgr->setSkyPlane( true, plane, "Examples/ MyTransparentTest", 4000, 75, true);*/523 527 mSceneMgr->setSkyPlane( true, plane, "Examples/Rockwall", 4000, 75, false); 528 */ 524 529 } 525 530 else … … 529 534 mSceneMgr->setOption("ShowOctree", &mShowOctree); 530 535 } 536 } 537 //----------------------------------------------------------------------- 538 void MouseQueryListener::toggleRenderNodesForViz() 539 { 540 mRenderNodesForViz = !mRenderNodesForViz; 541 542 mSceneMgr->setOption("RenderNodesForViz", &mRenderNodesForViz); 531 543 } 532 544 //----------------------------------------------------------------------- -
trunk/VUT/work/TestCullingTerrain/TestCullingTerrainApplication.h
r100 r103 84 84 void toggleUseVisibilityCulling(); 85 85 void toggleShowViz(); 86 void toggleRenderNodesForViz(); 86 87 void zoomVizCamera(int zoom); 87 88 void moveCamera(); … … 120 121 bool mUseVisibilityCulling; 121 122 bool mShowVisualization; 123 bool mRenderNodesForViz; 122 124 bool mCullCamera; 123 125 -
trunk/VUT/work/ogre_changes/Plugins/OctreeSceneManager/include/OgreOctreeSceneManager.h
r61 r103 110 110 @param cam current camera 111 111 */ 112 void _renderOctant(Camera* cam, Octree *octree );112 void _renderOctant(Camera* cam, Octree *octree, bool onlyShadowCasters); 113 113 #endif // GTP_VISIBILITY_MODIFIED_OGRE 114 114 -
trunk/VUT/work/ogre_changes/Plugins/OctreeSceneManager/src/OgreOctreeSceneManager.cpp
r99 r103 1168 1168 #ifdef GTP_VISIBILITY_MODIFIED_OGRE 1169 1169 //----------------------------------------------------------------------- 1170 void OctreeSceneManager::_renderOctant(Camera *cam, Octree *octant )1170 void OctreeSceneManager::_renderOctant(Camera *cam, Octree *octant, bool onlyShadowCasters) 1171 1171 { 1172 1172 //Add stuff to be rendered; … … 1182 1182 if (cam->isVisible(sn->_getWorldAABB())) 1183 1183 { 1184 sn->_addToRenderQueue(cam, getRenderQueue(), false);1184 sn->_addToRenderQueue(cam, getRenderQueue(), onlyShadowCasters); 1185 1185 //node->_findVisibleObjects(cam, getRenderQueue(), false, mDisplayNodes, false); 1186 1186 mVisible.push_back(sn); … … 1203 1203 { 1204 1204 getRenderQueue()->addRenderable(octant->getWireBoundingBox()); 1205 ++mNumObjects;1205 mBoxes.push_back(octant->getWireBoundingBox()); 1206 1206 } 1207 1207
Note: See TracChangeset
for help on using the changeset viewer.