Changeset 112 for trunk/VUT/work
- Timestamp:
- 05/25/05 18:28:46 (20 years ago)
- Location:
- trunk/VUT/work
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/work/TestCulling/TestCullingApplication.cpp
r111 r112 113 113 mUseVisibilityCulling(true), 114 114 mUseOptimization(true), 115 mShowVisualization(false) 115 mShowVisualization(false), 116 mVisualizeCulledNodes(false) 116 117 { 117 118 // Reduce move speed … … 293 294 294 295 mSceneMgr->setOption("ShowVisualization", &mShowVisualization); 296 mSceneMgr->setOption("VisualizeCulledNodes", &mVisualizeCulledNodes); 295 297 } 296 298 //----------------------------------------------------------------------- -
trunk/VUT/work/TestCulling/TestCullingApplication.h
r107 r112 97 97 bool mShowVisualization; 98 98 99 bool mVisualizeCulledNodes; 100 99 101 Camera *mVizCamera; 100 102 }; -
trunk/VUT/work/TestCullingTerrain/TestCullingTerrainApplication.cpp
r111 r112 93 93 // Set ambient light 94 94 //mSceneMgr->setAmbientLight(ColourValue(0.5, 0.5, 0.5)); 95 mSceneMgr->setAmbientLight(ColourValue(0. 0, 0.0, 0.0));95 mSceneMgr->setAmbientLight(ColourValue(0.5, 0.5, 0.5)); 96 96 97 97 //-- create light … … 99 99 mSunLight->setType(Light::LT_DIRECTIONAL); 100 100 //mSunLight->setType(Light::LT_SPOTLIGHT); 101 //mSunLight->setSpotlightRange(Degree(30), Degree(50)); 102 101 103 mSunLight->setPosition(707, 2000, 500); 102 104 mSunLight->setCastShadows(true); 103 105 104 //mSunLight->setSpotlightRange(Degree(30), Degree(50)); 105 106 Vector3 dir(0.5, 0.1, 0.5); 106 Vector3 dir(0.5, 0.5, 0.5); 107 107 dir.normalise(); 108 mSunLight->setDirection(Vector3::NEGATIVE_UNIT_Y); 108 mSunLight->setDirection(dir); 109 //mSunLight->setDirection(Vector3::NEGATIVE_UNIT_Y); 109 110 110 111 mSunLight->setDiffuseColour(1, 1, 1); … … 130 131 setupGui(); 131 132 132 //mSceneMgr->setShadowTechnique(SHADOWTYPE_NONE);133 134 133 // Floor plane 135 Plane plane;134 /*Plane plane; 136 135 plane.normal = Vector3::UNIT_Y; 137 136 plane.d = -60; … … 142 141 pPlaneEnt->setMaterialName("Examples/Rockwall"); 143 142 pPlaneEnt->setCastShadows(true); 144 mSceneMgr->getRootSceneNode()->createChildSceneNode()->attachObject(pPlaneEnt); 143 mSceneMgr->getRootSceneNode()->createChildSceneNode()->attachObject(pPlaneEnt);*/ 145 144 146 145 if (mRoot->getRenderSystem()->getCapabilities()->hasCapability(RSC_HWRENDER_TO_TEXTURE)) … … 154 153 mSceneMgr->setShadowTextureSettings(512, 2); 155 154 } 156 mSceneMgr->setShadowColour(ColourValue(0, 0, 0)); 157 // mSceneMgr->setShowDebugShadows(true); 155 //mSceneMgr->setShadowColour(ColourValue(0, 0, 0)); 156 mSceneMgr->setShadowColour(ColourValue(0.5, 0.5, 0.5)); 157 // mSceneMgr->setShowDebugShadows(true); 158 158 159 159 … … 175 175 176 176 // the objects are generated on the whole terrain 177 mTerrainContentGenerator->GenerateScene(1500, "athene");178 //mTerrainContentGenerator->GenerateScene(1500, "robot");177 //mTerrainContentGenerator->GenerateScene(1500, "athene"); 178 mTerrainContentGenerator->GenerateScene(1500, "robot"); 179 179 // mTerrainContentGenerator->GenerateScene(500, "ninja"); 180 180 } … … 245 245 mRecord(false), 246 246 mTimeElapsed(0), 247 mUseShadows(false) 247 mUseShadows(false), 248 mVisualizeCulledNodes(false) 248 249 { 249 250 // Reduce move speed … … 704 705 { 705 706 mShowVisualization = !mShowVisualization; 707 mVisualizeCulledNodes = !mVisualizeCulledNodes; 706 708 707 709 // create viewport with priority VIZ_VIEWPORT_Z_ORDER: … … 718 720 mVizCamera->setAspectRatio(Real(vizvp->getActualWidth()) / 719 721 Real(vizvp->getActualHeight())); 722 723 mSceneMgr->setOption("VisualizeCulledNodes", &mVisualizeCulledNodes); 720 724 //vizvp->setClearEveryFrame(false); 721 725 … … 732 736 { 733 737 mWindow->removeViewport(VIZ_VIEWPORT_Z_ORDER); 734 // if octree was enabled for visualization purpose 738 // if octree was enabled for visualization purpose, reset now 735 739 mSceneMgr->setOption("ShowOctree", &mShowOctree); 736 740 } -
trunk/VUT/work/TestCullingTerrain/TestCullingTerrainApplication.h
r111 r112 165 165 Real mTimeElapsed; 166 166 bool mUseShadows; 167 168 bool mVisualizeCulledNodes; 167 169 }; 168 170 -
trunk/VUT/work/ogre_changes/Plugins/OctreeSceneManager/include/OgreOctreeSceneManager.h
r103 r112 111 111 */ 112 112 void _renderOctant(Camera* cam, Octree *octree, bool onlyShadowCasters); 113 114 /** Returns stored list of boxes */ 115 BoxList *getBoxes(); 113 116 #endif // GTP_VISIBILITY_MODIFIED_OGRE 114 117 -
trunk/VUT/work/ogre_changes/Plugins/OctreeSceneManager/src/OgreOctreeSceneManager.cpp
r103 r112 1167 1167 } 1168 1168 #ifdef GTP_VISIBILITY_MODIFIED_OGRE 1169 //----------------------------------------------------------------------- 1170 BoxList *OctreeSceneManager::getBoxes() 1171 { 1172 return &mBoxes; 1173 } 1169 1174 //----------------------------------------------------------------------- 1170 1175 void OctreeSceneManager::_renderOctant(Camera *cam, Octree *octant, bool onlyShadowCasters)
Note: See TracChangeset
for help on using the changeset viewer.