2 #include "terraintype.h"
9 TerrainType::TerrainType(const ArticleNumber &an):
12 elevation_granularity(0.1)
15 const TerrainType::SurfaceType &TerrainType::get_surface_type(unsigned i) const
17 if(i>=surface_types.size())
18 throw out_of_range("TerrainType::get_surface_type");
19 return surface_types[i];
23 TerrainType::SurfaceType::SurfaceType():
30 TerrainType::Loader::Loader(TerrainType &tt):
31 DataFile::ObjectLoader<TerrainType>(tt)
33 add("elevation_granularity", &TerrainType::elevation_granularity);
34 add("surface", &Loader::surface);
35 add("tile_size", &TerrainType::tile_size);
38 void TerrainType::Loader::surface()
42 obj.surface_types.push_back(srf);
46 TerrainType::SurfaceType::Loader::Loader(SurfaceType &st):
47 DataFile::ObjectLoader<SurfaceType>(st)