Ocular Engine
SimplexNoise.hpp
1 
17 #pragma once
18 #ifndef __H__OCULAR_MATH_SIMPLEX_NOISE__H__
19 #define __H__OCULAR_MATH_SIMPLEX_NOISE__H__
20 
21 #include "ANoise.hpp"
22 
23 //------------------------------------------------------------------------------------------
24 
29 namespace Ocular
30 {
35  namespace Math
36  {
41  namespace Noise
42  {
75  class SimplexNoise : public ANoise
76  {
77  public:
78 
79  SimplexNoise();
80  ~SimplexNoise();
81 
93  virtual float getValue(float const x, float const y);
94 
107  virtual float getValue(float const x, float const y, float const z);
108 
118  void setOctaves(uint32_t const octaves);
119 
129  void setPersistence(float const persistence);
130 
142  void setScale(float const scale);
143 
144  protected:
145 
146  float getRawNoise(float const x, float const y);
147  float getRawNoise(float const x, float const y, float const z);
148 
149  private:
150 
151  uint32_t m_Octaves;
152  float m_Persistence;
153  float m_Scale;
154  };
155  }
159  }
163 }
168 //------------------------------------------------------------------------------------------
169 
170 #endif
void setOctaves(uint32_t const octaves)
Definition: SimplexNoise.cpp:148
void setScale(float const scale)
Definition: SimplexNoise.cpp:158
Note: Once this library is made dynamic, this will no longer be needed.
Definition: Common.hpp:70
virtual float getValue(float const x, float const y)
Definition: SimplexNoise.cpp:110
Definition: SimplexNoise.hpp:75
Definition: ANoise.hpp:48
void setPersistence(float const persistence)
Definition: SimplexNoise.cpp:153