Ignore:
Timestamp:
04/28/06 19:49:56 (18 years ago)
Author:
igarcia
Message:
 
Location:
GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/IBRBillboardCloudTreeFrameListener.h

    r721 r861  
    1111 
    1212public: 
    13         IBRBillboardCloudTreeFrameListener(Ogre::RenderWindow *win, bool useBufferedInputKeys = false, bool useBufferedInputMouse = false) 
    14         : OgreFrameListener(win, useBufferedInputKeys, useBufferedInputMouse) 
    15     { 
    16     } 
     13        IBRBillboardCloudTreeFrameListener(Ogre::RenderWindow *win, bool useBufferedInputKeys = false, bool useBufferedInputMouse = false); 
    1714 
    18         ~IBRBillboardCloudTreeFrameListener()         
    19     { 
    20     } 
     15        ~IBRBillboardCloudTreeFrameListener();         
    2116 
    22         bool frameStarted(const Ogre::FrameEvent& evt) 
    23     { 
    24         // Call default 
    25         return OgreFrameListener::frameStarted(evt);         
    26     } 
     17        bool frameStarted(const Ogre::FrameEvent& evt); 
     18 
     19        bool processUnbufferedKeyInput(const Ogre::FrameEvent& evt); 
    2720 
    2821}; 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/LBBC/LBBCBillboardViewMode.h

    r821 r861  
    1616                        epsilonX = 0.0; 
    1717                        epsilonY = 0.0; 
    18                         factor = 1.0 / 255.0; 
     18                        factor = 0.125; 
    1919                } 
    2020 
     
    3535                virtual bool processUnbufferedKeyInput(const Ogre::FrameEvent& evt) 
    3636                {                        
    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); 
    5050                        } 
    5151                         
    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); 
    5555                        } 
    5656 
    5757                        mFragParams = mBillboardCloudEntity->getSubEntity(0)->getMaterial()->getBestTechnique()->getPass(0)->getFragmentProgramParameters(); 
     58 
    5859                        mFragParams->setNamedConstant("epsilonX", epsilonX); 
    5960                        mFragParams->setNamedConstant("epsilonY", epsilonY); 
     
    7172                        } 
    7273 
     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 
    7386                        /* Move camera forward by keypress. */ 
    74                         if (mInputDevice->isKeyDown(Ogre::KC_UP) || mInputDevice->isKeyDown(Ogre::KC_W) ) 
     87                        if (mInputDevice->isKeyDown(Ogre::KC_W) ) 
    7588                        { 
    7689                                mTranslateVector.z = -mMoveScale; 
     
    7891 
    7992                        /* Move camera backward by keypress. */ 
    80                         if (mInputDevice->isKeyDown(Ogre::KC_DOWN) || mInputDevice->isKeyDown(Ogre::KC_S) ) 
     93                        if (mInputDevice->isKeyDown(Ogre::KC_S) ) 
    8194                        { 
    8295                                mTranslateVector.z = mMoveScale; 
     
    95108                        } 
    96109 
    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                        //} 
    106119 
    107120                        // see if switching is on, and you want to toggle  
     
    186199                                mWindow->setDebugText("P: " + Ogre::StringConverter::toString(mCamera->getDerivedPosition()) + " " +  
    187200                                        "O: " + Ogre::StringConverter::toString(mCamera->getDerivedOrientation())); 
    188                         } 
     201                        }                        
    189202 
    190203                        // Return true to continue rendering 
     
    201214 
    202215                        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"); 
    205218                        //mBillboardCloudEntity = mSceneMgr->createEntity("mapleLeavesBillboardCloudGrouped.mesh", "mapleLeavesBillboardCloudGrouped.mesh");             
    206219                        //mBillboardCloudEntity = mSceneMgr->createEntity("prunusLeavesBillboardCloudGrouped.mesh", "prunusLeavesBillboardCloudGrouped.mesh");           
    207220                        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))); 
    209222                } 
    210223 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/LBBC/LBBCClusterViewMode.h

    r821 r861  
    3838 
    3939                        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");                                                          
    4242                        //Ogre::Entity* eLeafClustersGrouped = mSceneMgr->createEntity("mapleLeafClustersGrouped.mesh", "mapleLeafClustersGrouped.mesh");                                                                
    4343                        //Ogre::Entity* eLeafClustersGrouped = mSceneMgr->createEntity("prunusLeafClustersGrouped.mesh", "prunusLeafClustersGrouped.mesh");                                                              
    4444                        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))); 
    4646                } 
    4747        protected: 
Note: See TracChangeset for help on using the changeset viewer.