This is the base class for PerlinNoise2 and PerlinNoise3, different dimensions of Perlin noise implementation.
More...
#include "perlinNoise.h"
List of all members.
Public Member Functions |
| unsigned long | get_seed () |
| | Returns a unique seed value based on the seed value passed to this PerlinNoise object (and on its current state).
|
Protected Types |
|
typedef vector_int | Index |
Protected Member Functions |
| | PerlinNoise (int table_size, unsigned long seed) |
| | Randomizes the tables to make a unique noise function.
|
| | PerlinNoise (const PerlinNoise ©) |
| | Makes an exact copy of the existing PerlinNoise object, including its random seed.
|
| void | operator= (const PerlinNoise ©) |
| | Makes an exact copy of the existing PerlinNoise object, including its random seed.
|
Static Protected Member Functions |
| static double | fade (double t) |
| | Returns a smooth interpolation spline from 0 .
|
| static double | lerp (double t, double a, double b) |
| | Returns the smoothly lerped value from a to b.
|
Protected Attributes |
|
Index | _index |
|
Randomizer | _randomizer |
|
int | _table_size |
|
int | _table_size_mask |
Detailed Description
This is the base class for PerlinNoise2 and PerlinNoise3, different dimensions of Perlin noise implementation.
The base class just collects the common functionality.
Definition at line 31 of file perlinNoise.h.
Constructor & Destructor Documentation
| PerlinNoise::PerlinNoise |
( |
int |
table_size, |
|
|
unsigned long |
seed |
|
) |
| [protected] |
Randomizes the tables to make a unique noise function.
If seed is nonzero, it is used to define the tables; if it is zero a random seed is generated.
Definition at line 27 of file perlinNoise.cxx.
References Randomizer::random_int().
| PerlinNoise::PerlinNoise |
( |
const PerlinNoise & |
copy | ) |
[protected] |
Member Function Documentation
| double PerlinNoise::fade |
( |
double |
t | ) |
[inline, static, protected] |
| unsigned long PerlinNoise::get_seed |
( |
| ) |
[inline] |
| double PerlinNoise::lerp |
( |
double |
t, |
|
|
double |
a, |
|
|
double |
b |
|
) |
| [inline, static, protected] |
| void PerlinNoise::operator= |
( |
const PerlinNoise & |
copy | ) |
[protected] |
The documentation for this class was generated from the following files: