- Timestamp:
- 05/25/05 18:28:46 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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 }
Note: See TracChangeset
for help on using the changeset viewer.