Show
Ignore:
Timestamp:
09/10/08 20:11:54 (6 years ago)
Author:
robert
Message:

Introduced TerrainTile::TileLoadedCallback?

Files:
1 modified

Legend:

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

    r8639 r8840  
    4040 
    4141#include <osgTerrain/Terrain> 
     42#include <osgTerrain/TerrainTile> 
    4243 
    4344#include <osgViewer/ViewerEventHandlers> 
     
    233234}; 
    234235 
     236 
     237struct CustomTileLoadedCallback : public osgTerrain::TerrainTile::TileLoadedCallback 
     238{ 
     239    CustomTileLoadedCallback() 
     240    { 
     241    } 
     242 
     243    virtual bool deferExternalLayerLoading() const 
     244    { 
     245        return true; 
     246    } 
     247 
     248    virtual void loaded(osgTerrain::TerrainTile* tile, const osgDB::ReaderWriter::Options* options) const 
     249    { 
     250        osg::notify(osg::NOTICE)<<"Need to decide what to do here guys"<<std::endl; 
     251    } 
     252}; 
     253 
    235254int main( int argc, char **argv ) 
    236255{ 
     
    241260    arguments.getApplicationUsage()->addCommandLineOption("--login <url> <username> <password>","Provide authentication information for http file access."); 
    242261    
     262    
     263    // set the tile loaded callback to load the optional imagery 
     264    osgTerrain::TerrainTile::setTileLoadedCallback(new CustomTileLoadedCallback()); 
     265    
    243266    // construct the viewer. 
    244267    osgViewer::Viewer viewer(arguments);