#ifndef TERRAIN_LOADER_H #define TERRAIN_LOADER_H #include "vector.h" #include #include #include namespace fs = boost::filesystem; class TerrainLoader { private: fs::path root; public: typedef boost::shared_ptr p; TerrainLoader(fs::path root); virtual ~TerrainLoader(); virtual float *get_chunk(int64_t x, int64_t y, unsigned int width, unsigned int height); bool has_chunk(int64_t x, int64_t y); void save_chunk(float *chunk, int64_t x, int64_t y, unsigned int width, unsigned int height); float *load_chunk(int64_t x, int64_t y, unsigned int width, unsigned int height); // FIXME: Support other object types. virtual std::list get_objects(int64_t x, int64_t y); bool has_objects(int64_t x, int64_t y); void save_objects(std::list& objects, int64_t x, int64_t y); std::list load_objects(int64_t x, int64_t y); }; #endif