source: experimental/TerrainTest/myTileLoadedCallback.cpp @ 219

Last change on this file since 219 was 168, checked in by Torben Dannhauer, 14 years ago
File size: 725 bytes
Line 
1#include "myTileLoadedCallback.h"
2#include <osgTerrain/Terrain>
3
4#include "myTerrainTechnique.h"
5
6using namespace osgTerrain;
7
8myTileLoadedCallback::myTileLoadedCallback(osgTerrain::Terrain* terrain) : _terrain(terrain)
9{
10}
11
12myTileLoadedCallback::~myTileLoadedCallback()
13{
14
15}
16
17bool myTileLoadedCallback::deferExternalLayerLoading() const
18{
19    return true;
20}
21
22void myTileLoadedCallback::loaded(osgTerrain::TerrainTile* tile, const osgDB::ReaderWriter::Options* options) const
23{
24        //OSG_ALWAYS << "Executing myTileLoadedCallback!" << std::endl;
25        tile->setTerrain( _terrain );
26        tile->setTerrainTechnique( new osgTerrain::myTerrainTechnique() );
27        _terrain->updateTerrainTileOnNextFrame(tile);
28}
29   
Note: See TracBrowser for help on using the repository browser.