Introduce TerrainSystem node which decorates a complete terrain model made up of Terrain tiles.
This commit is contained in:
@@ -38,6 +38,8 @@
|
||||
#include <osgGA/AnimationPathManipulator>
|
||||
#include <osgGA/TerrainManipulator>
|
||||
|
||||
#include <osgTerrain/TerrainSystem>
|
||||
|
||||
#include <osgViewer/ViewerEventHandlers>
|
||||
#include <osgViewer/Viewer>
|
||||
|
||||
@@ -196,6 +198,15 @@ int main( int argc, char **argv )
|
||||
return 1;
|
||||
}
|
||||
|
||||
osgTerrain::TerrainSystem* terrain = findTopMostNodeOfType<osgTerrain::TerrainSystem>(rootnode);
|
||||
if (!terrain)
|
||||
{
|
||||
terrain = new osgTerrain::TerrainSystem;
|
||||
terrain->addChild(rootnode);
|
||||
|
||||
rootnode = terrain;
|
||||
}
|
||||
|
||||
osg::CoordinateSystemNode* csn = findTopMostNodeOfType<osg::CoordinateSystemNode>(rootnode);
|
||||
|
||||
unsigned int numLayers = 1;
|
||||
|
||||
Reference in New Issue
Block a user