1 #ifndef BLANK_WORLD_GENERATOR_HPP_
2 #define BLANK_WORLD_GENERATOR_HPP_
4 #include "../rand/SimplexNoise.hpp"
15 class BlockTypeRegistry;
22 std::uint64_t seed = 0;
24 std::uint64_t seed_mask;
31 NoiseParam solidity = { 0xA85033F6BCBDD110, 3, 0.5f, 1.0f/64.0f, 2.0f, 2.0f };
32 NoiseParam humidity = { 0x3A463FB24B04A901, 2, 0.5f, 1.0f/512.0f, 2.0f, 2.0f };
33 NoiseParam temperature = { 0x2530BA6C6134A9FB, 2, 0.5f, 1.0f/1024.0f, 2.0f, 2.0f };
34 NoiseParam richness = { 0x95A179F180103446, 3, 0.5f, 1.0f/128.0f, 2.0f, 2.0f };
35 NoiseParam randomness = { 0x074453EEE1496390, 3, 0.5f, 1.0f/16.0f, 2.0f, 2.0f };
38 explicit Generator(const Config &) noexcept;
40 void LoadTypes(const BlockTypeRegistry &);
42 void operator ()(Chunk &) const noexcept;
45 Block Generate(const glm::vec3 &position) const noexcept;
46 static float GetValue(
49 const Config::NoiseParam &) noexcept;
53 std::vector<const BlockType *> types;
56 SimplexNoise solidity_noise;
57 SimplexNoise humidity_noise;
58 SimplexNoise temperature_noise;
59 SimplexNoise richness_noise;
60 SimplexNoise random_noise;