예제 #1
0
void MapView::unload()
{
	if (mIsLoaded)
	{
		mIsLoaded = false;

		destroyObjects();
		destroyTerrain();

		Ogre::Root::getSingleton().destroySceneManager(mManager);
	}
}
예제 #2
0
	void TerrainImpl::createTerrain(TerrainInfo* info, ushort tileSize)
	{
		// ensure we have a viewport height set
		if (mOpt.factorC <= 0)
			OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "You need to set a valid pixel error margin.", "TerrainImpl::createTerrain");

		// delete currently loaded terrain (if any)
		destroyTerrain();

		// load new terrain
		mInfo = info;
		mOpt.tileSize = tileSize;
		mIndexHandler = new IndexHandler(mOpt.tileSize);
		createTiles();

		mTerrainLoaded = true;
	} 
예제 #3
0
	TerrainImpl::~TerrainImpl()
	{
		destroyTerrain();
	}