2009-05-16 17:58:08 +00:00
|
|
|
Terrain::Terrain(Ogre::SceneNode* r)
|
|
|
|
: mTerrainSceneNode(r),
|
2009-05-15 07:04:50 +00:00
|
|
|
mQuadRoot(0),
|
|
|
|
mMorphingEnabled(true),
|
|
|
|
mTextureFadingEnabled(true),
|
|
|
|
mBaseLand(r)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
//----------------------------------------------
|
|
|
|
Terrain::~Terrain(){
|
|
|
|
delete mQuadRoot;
|
|
|
|
}
|
|
|
|
//----------------------------------------------
|
|
|
|
void Terrain::create(){
|
2009-05-16 17:58:08 +00:00
|
|
|
mQuadRoot = new Quad(Quad::QL_ROOT, 0);
|
2009-05-15 07:04:50 +00:00
|
|
|
}
|
|
|
|
//----------------------------------------------
|
|
|
|
void Terrain::update(Ogre::Real t){
|
|
|
|
assert(mQuadRoot);
|
|
|
|
mQuadRoot->update(t);
|
|
|
|
mBaseLand.update();
|
|
|
|
}
|
|
|
|
//----------------------------------------------
|
|
|
|
int Terrain::getMaxDepth(){
|
2009-05-16 17:58:08 +00:00
|
|
|
return g_heightMap->getMaxDepth();
|
2009-05-15 07:04:50 +00:00
|
|
|
}
|
2009-05-16 17:58:08 +00:00
|
|
|
/*
|
2009-05-15 07:04:50 +00:00
|
|
|
//----------------------------------------------
|
|
|
|
void Terrain::reload(){
|
|
|
|
delete mQuadRoot;
|
2009-05-16 17:58:08 +00:00
|
|
|
mQuadRoot = new Quad(Quad::QL_ROOT, 0);
|
2009-05-15 07:04:50 +00:00
|
|
|
}
|
|
|
|
//----------------------------------------------
|
2009-05-16 17:58:08 +00:00
|
|
|
*/
|