igor::iPerlinNoise Class Reference

#include <iPerlinNoise.h>

Public Member Functions

void generateBase (uint32 seed)
 
float64 getValue (const iaVector3d &pos)
 
float64 getValue (const float64 pos)
 
float64 getValue (const iaVector3d &pos, int64 octaves, float64 persistence=0.5)
 
float64 getValue (const float64 pos, int64 octaves, float64 persistence=0.5)
 
 iPerlinNoise ()
 
 ~iPerlinNoise ()=default
 

Static Public Attributes

static const int64 RANDOM_NUMBERS_COUNT = 256
 

Detailed Description

perlin noise

most of the implementation comes from the folowing sources source: http://flafla2.github.io/2014/08/09/perlinnoise.html source: https://gist.github.com/Flafla2/f0260a861be0ebdeef76 Thanks Adrian Biagioli

Constructor & Destructor Documentation

◆ iPerlinNoise()

igor::iPerlinNoise::iPerlinNoise ( )

generates random numbers

◆ ~iPerlinNoise()

igor::iPerlinNoise::~iPerlinNoise ( )
default

does nothing

Member Function Documentation

◆ generateBase()

void igor::iPerlinNoise::generateBase ( uint32  seed)

generates pseudo random numbers

Parameters
seedthe seed used for generating the random numbers

◆ getValue() [1/4]

float64 igor::iPerlinNoise::getValue ( const float64  pos)
Returns
noise value at specified position

1d version

Parameters
posspecified position

◆ getValue() [2/4]

float64 igor::iPerlinNoise::getValue ( const float64  pos,
int64  octaves,
float64  persistence = 0.5 
)
Returns
noise value of multiple octaves at specified position in a range of 0.0-1.0
Parameters
posspecified position
octavesoctaves count
persistencemultiplicator of amplitude between each octave (default 0.5)

◆ getValue() [3/4]

float64 igor::iPerlinNoise::getValue ( const iaVector3d pos)
Returns
noise value at specified position

3d version

Parameters
posspecified position

◆ getValue() [4/4]

float64 igor::iPerlinNoise::getValue ( const iaVector3d pos,
int64  octaves,
float64  persistence = 0.5 
)
Returns
noise value of multiple octaves at specified position in a range of 0.0-1.0
Parameters
posspecified position
octavesoctaves count
persistencemultiplicator of amplitude between each octave (default 0.5)

Member Data Documentation

◆ RANDOM_NUMBERS_COUNT

const int64 igor::iPerlinNoise::RANDOM_NUMBERS_COUNT = 256
static

makes pseudo infinite access possible


The documentation for this class was generated from the following files: