Changeset 1124 for GTP/trunk/App/Demos
- Timestamp:
- 07/12/06 13:55:02 (18 years ago)
- 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 235 235 236 236 theCam = mCamera; 237 theCam->setPosition(0,20,dist_max+50);237 theCam->setPosition(0,20,dist_min-40); 238 238 // 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)); 241 240 242 241 // Create a directional light 243 /*Light* l = mSceneMgr->createLight("MainLight");242 Light* l = mSceneMgr->createLight("MainLight"); 244 243 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); 247 245 248 246 // Define a floor plane mesh … … 298 296 sprintf(newTreeName,"arbol_%d_%d",i,j); 299 297 Ogre::SceneNode * auxnode = mSceneMgr->getRootSceneNode()->createChildSceneNode(); 300 auxnode->attachObject( entity->clone(newTreeName) ); 298 Ogre::Entity *auxent = entity->clone(newTreeName); 299 auxnode->attachObject( auxent ); 301 300 auxnode->scale(4.0f,4.0f,4.0f); 302 301 auxnode->rotate(Ogre::Vector3(0,0,1),Ogre::Degree(rand()%360)); … … 305 304 float randomsepy = (float)((rand()%12)-6); 306 305 auxnode->translate(i*30.0f+randomsepx,0.0f,-j*30.0f-randomsepx); 306 auxent->setNormaliseNormals(true); 307 307 } 308 308
Note: See TracChangeset
for help on using the changeset viewer.