X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fgenerator.hpp;fp=src%2Fgenerator.hpp;h=0000000000000000000000000000000000000000;hb=b7d09e1e35ef90282c97509e0020b20db3c7ea9f;hp=dedfb72b7c94fc5461bf795accf09d33f9b86542;hpb=e53a0e2e711a7d8bd9b0ddacd1360aa14370643f;p=blank.git diff --git a/src/generator.hpp b/src/generator.hpp deleted file mode 100644 index dedfb72..0000000 --- a/src/generator.hpp +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef BLANK_GENERATOR_HPP_ -#define BLANK_GENERATOR_HPP_ - -#include "block.hpp" -#include "chunk.hpp" -#include "noise.hpp" - -#include - - -namespace blank { - -class Generator { - -public: - struct Config { - unsigned int solid_seed = 0; - unsigned int type_seed = 0; - float stretch = 64.0f; - float solid_threshold = 0.5f; - }; - - explicit Generator(const Config &) noexcept; - - void operator ()(Chunk &) const noexcept; - - void Space(Block::Type t) noexcept { space = t; } - void Light(Block::Type t) noexcept { light = t; } - void Solids(const std::vector &s) { solids = s; } - -private: - SimplexNoise solidNoise; - WorleyNoise typeNoise; - - float stretch; - float solid_threshold; - - Block::Type space; - Block::Type light; - std::vector solids; - -}; - -} - -#endif