stratgame

view level/src/terrain.h @ 4:cd12944a8ea8

foo
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 25 May 2012 05:28:20 +0300
parents
children 2e38715de41b
line source
1 #ifndef TERRAIN_H_
2 #define TERRAIN_H_
4 #include <string>
5 #include <map>
7 class TerrainNode;
9 class Terrain {
10 private:
11 TerrainNode *root;
13 public:
14 Terrain();
15 ~Terrain();
17 float get_height(float x, float y) const;
18 };
21 class TerrainNode {
22 private:
23 unsigned char *height;
25 public:
26 TerrainNode *child[4];
28 TerrainNode();
29 ~TerrainNode();
31 TerrainNode *get_child(float x, float y);
32 const TerrainNode *get_child(float x, float y) const;
34 float get_height(float x, float y) const;
35 };
37 #endif // TERRAIN_H_