1 #ifndef BLANK_WORLD_HPP_
2 #define BLANK_WORLD_HPP_
7 #include "generator.hpp"
12 #include <glm/glm.hpp>
22 void Generate(const Chunk::Pos &from, const Chunk::Pos &to);
27 Chunk **chunk = nullptr,
29 float *dist = nullptr,
30 glm::vec3 *normal = nullptr);
32 BlockTypeRegistry &BlockTypes() { return blockType; }
33 std::list<Chunk> &LoadedChunks() { return loaded; }
35 Entity &Player() { return player; }
37 Chunk *ChunkLoaded(const Chunk::Pos &);
38 Chunk *ChunkQueued(const Chunk::Pos &);
39 Chunk *ChunkAvailable(const Chunk::Pos &);
40 Chunk &Next(const Chunk &, const glm::tvec3<int> &dir);
43 void CheckChunkGeneration();
45 void Render(DirectionalLighting &);
48 BlockTypeRegistry blockType;
49 CuboidShape blockShape;
50 StairShape stairShape;
51 CuboidShape slabShape;
56 Chunk::Pos player_chunk;
58 std::list<Chunk> loaded;
59 std::list<Chunk> to_generate;
60 std::list<Chunk> to_free;