#include <dtedterrainreader.h>

Public Member Functions | |
| DTEDTerrainReader (const DTEDLevelEnum &level=DTEDLevelEnum::ONE, const std::string &name="DTEDReader") | |
| Constructs the terrain reader. | |
| const TerrainDataType & | GetDataType () const |
| Gets the type of terrain data this reader supports. | |
| virtual bool | OnLoadTerrainTile (PagedTerrainTile &tile) |
| Called by the terrain when a tile needs to be loaded. | |
| const std::string | GenerateTerrainTileCachePath (const PagedTerrainTile &tile) |
| This generates the cache path for the specified tile. | |
| void | SetDTEDLevel (const DTEDLevelEnum &level) |
| Sets the DTED level to load. | |
| const DTEDLevelEnum & | GetDTEDLevel () const |
| Gets the current DTED level this reader is trying to load. | |
Protected Member Functions | |
| virtual | ~DTEDTerrainReader () |
| Destroys the terrain reader. | |
| std::string | GetDTEDFilePath (const std::string &lat, const std::string &lon, int level) |
| Searches the list of file resource paths for DTED data of the given latitude, longitude and level. | |
Classes | |
| class | DTEDLevelEnum |
| This enumeration represents the different DTED levels available for loading. More... | |
Under the covers this reader uses GDAL to load the actual heightfield values. Note, to load specific DTED levels, one must specify the level to load. By default, the reader will attempt to load DTED level 1.
| dtTerrain::DTEDTerrainReader::DTEDTerrainReader | ( | const DTEDLevelEnum & | level = DTEDLevelEnum::ONE, |
|
| const std::string & | name = "DTEDReader" | |||
| ) |
Constructs the terrain reader.
| level | The level of DTED data to load. |
| dtTerrain::DTEDTerrainReader::~DTEDTerrainReader | ( | ) | [protected, virtual] |
Destroys the terrain reader.
| const TerrainDataType& dtTerrain::DTEDTerrainReader::GetDataType | ( | ) | const [inline, virtual] |
Gets the type of terrain data this reader supports.
Implements dtTerrain::TerrainDataReader.
| bool dtTerrain::DTEDTerrainReader::OnLoadTerrainTile | ( | PagedTerrainTile & | tile | ) | [virtual] |
Called by the terrain when a tile needs to be loaded.
This method will first check the tile's cache for the heightfield. If it is not found, this method will load the DTED data for the specified tile.
| tile | The tile to load. Based on its latitude and longitude position and the reader's max DTED level, the appropriate data will be loaded. |
Implements dtTerrain::TerrainDataReader.
| const std::string dtTerrain::DTEDTerrainReader::GenerateTerrainTileCachePath | ( | const PagedTerrainTile & | tile | ) | [virtual] |
This generates the cache path for the specified tile.
The cache path is equal to: $Latitude_$Longitude_$DTEDLevel.
| tile | The tile with which to generate the path for. |
Implements dtTerrain::TerrainDataReader.
| void dtTerrain::DTEDTerrainReader::SetDTEDLevel | ( | const DTEDLevelEnum & | level | ) |
Sets the DTED level to load.
| level | The level of data to load. By default, this value is set to DTEDLevelEnum::ONE. |
| const DTEDLevelEnum& dtTerrain::DTEDTerrainReader::GetDTEDLevel | ( | ) | const [inline] |
Gets the current DTED level this reader is trying to load.
| std::string dtTerrain::DTEDTerrainReader::GetDTEDFilePath | ( | const std::string & | lat, | |
| const std::string & | lon, | |||
| int | level | |||
| ) | [protected] |
Searches the list of file resource paths for DTED data of the given latitude, longitude and level.
| basePath | String containing the root DTED path. | |
| lat | Latitude (ex. e90) | |
| lon | Longitude (ex. w150) |