#pragma once #include <Ogre.h> using namespace Ogre; class CTerrainScene { public: CTerrainScene(void); ~CTerrainScene(void); public: void SetSceneManager( SceneManager* pManager ); void LoadScene( const char* strFileName, SceneNode* pRootNode ); void LoadTerrain( const char* strFileName, SceneNode* pRootNode ); void LoadGridInfo( const char* strFileName, void* pGridInfo, unsigned int* pWidth, unsigned int* pHeight ); void LoadModelObject( const char* strFileName, SceneNode* pRootNode ); void Update( const FrameEvent& evt ); void ClearScene(); private: void TraverseBonesAndBuildSceneNodes( Node* pNode, SceneNode* pSceneNode, String suffix, bool bRoot = true ); private: SceneManager* m_pSceneManager; std::list<AnimationState*> m_AnimationStates; size_t m_iTerrainWidth; size_t m_iTerrainHeight; float* m_pHeightMapData; float m_fTerrainScale[3]; };