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

Ridged Multifractal 2D noise. More...

#include <gf/Noises.h>

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

Public Member Functions

 RidgedMultifractal2D (Noise2D &noise, double scale, double offset=1.0, double gain=1.0, std::size_t octaves=8, double lacunarity=2.0, double persistence=0.5, double dimension=1.0)
 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

Ridged Multifractal 2D noise.

Constructor & Destructor Documentation

gf::RidgedMultifractal2D::RidgedMultifractal2D ( Noise2D noise,
double  scale,
double  offset = 1.0,
double  gain = 1.0,
std::size_t  octaves = 8,
double  lacunarity = 2.0,
double  persistence = 0.5,
double  dimension = 1.0 
)

Constructor.

Parameters
noiseThe basic noise function
scaleThe scale factor
offsetThe offset
gainThe gain
octavesThe number of octaves
lacunarityThe factor applied to frequency
persistenceThe factor applied to amplitude
dimensionThe contrast between the layers

Member Function Documentation

virtual double gf::RidgedMultifractal2D::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.