Rev | Line | |
---|
[165] | 1 | #include "myTileLoadedCallback.h" |
---|
| 2 | #include <osgTerrain/Terrain> |
---|
| 3 | |
---|
| 4 | #include "myTerrainTechnique.h" |
---|
| 5 | |
---|
| 6 | using namespace osgTerrain; |
---|
| 7 | |
---|
| 8 | myTileLoadedCallback::myTileLoadedCallback(osgTerrain::Terrain* terrain) : _terrain(terrain) |
---|
| 9 | { |
---|
| 10 | } |
---|
| 11 | |
---|
| 12 | myTileLoadedCallback::~myTileLoadedCallback() |
---|
| 13 | { |
---|
| 14 | |
---|
| 15 | } |
---|
| 16 | |
---|
| 17 | bool myTileLoadedCallback::deferExternalLayerLoading() const |
---|
| 18 | { |
---|
| 19 | return true; |
---|
| 20 | } |
---|
| 21 | |
---|
| 22 | void 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.