diff options
Diffstat (limited to 'terrain.h')
-rw-r--r-- | terrain.h | 13 |
1 files changed, 3 insertions, 10 deletions
@@ -2,14 +2,11 @@ #define TERRAIN_H #include "vector.h" +#include "terrain_cache.h" #include <list> -#include <set> class Terrain { - private: - std::set<std::pair<int, int> > chunk_indices; - public: struct Chunk; @@ -36,6 +33,7 @@ class Terrain { float x, y, width, height; int h_width, h_height; float *heights; + TerrainCacheObject::p cache_obj; Vector3 *normals; size_t buf_size; unsigned int vbo_object; @@ -55,15 +53,10 @@ class Terrain { static const int chunk_size = 32; std::list<Chunk*> chunks; + TerrainCache *tc; Terrain(); virtual ~Terrain(); - float *generate_heights(int x, int y, int width, int height); - float *get_chunk(int x, int y, int width, int height); - bool has_chunk(int x, int y); - void save_chunk(float *chunk, int x, int y, int width, int height); - float *load_chunk(int x, int y, int width, int height); - void raise(float x, float z, float radius, float focus, float strength, bool up = true); void update(float x, float z); |