Changeset 273 for osgVisual/trunk/src/core/visual_core.cpp
- Timestamp:
- Mar 19, 2011, 5:39:16 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
osgVisual/trunk/src/core/visual_core.cpp
r248 r273 17 17 18 18 #include <visual_core.h> 19 #include <visual_util.h> 20 #include <osgTerrain/Terrain> 19 21 20 22 using namespace osgVisual; … … 172 174 if( model.valid() ) 173 175 { 174 rootNode->addChild( model.get() ); 176 osgTerrain::Terrain* terrain = util::findTopMostNodeOfType<osgTerrain::Terrain>(model.get()); 177 if (!terrain) 178 { 179 terrain = new osgTerrain::Terrain; 180 terrain->addChild(model.get()); 181 182 model = terrain; 183 } 184 rootNode->addChild( terrain ); 175 185 return true; 176 186 } … … 353 363 } 354 364 365 osgTerrain::Terrain* terrain = util::findTopMostNodeOfType<osgTerrain::Terrain>(rootNode); 366 if (!terrain) 367 { 368 OSG_ALWAYS << "No TerrainNode found!" << std::endl; 369 } 370 else 371 { 372 OSG_ALWAYS << "BorderEqual activated" << std::endl; 373 terrain->setEqualizeBoundaries(true); 374 } 355 375 356 376 //testObj = new visual_object( rootNode, "testStab", objectMountedCameraManip );
Note: See TracChangeset
for help on using the changeset viewer.