Changeset 2413 for GTP/trunk/App/Demos/Illum/Ogre
- Timestamp:
- 06/05/07 17:00:24 (18 years ago)
- Location:
- GTP/trunk/App/Demos/Illum/Ogre/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Illum/Ogre/src/Common/src/FPSPlayer.cpp
r2411 r2413 106 106 meshNode->setScale(meshscale, meshscale, meshscale); 107 107 if(rotateModel) 108 meshNode->rotate(Vector3::UNIT_Y, Degree(180.0)); 109 meshNode->_updateBounds(); 108 meshNode->rotate(Vector3::UNIT_Y, Degree(180.0)); 110 109 } 111 110 -
GTP/trunk/App/Demos/Illum/Ogre/src/Moria/include/Moria.h
r2411 r2413 34 34 FPSPlayer* gFPSPlayer; 35 35 36 bool PP_glowON = true; 37 bool PP_tonemapON = true; 38 bool PP_dofON = true; 39 40 float lightpower = 32.0; 36 41 // Listener class for frame updates 37 42 class MoriaDemoFrameListener : public ExampleFrameListener … … 72 77 73 78 74 //sysNode->setPosition(mCamera->getPosition() - Vector3(0,1.5,0));79 sysNode->setPosition(mCamera->getPosition() - Vector3(0,1.5,0)); 75 80 76 81 return ExampleFrameListener::frameStarted(evt); … … 80 85 { 81 86 gFPSPlayer->processKeyInputs(mInputDevice); 82 /* 83 static float lastTime = 0; 84 static Timer* t = Root::getSingleton().getTimer(); 85 float thisTime = (float) t->getMilliseconds() / 1000.0f; 86 float dt = thisTime-lastTime; 87 lastTime = thisTime; 88 89 90 if (mInputDevice->isKeyDown(KC_SPACE)) { 91 92 if(throwSphere == 0) 93 { 94 throwSphere = NXScene->createBody("throwSphere", 95 "sphere.mesh", 96 new SphereShape(0.5f), 97 Vector3(0,0,0), 98 "mass: 10"); 99 throwSphere->getNode()->setScale(0.005,0.005,0.005); 100 } 101 //myCube-> 102 throwSphere->setGlobalPosition(mCamera->getPosition()); 103 throwSphere->addForce(mCamera->getDirection()*200); 104 105 }*/ 106 87 88 if (mInputDevice->isKeyDown(KC_ADD) && mTimeUntilNextToggle <= 0) 89 { 90 lightpower *= 1.2; 91 light->setPowerScale(lightpower); 92 mTimeUntilNextToggle = 1; 93 } 94 if (mInputDevice->isKeyDown(KC_SUBTRACT) && mTimeUntilNextToggle <= 0) 95 { 96 lightpower /= 1.2; 97 light->setPowerScale(lightpower); 98 mTimeUntilNextToggle = 1; 99 } 100 if (mInputDevice->isKeyDown(KC_3) && mTimeUntilNextToggle <= 0) 101 { 102 PP_glowON = !PP_glowON; 103 CompositorManager::getSingleton().setCompositorEnabled(mWindow->getViewport(0), 104 "GTP/PostProc/Glow", PP_glowON); 105 mTimeUntilNextToggle = 1; 106 } 107 if (mInputDevice->isKeyDown(KC_4) && mTimeUntilNextToggle <= 0) 108 { 109 PP_tonemapON = !PP_tonemapON; 110 111 CompositorManager::getSingleton().setCompositorEnabled(mWindow->getViewport(0), 112 "GTP/PostProc/ToneMap", PP_tonemapON); 113 114 mTimeUntilNextToggle = 1; 115 } 116 if (mInputDevice->isKeyDown(KC_5) && mTimeUntilNextToggle <= 0) 117 { 118 PP_dofON = !PP_dofON; 119 CompositorManager::getSingleton().setCompositorEnabled(mWindow->getViewport(0), 120 "GTP/Moria/PostProc/DoF", PP_dofON); 121 mTimeUntilNextToggle = 1; 122 } 123 107 124 108 125 // return ExampleFrameListener::processUnbufferedKeyInput(evt); … … 310 327 PlayerCharacter::frameListenerPriority = 20; 311 328 gFPSPlayer = new FPSPlayer(NXScene, mSceneMgr, Vector3(0.5, 1.8, 0.3), Vector3(5, 10, 15), 1.6, mCamera, false); 312 //gFPSPlayer->addPlayerMesh("FPSarm.mesh", 0.02, true);313 //gFPSPlayer->addWeaponModel("sword.mesh", "joint28");314 329 gFPSPlayer->addPlayerMesh("FPSarm.mesh", 0.02, true); 330 gFPSPlayer->addWeaponModel("sword.mesh", "joint28"); 331 /* 315 332 PlayerCharacter* troll = new PlayerCharacter("troll1", NXScene, mSceneMgr, Vector3(1.5, 3.0, 1.2), Vector3(5, 10, 5), false); 316 333 troll->addPlayerMesh("troll.mesh", 0.05, false); … … 329 346 b->setCharacterCollisionGroup(NX_CHARACTER_COL_GROUP_PUSHABLE); 330 347 } 331 332 /*ParticleSystem* pSys1 = mSceneMgr->createParticleSystem("psys1", "MoriaDust");348 */ 349 ParticleSystem* pSys1 = mSceneMgr->createParticleSystem("psys1", "MoriaDust"); 333 350 pSys1->setKeepParticlesInLocalSpace(true); 334 351 pSysNode = rootNode->createChildSceneNode("psys1"); 335 352 pSysNode->attachObject(pSys1); 336 pSysNode->setPosition(0,0,0); */353 pSysNode->setPosition(0,0,0); 337 354 338 355
Note: See TracChangeset
for help on using the changeset viewer.