#ifndef TERRAIN_H_
#define TERRAIN_H_
+class Camera;
+class Image;
+class Scene;
+// terrain 8a ftiaxnei skini k taisma renderer
+class TerrainTile {
+private:
+ Mesh *mesh;
+
+};
+
+/* parameters needed in terrain generation */
+
+struct TerrainParams {
+ float xsz; /* terrain size in x axis */
+ float ysz; /* terrain size in y axis */
+ float max_height; /* max height of the heightfield */
+ int xtiles; /* number of tiles in x axis */
+ int ytiles; /* number of tiles in y axis */
+ int tile_usub;
+ int tile_vsub;
+ int num_octaves; /* Perlin noise sums */
+ Image *coarse_heightmap; /* mask for low detail heightmap */
+};
+
+class Terrain {
+private:
+ TerrainParams params;
+ mutable Scene *vis_scene; /* set of visible tiles returned by get_visible */
+
+ std::vector<TerrainTile> tiles;
+
+public:
+ Terrain();
+ ~Terrain();
+
+ bool generate(const TerrainParams ¶ms);
+ Scene *get_visible(const Camera *camera) const;
+};
#endif // TERRAIN_H_
\ No newline at end of file