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

Worley 2D noise. More...

#include <gf/Noises.h>

Inheritance diagram for gf::WorleyNoise2D:
Inheritance graph
[legend]

Public Member Functions

 WorleyNoise2D (Random &random, std::size_t count, Distance2< double > distance, std::vector< double > coeffs)
 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...
 

Detailed Description

Worley 2D noise.

Worley noise is a point based noise. It is also known as Voronoi noise or cellular noise or simply cell noise.

Constructor & Destructor Documentation

gf::WorleyNoise2D::WorleyNoise2D ( Random random,
std::size_t  count,
Distance2< double >  distance,
std::vector< double >  coeffs 
)

Constructor.

Parameters
randomA random engine
countThe number of points
distanceA distance function
coeffsThe coefficients for the noise

Member Function Documentation

virtual double gf::WorleyNoise2D::getValue ( double  x,
double  y 
)
overridevirtual

Take a 2D noise value.

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

Implements gf::Noise2D.