- Timestamp:
- 04/28/06 19:49:56 (19 years ago)
- Location:
- GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/LBBC
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/LBBC/LBBCBillboardViewMode.h
r821 r861 16 16 epsilonX = 0.0; 17 17 epsilonY = 0.0; 18 factor = 1.0 / 255.0;18 factor = 0.125; 19 19 } 20 20 … … 35 35 virtual bool processUnbufferedKeyInput(const Ogre::FrameEvent& evt) 36 36 { 37 if (mInputDevice->isKeyDown(Ogre::KC_ 1))38 { 39 epsilonX = epsilonX + factor;40 } 41 42 if (mInputDevice->isKeyDown(Ogre::KC_ 2))43 { 44 epsilonX = epsilonX - factor;45 } 46 47 if (mInputDevice->isKeyDown(Ogre::KC_ 3))48 { 49 epsilonY = epsilonY + factor;37 if (mInputDevice->isKeyDown(Ogre::KC_RIGHT)) 38 { 39 epsilonX = epsilonX + (factor * evt.timeSinceLastFrame); 40 } 41 42 if (mInputDevice->isKeyDown(Ogre::KC_LEFT)) 43 { 44 epsilonX = epsilonX - (factor * evt.timeSinceLastFrame); 45 } 46 47 if (mInputDevice->isKeyDown(Ogre::KC_UP)) 48 { 49 epsilonY = epsilonY + (factor * evt.timeSinceLastFrame); 50 50 } 51 51 52 if (mInputDevice->isKeyDown(Ogre::KC_ 4))53 { 54 epsilonY = epsilonY - factor;52 if (mInputDevice->isKeyDown(Ogre::KC_DOWN)) 53 { 54 epsilonY = epsilonY - (factor * evt.timeSinceLastFrame); 55 55 } 56 56 57 57 mFragParams = mBillboardCloudEntity->getSubEntity(0)->getMaterial()->getBestTechnique()->getPass(0)->getFragmentProgramParameters(); 58 58 59 mFragParams->setNamedConstant("epsilonX", epsilonX); 59 60 mFragParams->setNamedConstant("epsilonY", epsilonY); … … 71 72 } 72 73 74 ///* Move camera forward by keypress. */ 75 //if (mInputDevice->isKeyDown(Ogre::KC_UP) || mInputDevice->isKeyDown(Ogre::KC_W) ) 76 //{ 77 // mTranslateVector.z = -mMoveScale; 78 //} 79 80 ///* Move camera backward by keypress. */ 81 //if (mInputDevice->isKeyDown(Ogre::KC_DOWN) || mInputDevice->isKeyDown(Ogre::KC_S) ) 82 //{ 83 // mTranslateVector.z = mMoveScale; 84 //} 85 73 86 /* Move camera forward by keypress. */ 74 if (mInputDevice->isKeyDown(Ogre::KC_ UP) || mInputDevice->isKeyDown(Ogre::KC_W) )87 if (mInputDevice->isKeyDown(Ogre::KC_W) ) 75 88 { 76 89 mTranslateVector.z = -mMoveScale; … … 78 91 79 92 /* Move camera backward by keypress. */ 80 if (mInputDevice->isKeyDown(Ogre::KC_ DOWN) || mInputDevice->isKeyDown(Ogre::KC_S) )93 if (mInputDevice->isKeyDown(Ogre::KC_S) ) 81 94 { 82 95 mTranslateVector.z = mMoveScale; … … 95 108 } 96 109 97 if (mInputDevice->isKeyDown(Ogre::KC_RIGHT))98 {99 mCamera->yaw(-mRotScale);100 }101 102 if (mInputDevice->isKeyDown(Ogre::KC_LEFT))103 {104 mCamera->yaw(mRotScale);105 }110 //if (mInputDevice->isKeyDown(Ogre::KC_RIGHT)) 111 //{ 112 // mCamera->yaw(-mRotScale); 113 //} 114 // 115 //if (mInputDevice->isKeyDown(Ogre::KC_LEFT)) 116 //{ 117 // mCamera->yaw(mRotScale); 118 //} 106 119 107 120 // see if switching is on, and you want to toggle … … 186 199 mWindow->setDebugText("P: " + Ogre::StringConverter::toString(mCamera->getDerivedPosition()) + " " + 187 200 "O: " + Ogre::StringConverter::toString(mCamera->getDerivedOrientation())); 188 } 201 } 189 202 190 203 // Return true to continue rendering … … 201 214 202 215 Ogre::SceneNode* sNode = mSceneMgr->getRootSceneNode()->createChildSceneNode(); 203 //mBillboardCloudEntity = mSceneMgr->createEntity(mBillboardCloudMeshName, mBillboardCloudMeshName);204 mBillboardCloudEntity = mSceneMgr->createEntity("chestnutLeavesBillboardCloudGrouped.mesh", "chestnutLeavesBillboardCloudGrouped.mesh");216 mBillboardCloudEntity = mSceneMgr->createEntity(mBillboardCloudMeshName, mBillboardCloudMeshName); 217 //mBillboardCloudEntity = mSceneMgr->createEntity("chestnutLeavesBillboardCloudGrouped.mesh", "chestnutLeavesBillboardCloudGrouped.mesh"); 205 218 //mBillboardCloudEntity = mSceneMgr->createEntity("mapleLeavesBillboardCloudGrouped.mesh", "mapleLeavesBillboardCloudGrouped.mesh"); 206 219 //mBillboardCloudEntity = mSceneMgr->createEntity("prunusLeavesBillboardCloudGrouped.mesh", "prunusLeavesBillboardCloudGrouped.mesh"); 207 220 sNode->attachObject(mBillboardCloudEntity); 208 sNode->rotate(Ogre::Vector3::UNIT_X, Ogre::Radian(Ogre::Degree(-90.0)));221 //sNode->rotate(Ogre::Vector3::UNIT_X, Ogre::Radian(Ogre::Degree(-90.0))); 209 222 } 210 223 -
GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/LBBC/LBBCClusterViewMode.h
r821 r861 38 38 39 39 Ogre::SceneNode* sNode = mSceneMgr->getRootSceneNode()->createChildSceneNode(); 40 //Ogre::Entity* eLeafClustersGrouped = mSceneMgr->createEntity(mEntityClustersMeshName, mEntityClustersMeshName);41 Ogre::Entity* eLeafClustersGrouped = mSceneMgr->createEntity("chestnutLeafClustersGrouped.mesh", "chestnutLeafClustersGrouped.mesh");40 Ogre::Entity* eLeafClustersGrouped = mSceneMgr->createEntity(mEntityClustersMeshName, mEntityClustersMeshName); 41 //Ogre::Entity* eLeafClustersGrouped = mSceneMgr->createEntity("chestnutLeafClustersGrouped.mesh", "chestnutLeafClustersGrouped.mesh"); 42 42 //Ogre::Entity* eLeafClustersGrouped = mSceneMgr->createEntity("mapleLeafClustersGrouped.mesh", "mapleLeafClustersGrouped.mesh"); 43 43 //Ogre::Entity* eLeafClustersGrouped = mSceneMgr->createEntity("prunusLeafClustersGrouped.mesh", "prunusLeafClustersGrouped.mesh"); 44 44 sNode->attachObject(eLeafClustersGrouped); 45 sNode->rotate(Ogre::Vector3::UNIT_X, Ogre::Radian(Ogre::Degree(-90.0)));45 //sNode->rotate(Ogre::Vector3::UNIT_X, Ogre::Radian(Ogre::Degree(-90.0))); 46 46 } 47 47 protected:
Note: See TracChangeset
for help on using the changeset viewer.