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