Gamedev Framework (gf)  0.1.0
A C++11 framework for 2D games
Public Member Functions | List of all members
gf::PerlinNoise Class Reference

Perlin noise. More...

#include <gf/Noise.h>

Public Member Functions

 PerlinNoise (Random &random, double scale, std::size_t octaves=8)
 Constructor. More...
double operator() (double x, double y) const
 Take a noise value. More...

Detailed Description

Perlin noise.

Perlin noise is the combination of a fractal noise and a gradient noise.

See also
gf::GradientNoise, gf::FractalNoise

Constructor & Destructor Documentation

gf::PerlinNoise::PerlinNoise ( Random random,
double  scale,
std::size_t  octaves = 8 


randomA random engine
scaleThe scale factor
octavesThe number of octaves

Member Function Documentation

double gf::PerlinNoise::operator() ( double  x,
double  y 
) const

Take a noise value.

xThe x coordinate of the noise value
yThe y coordinate of the noise value
The noise value