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

Perlin 3D noise. More...

#include <gf/Noises.h>

Inheritance diagram for gf::PerlinNoise3D:
Inheritance graph

Public Member Functions

 PerlinNoise3D (Random &random, double scale, std::size_t octaves=8)
 Constructor. More...
virtual double getValue (double x, double y, double z) override
 Take a 3D noise value. More...
- Public Member Functions inherited from gf::Noise3D
virtual ~Noise3D ()
 Virtual destructor. More...
double operator() (double x, double y, double z)
 Take a 3D noise value. More...

Detailed Description

Perlin 3D noise.

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

See also
gf::GradientNoise3D, gf::FractalNoise3D

Constructor & Destructor Documentation

◆ PerlinNoise3D()

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


randomA random engine
scaleThe scale factor
octavesThe number of octaves

Member Function Documentation

◆ getValue()

virtual double gf::PerlinNoise3D::getValue ( double  x,
double  y,
double  z 

Take a 3D noise value.

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

Implements gf::Noise3D.