functionality when using Terrain::setVerticalScale. This was caused by
the following call sequence resulting in a lockup:
void Terrain::setVerticalScale(float scale)
CALLS dirtyRegisteredTiles();
void Terrain::dirtyRegisteredTiles(int dirtyMask)
SETS LOCK OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_mutex);
and CALLS (on every tile) setDirtyMask(dirtyMask);
void TerrainTile::setDirtyMask(int dirtyMask)
CALLS _terrain->updateTerrainTileOnNextFrame(this);
void Terrain::updateTerrainTileOnNextFrame(TerrainTile* terrainTile)
SETS LOCK OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_mutex);
******* PROBLEM - since lock has already been set! ********
The suggested fix submitted changes from using Mutex to ReentrantMutex.
"
The DatabasePager now passes the Terrain pointer into the ReaderWriter's via osgDB::Options object,
rather than pushing a NodePath containing the Terrain onto NodeVisitor. This
change means that the DatabasePager nolonger needs to observer the whole NodePath and
will be lighter and quicker for it.
The change also means that ReadFileCallback can now run custom NodeVisitor's on the scene graph without
having to worry about TerrainTile's constructing scene graphs prior to the Terrain being assigned.
Also changed is the NodeVisitor::DatabaseRequestHandler which now requires a NodePath to the node that you wish
to add to rather than just the pointer to the node you wish to add to. This is more robust when handling scenes
with multiple parental paths, whereas previously errors could have occurred due to the default of picking the first
available parental path. This change means that subclasses of DatabasePager will need to be updated to use this new
function entry point.
Added support for setting the maximum visiable distance of top level
to osgTerrain::DataSet, and debugging code which insert a axes.osg
above each tile.