]> git.localhorst.tv Git - blank.git/blob - WorleyNoise.hpp
24ef7243650762cea55e1354fe8f63ba0bc5e720
[blank.git] / WorleyNoise.hpp
1 #ifndef BLANK_RAND_WORLEYNOISE_HPP_
2 #define BLANK_RAND_WORLEYNOISE_HPP_
3
4 #include "../graphics/glm.hpp"
5
6
7 namespace blank {
8
9 /// implementation of Worley noise (aka Cell or Voroni noise)
10 class WorleyNoise {
11
12 public:
13         explicit WorleyNoise(unsigned int seed) noexcept;
14
15         float operator ()(const glm::vec3 &) const noexcept;
16
17 private:
18         const unsigned int seed;
19         const int num_points;
20
21 };
22
23 }
24
25 #endif