source: experimental/TerrainTest/myTileLoadedCallback.cpp @ 237

Last change on this file since 237 was 168, checked in by Torben Dannhauer, 14 years ago
File size: 725 bytes
RevLine 
[165]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{
[166]24        //OSG_ALWAYS << "Executing myTileLoadedCallback!" << std::endl;
[168]25        tile->setTerrain( _terrain );
[165]26        tile->setTerrainTechnique( new osgTerrain::myTerrainTechnique() );
[168]27        _terrain->updateTerrainTileOnNextFrame(tile);
[165]28}
29   
Note: See TracBrowser for help on using the repository browser.