Ignore:
Timestamp:
05/25/05 18:28:46 (19 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/VUT/work/TestCullingTerrain/TestCullingTerrainApplication.cpp

    r111 r112  
    9393        // Set ambient light 
    9494        //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)); 
    9696 
    9797        //-- create light 
     
    9999        mSunLight->setType(Light::LT_DIRECTIONAL); 
    100100        //mSunLight->setType(Light::LT_SPOTLIGHT); 
     101        //mSunLight->setSpotlightRange(Degree(30), Degree(50)); 
     102 
    101103    mSunLight->setPosition(707, 2000, 500); 
    102104        mSunLight->setCastShadows(true); 
    103105 
    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); 
    107107        dir.normalise(); 
    108         mSunLight->setDirection(Vector3::NEGATIVE_UNIT_Y); 
     108        mSunLight->setDirection(dir); 
     109        //mSunLight->setDirection(Vector3::NEGATIVE_UNIT_Y); 
    109110 
    110111        mSunLight->setDiffuseColour(1, 1, 1); 
     
    130131        setupGui(); 
    131132 
    132         //mSceneMgr->setShadowTechnique(SHADOWTYPE_NONE); 
    133  
    134133        // Floor plane 
    135         Plane plane; 
     134        /*Plane plane; 
    136135        plane.normal = Vector3::UNIT_Y; 
    137136        plane.d = -60; 
     
    142141        pPlaneEnt->setMaterialName("Examples/Rockwall"); 
    143142        pPlaneEnt->setCastShadows(true); 
    144         mSceneMgr->getRootSceneNode()->createChildSceneNode()->attachObject(pPlaneEnt); 
     143        mSceneMgr->getRootSceneNode()->createChildSceneNode()->attachObject(pPlaneEnt);*/ 
    145144 
    146145        if (mRoot->getRenderSystem()->getCapabilities()->hasCapability(RSC_HWRENDER_TO_TEXTURE)) 
     
    154153                mSceneMgr->setShadowTextureSettings(512, 2); 
    155154        } 
    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); 
    158158 
    159159 
     
    175175 
    176176                // 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"); 
    179179                //      mTerrainContentGenerator->GenerateScene(500, "ninja"); 
    180180        } 
     
    245245mRecord(false), 
    246246mTimeElapsed(0), 
    247 mUseShadows(false) 
     247mUseShadows(false), 
     248mVisualizeCulledNodes(false) 
    248249{ 
    249250        // Reduce move speed 
     
    704705{ 
    705706        mShowVisualization = !mShowVisualization; 
     707        mVisualizeCulledNodes = !mVisualizeCulledNodes; 
    706708 
    707709        // create viewport with priority VIZ_VIEWPORT_Z_ORDER:  
     
    718720        mVizCamera->setAspectRatio(Real(vizvp->getActualWidth()) /  
    719721                        Real(vizvp->getActualHeight())); 
     722                 
     723                mSceneMgr->setOption("VisualizeCulledNodes", &mVisualizeCulledNodes); 
    720724                //vizvp->setClearEveryFrame(false); 
    721725 
     
    732736        { 
    733737                mWindow->removeViewport(VIZ_VIEWPORT_Z_ORDER); 
    734                 // if octree was enabled for visualization purpose 
     738                // if octree was enabled for visualization purpose, reset now 
    735739                mSceneMgr->setOption("ShowOctree", &mShowOctree); 
    736740        } 
Note: See TracChangeset for help on using the changeset viewer.