![]() |
Gamedev Framework (gf)
0.9.0
A C++14 framework for 2D games
|
Perlin 2D noise. More...
#include <gf/Noises.h>

Public Member Functions | |
| PerlinNoise2D (Random &random, double scale, std::size_t octaves=8) | |
| Constructor. More... | |
| virtual double | getValue (double x, double y) override |
| Take a 2D noise value. More... | |
Public Member Functions inherited from gf::Noise2D | |
| virtual | ~Noise2D () |
| Virtual destructor. More... | |
| double | operator() (double x, double y) |
| Take a 2D noise value. More... | |
Perlin 2D noise.
Perlin noise is the combination of a fractal noise and a gradient noise.
| gf::PerlinNoise2D::PerlinNoise2D | ( | Random & | random, |
| double | scale, | ||
| std::size_t | octaves = 8 |
||
| ) |
Constructor.
| random | A random engine |
| scale | The scale factor |
| octaves | The number of octaves |
|
overridevirtual |
Take a 2D noise value.
| x | The x coordinate of the noise value |
| y | The y coordinate of the noise value |
Implements gf::Noise2D.
1.8.13