1 #ifndef BLANK_WORLD_HPP_
2 #define BLANK_WORLD_HPP_
12 #include <glm/glm.hpp>
22 void Generate(const glm::tvec3<int> &from, const glm::tvec3<int> &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 glm::tvec3<int> &);
38 Chunk *ChunkQueued(const glm::tvec3<int> &);
39 Chunk *ChunkAvailable(const glm::tvec3<int> &);
40 Chunk &Next(const Chunk &, const glm::vec3 &dir);
43 void CheckChunkGeneration();
45 void Render(DirectionalLighting &);
48 void Generate(Chunk &);
51 BlockTypeRegistry blockType;
52 CuboidShape blockShape;
53 StairShape stairShape;
54 CuboidShape slabShape;
56 SimplexNoise blockNoise;
57 SimplexNoise colorNoise;
60 glm::tvec3<int> player_chunk;
62 std::list<Chunk> loaded;
63 std::list<Chunk> to_generate;