Changeset 110 for trunk/VUT/Ogre


Ignore:
Timestamp:
05/24/05 07:21:00 (19 years ago)
Author:
mattausch
Message:
 
Location:
trunk/VUT/Ogre
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/VUT/Ogre/include/OgreTerrainContentGenerator.h

    r107 r110  
    3737                const Vector3 &rotation, const String &objName); 
    3838         
    39         /** maximum height where objects can be put into the terrain */ 
    40         //void SetMaxHeight(Real maxHeight); 
     39        /** offset which is added to objects when put into the terrain */ 
     40        void SetOffset(Real offset); 
    4141         
    4242        RayQueryExecutor *GetRayQueryExecutor(); 
     
    4444protected: 
    4545        RayQueryExecutor *mRayQueryExecutor; 
    46         //Real mMaxHeight; 
     46        Real mOffset; 
    4747}; 
    4848 
  • trunk/VUT/Ogre/src/OgreSceneContentGenerator.cpp

    r107 r110  
    8686{ 
    8787        Matrix3 mat; 
    88         mat.FromEulerAnglesXYZ(Degree(rotation.x),//.valueRadians(),  
     88        mat.FromEulerAnglesYXZ(Degree(rotation.x),//.valueRadians(),  
    8989                                                   Degree(rotation.y),//.valueRadians(),  
    9090                                                   Degree(rotation.z));//.valueRadians()); 
  • trunk/VUT/Ogre/src/OgreTerrainContentGenerator.cpp

    r107 r110  
    5151//----------------------------------------------------------------------- 
    5252TerrainContentGenerator::TerrainContentGenerator(SceneManager *sm): 
    53 SceneContentGenerator(sm)//, mMaxHeight(50) 
     53SceneContentGenerator(sm), mOffset(0) 
    5454{ 
    5555        mMinPos = Vector3(0.0f, MAX_HEIGHT, 0.0f); 
     
    7676        if (mRayQueryExecutor->executeRayQuery(&queryResult, position, Vector3::NEGATIVE_UNIT_Y)) 
    7777        { 
     78                queryResult.y += mOffset; 
    7879                // reject if height is too high 
    7980                if (queryResult.y < mMaxPos.y) 
     
    9192} 
    9293//----------------------------------------------------------------------- 
    93 /*void TerrainContentGenerator::SetMaxHeight(Real maxHeight) 
     94void TerrainContentGenerator::SetOffset(Real offset) 
    9495{ 
    95         mMaxHeight = maxHeight; 
    96 }*/ 
     96        mOffset = offset; 
     97} 
    9798 
    9899} // namespace Ogre 
Note: See TracChangeset for help on using the changeset viewer.