23 std::vector<uint16_t>
h;
26 float height(
int row,
int col)
const {
return h[
static_cast<size_t>(row) *
n + col] *
y_scale / 256.0f; }
29Heightmap
load_heightmap(
const std::vector<uint8_t>& raw,
float y_scale);
TerrainInfo parse_terrain_con(const std::string &text)
Definition terrain.cpp:13
Heightmap load_heightmap(const std::vector< uint8_t > &raw, float y_scale)
Definition terrain.cpp:38
float height(int row, int col) const
Definition terrain.h:26
int n
Definition terrain.h:22
std::vector< uint16_t > h
Definition terrain.h:23
float y_scale
Definition terrain.h:24
std::string material_map
Definition terrain.h:13
std::string detail
Definition terrain.h:12
int material_size
Definition terrain.h:14
std::string tex_base
Definition terrain.h:11
float water_level
Definition terrain.h:10
std::string heightmap
Definition terrain.h:11
float y_scale
Definition terrain.h:10
float world_size
Definition terrain.h:10