Show
Ignore:
Timestamp:
03/26/08 21:06:54 (7 years ago)
Author:
robert
Message:

Introduce TerrainSystem? node which decorates a complete terrain model made up of Terrain tiles.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/examples/osgmultitexturecontrol/osgmultitexturecontrol.cpp

    r7988 r7998  
    3838#include <osgGA/AnimationPathManipulator> 
    3939#include <osgGA/TerrainManipulator> 
     40 
     41#include <osgTerrain/TerrainSystem> 
    4042 
    4143#include <osgViewer/ViewerEventHandlers> 
     
    197199    } 
    198200     
     201    osgTerrain::TerrainSystem* terrain = findTopMostNodeOfType<osgTerrain::TerrainSystem>(rootnode); 
     202    if (!terrain) 
     203    { 
     204        terrain = new osgTerrain::TerrainSystem; 
     205        terrain->addChild(rootnode); 
     206         
     207        rootnode = terrain; 
     208    }     
     209     
    199210    osg::CoordinateSystemNode* csn = findTopMostNodeOfType<osg::CoordinateSystemNode>(rootnode); 
    200211