Changeset 1555 for GTP/trunk/App/Demos/Geom/Demo_LodStrips
- Timestamp:
- 10/02/06 19:19:32 (18 years ago)
- Location:
- GTP/trunk/App/Demos/Geom/Demo_LodStrips
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Geom/Demo_LodStrips/main.cpp
r1542 r1555 19 19 // Distance values 20 20 #define dist_min 1100 21 #define dist_max 2 00021 #define dist_max 2500 22 22 23 23 // Model name … … 158 158 mTranslateVector.x = mMoveScale; 159 159 160 /* if (mInputDevice->isKeyDown(Ogre::KC_K)) 161 mCamera->setDetailLevel(SDL_WIREFRAME);*/ 162 160 163 161 164 if(mInputDevice->isKeyDown(Ogre::KC_LEFT)) … … 164 167 if(mInputDevice->isKeyDown(Ogre::KC_RIGHT)) 165 168 mCamera->yaw(-mRotScale); 166 167 // Move the cam168 /* if(mInputDevice->isKeyDown(Ogre::KC_W))169 node->translate(0,mMoveScale,0);170 171 if(mInputDevice->isKeyDown(Ogre::KC_S))172 node->translate(0,-mMoveScale,0);173 174 if(mInputDevice->isKeyDown(Ogre::KC_Z))175 node->scale(1.01,1.01,1.01);176 177 if(mInputDevice->isKeyDown(Ogre::KC_X))178 node->scale(0.99,0.99,0.99);179 180 // Rotate181 if(mInputDevice->isKeyDown(Ogre::KC_A))182 node->yaw(mRotScale);183 184 if(mInputDevice->isKeyDown(Ogre::KC_D))185 node->yaw(-mRotScale);*/186 169 187 170 if(mInputDevice->isKeyDown(Ogre::KC_ESCAPE)) 188 171 { 189 172 delete myStrips; 190 191 173 delete [] mat; 192 193 174 return false; 194 175 } … … 242 223 243 224 theCam = mCamera; 244 theCam->setPosition(0, -100,dist_min-600.0f);225 theCam->setPosition(0,50,dist_min-600.0f); 245 226 // Set ambient light 246 227 mSceneMgr->setAmbientLight(ColourValue(0.3, 0.3, 0.3)); … … 257 238 SceneNode* myRootNode = mSceneMgr->getRootSceneNode()->createChildSceneNode(); 258 239 259 260 pEnt = mSceneMgr->createEntity( "PoolFloor", "PoolFloor.mesh" ); 240 // Define a floor plane mesh 241 Plane plane( Vector3::UNIT_Y, 0 ); 242 243 MeshManager::getSingleton().createPlane("ground", 244 ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, plane, 245 4000,4000,6,6,true,1,10,10,Vector3::UNIT_Z); 246 247 Entity* groundEntity = mSceneMgr->createEntity( "GroundEntity", "ground" ); 248 mSceneMgr->getRootSceneNode()->createChildSceneNode()->attachObject(groundEntity); 249 250 groundEntity->setMaterialName("RockTerrain"); 251 groundEntity->setCastShadows(false); 252 253 254 /* pEnt = mSceneMgr->createEntity( "PoolFloor", "PoolFloor.mesh" ); 261 255 myRootNode->attachObject(pEnt); 262 myRootNode->scale(6.0,6.0,6.0); 256 myRootNode->scale(6.0,6.0,6.0);*/ 263 257 264 258 std::string model_file=model_name; … … 267 261 //Models 268 262 entity = mSceneMgr->createEntity(model_name, "../../../OgreStuff/media/GT/ogrolod.mesh"); 269 270 263 ogreMesh = entity->getMesh().getPointer(); 271 264 … … 303 296 float randomsepx = (float)((rand()%18)-9); 304 297 float randomsepy = (float)((rand()%12)-6); 305 auxnode->translate(i*70.0f+randomsepx, -150.0f,-j*70.0f-randomsepx);298 auxnode->translate(i*70.0f+randomsepx,0.0f,-j*70.0f-randomsepx); 306 299 auxen->setNormaliseNormals(true); 307 300 }
Note: See TracChangeset
for help on using the changeset viewer.