Changeset 1124


Ignore:
Timestamp:
07/12/06 13:55:02 (18 years ago)
Author:
gumbau
Message:

Lighting set up

Location:
GTP/trunk/App/Demos/Geom/Demo_LodTrees
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Geom/Demo_LodTrees/main.cpp

    r1116 r1124  
    235235                 
    236236        theCam = mCamera; 
    237         theCam->setPosition(0,20,dist_max+50); 
     237                theCam->setPosition(0,20,dist_min-40); 
    238238        // Set ambient light 
    239 //        mSceneMgr->setAmbientLight(ColourValue(0.3, 0.3, 0.3)); 
    240                 mSceneMgr->setAmbientLight(ColourValue(1.0, 1.0, 1.0)); 
     239        mSceneMgr->setAmbientLight(ColourValue(0.4, 0.4, 0.4)); 
    241240 
    242241        // Create a directional light 
    243 /*              Light* l = mSceneMgr->createLight("MainLight"); 
     242                Light* l = mSceneMgr->createLight("MainLight"); 
    244243                l->setType(Light::LT_DIRECTIONAL); 
    245         l->setDirection(0.0,-1.0,0.0);*/ 
    246         //      l->setAttenuation(1000000.0f, 1.0f, 1.0f, 1.0f); 
     244        l->setDirection(0.0,-1.0,0.0); 
    247245         
    248246        // Define a floor plane mesh 
     
    298296                                sprintf(newTreeName,"arbol_%d_%d",i,j); 
    299297                                Ogre::SceneNode * auxnode = mSceneMgr->getRootSceneNode()->createChildSceneNode(); 
    300                                 auxnode->attachObject( entity->clone(newTreeName) ); 
     298                                Ogre::Entity *auxent = entity->clone(newTreeName); 
     299                                auxnode->attachObject( auxent ); 
    301300                                auxnode->scale(4.0f,4.0f,4.0f); 
    302301                                auxnode->rotate(Ogre::Vector3(0,0,1),Ogre::Degree(rand()%360)); 
     
    305304                                float randomsepy = (float)((rand()%12)-6); 
    306305                                auxnode->translate(i*30.0f+randomsepx,0.0f,-j*30.0f-randomsepx); 
     306                                auxent->setNormaliseNormals(true); 
    307307                        } 
    308308 
Note: See TracChangeset for help on using the changeset viewer.