8 // terrain 8a ftiaxnei skini k taisma renderer
16 /* parameters needed in terrain generation */
18 struct TerrainParams {
19 float xsz; /* terrain size in x axis */
20 float ysz; /* terrain size in y axis */
21 float max_height; /* max height of the heightfield */
22 int xtiles; /* number of tiles in x axis */
23 int ytiles; /* number of tiles in y axis */
26 int num_octaves; /* Perlin noise sums */
27 float noise_freq; /* Perlin noise scaling factor */
28 Image *coarse_heightmap; /* mask for low detail heightmap */
34 mutable Scene *vis_scene; /* set of visible tiles returned by get_visible */
36 std::vector<TerrainTile> tiles;
47 bool generate(const TerrainParams ¶ms);
48 Scene *get_visible(const Camera *camera) const;