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

Better gradient 2D noise. More...

#include <gf/Noises.h>

Inheritance diagram for gf::BetterGradientNoise2D:
Inheritance graph

Public Member Functions

 BetterGradientNoise2D (Random &random)
 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

Better gradient 2D noise.

An implementation of the better gradient noise of Kensler et al., especially the new hash function and filter kernel. This noise is slower than gradient noise but gives better results.

See also
Better Gradient Noise. A. Kensler, A. Knoll, P. Shirley. 2008

Constructor & Destructor Documentation

gf::BetterGradientNoise2D::BetterGradientNoise2D ( Random random)


randomA random engine

Member Function Documentation

virtual double gf::BetterGradientNoise2D::getValue ( double  x,
double  y 

Take a 2D noise value.

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

Implements gf::Noise2D.