Changeset 1609


Ignore:
Timestamp:
10/11/06 05:35:05 (18 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE/TerrainFrameListener.cpp

    r1607 r1609  
    13861386                mUseItemBuffer = !mUseItemBuffer; 
    13871387                break; 
    1388  
     1388        case KC_Z: 
     1389                mCamNode->resetOrientation(); 
     1390                break; 
     1391        case KC_U: 
     1392                mCamNode->resetOrientation(); 
     1393                mCamNode->setPosition(mApplication->mInitialPosition); 
     1394                break; 
    13891395        case KC_C: 
    13901396                if (mItemBufferMode != GtpVisibility::QueryManager::GEOMETRY_VISIBILITY) 
     
    15511557        const frame_info old_frame = mFrameInfo[mCurrentFrame - 1]; 
    15521558                 
     1559        ///////////// 
    15531560        //-- interpolate frames 
    15541561        Real factor = 1; 
     
    16141621    if (mInputDevice->isKeyDown(KC_RIGHT)) 
    16151622    { 
    1616         mCamNode->yaw(-mRotScale); 
     1623        mCamNode->yaw(-mRotScale, Ogre::Node::TS_WORLD); 
    16171624                cursorPressed = true; 
    16181625    } 
  • GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE/TestCullingTerrainApplication.cpp

    r1607 r1609  
    202202        } 
    203203 
    204         Vector3 v = Vector3::UNIT_SCALE; 
     204        mInitialPosition = Vector3::UNIT_SCALE; 
    205205 
    206206        val = config.getSetting("ViewX"); 
    207207 
    208208        if (!val.empty()) 
    209                 v.x = atof( val.c_str() ); 
     209                mInitialPosition.x = atof( val.c_str() ); 
    210210 
    211211        val = config.getSetting("ViewY"); 
    212212         
    213213        if (!val.empty()) 
    214                 v.y = atof(val.c_str()); 
     214                mInitialPosition.y = atof(val.c_str()); 
    215215 
    216216        val = config.getSetting("ViewZ"); 
    217217         
    218218        if (!val.empty()) 
    219                 v.z = atof( val.c_str()); 
     219                mInitialPosition.z = atof( val.c_str()); 
    220220 
    221221 
     
    256256         
    257257        // set camera position accordingly 
    258         mCamNode->setPosition(v); 
     258        mCamNode->setPosition(mInitialPosition); 
    259259} 
    260260//----------------------------------------------------------------------- 
  • GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE/TestCullingTerrainApplication.h

    r1607 r1609  
    150150        int mAlgorithm; 
    151151 
     152        Vector3 mInitialPosition; 
    152153 
    153154protected: 
    154155 
     156        //////////////// 
    155157        //-- inherited from ExampleApplication 
     158 
    156159        bool setup(); 
    157160        void createScene(); 
Note: See TracChangeset for help on using the changeset viewer.