Rev | Line | |
---|
[165] | 1 | #pragma once |
---|
| 2 | #include <osgTerrain/TerrainTile> |
---|
[275] | 3 | #include "myTerrainTechnique.h" |
---|
[165] | 4 | |
---|
[275] | 5 | |
---|
[165] | 6 | namespace osgTerrain { |
---|
| 7 | |
---|
| 8 | class myTileLoadedCallback : public TerrainTile::TileLoadedCallback |
---|
| 9 | { |
---|
| 10 | public: |
---|
[275] | 11 | //! Constructor: Nothing to do. |
---|
| 12 | myTileLoadedCallback() {}; |
---|
[165] | 13 | |
---|
[275] | 14 | //! Destructor: Nothing to do. |
---|
| 15 | virtual ~myTileLoadedCallback() {}; |
---|
| 16 | |
---|
| 17 | /** |
---|
| 18 | * \brief This function must be implemented. |
---|
| 19 | * |
---|
| 20 | * @return : Extrnal layer loding status. |
---|
| 21 | */ |
---|
| 22 | virtual bool deferExternalLayerLoading() const {return true;} |
---|
| 23 | |
---|
| 24 | /** |
---|
| 25 | * \brief This function is performed after every tile loading. |
---|
| 26 | * |
---|
| 27 | * It is used to install a custom geometryTechnique on every tile, because VPB databases older VPB 0.10 have a hardcoded geometryTechnique which ignores the GeometryTechniquePrototype of osgTerrain. |
---|
| 28 | * |
---|
| 29 | * @param tile : Loaded tile. |
---|
| 30 | * @param options : Reader writer optins. Defined as interface, but in this class not used. |
---|
| 31 | */ |
---|
| 32 | virtual void loaded(osgTerrain::TerrainTile* tile, const osgDB::ReaderWriter::Options* options) const {tile->setTerrainTechnique( new osgTerrain::myTerrainTechnique() );}; |
---|
[165] | 33 | }; |
---|
| 34 | |
---|
[275] | 35 | } // Namespace end. |
---|
Note: See
TracBrowser
for help on using the repository browser.