Panda3D
Public Member Functions

PerlinNoise2 Class Reference

This class provides an implementation of Perlin noise for 2 variables. More...

Inheritance diagram for PerlinNoise2:
PerlinNoise

List of all members.

Public Member Functions

 PerlinNoise2 ()
 Randomizes the tables to make a unique noise function.
 PerlinNoise2 (PerlinNoise2 const copy)
 Makes an exact copy of the existing PerlinNoise object, including its random seed.
 PerlinNoise2 (double sx, double sy, int table_size)
 Randomizes the tables to make a unique noise function.
 PerlinNoise2 (double sx, double sy)
 Randomizes the tables to make a unique noise function.
 PerlinNoise2 (double sx, double sy, int table_size, unsigned long int seed)
 Randomizes the tables to make a unique noise function.
unsigned long int getSeed ()
 Returns a unique seed value based on the seed value passed to this PerlinNoise object (and on its current state).
double noise (VBase2D const value)
 Returns the noise function of the three inputs.
float noise (VBase2 const value)
 Returns the noise function of the three inputs.
double noise (double x, double y)
 Returns the noise function of the three inputs.
float operator() (VBase2 const value)
 Returns the noise function of the two inputs.
double operator() (double x, double y)
 Returns the noise function of the two inputs.
double operator() (VBase2D const value)
 Returns the noise function of the two inputs.
PerlinNoise2 operator= (PerlinNoise2 const copy)
 Makes an exact copy of the existing PerlinNoise object, including its random seed.
 setScale (VBase2D const scale)
 Changes the scale (frequency) of the noise.
 setScale (double scale)
 Changes the scale (frequency) of the noise.
 setScale (double sx, double sy)
 Changes the scale (frequency) of the noise.
 setScale (VBase2 const scale)
 Changes the scale (frequency) of the noise.

Detailed Description

This class provides an implementation of Perlin noise for 2 variables.

This code is loosely based on the reference implementation at http://mrl.nyu.edu/~perlin/noise/ .


Constructor & Destructor Documentation

Randomizes the tables to make a unique noise function.

Uses a default scale (noise frequency), table size, and seed.

PerlinNoise2 ( PerlinNoise2 const  copy)

Makes an exact copy of the existing PerlinNoise object, including its random seed.

PerlinNoise2 ( double  sx,
double  sy,
int  table_size,
unsigned long int  seed 
)

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.

PerlinNoise2 ( double  sx,
double  sy,
int  table_size 
)

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.

PerlinNoise2 ( double  sx,
double  sy 
)

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.


Member Function Documentation

unsigned long int getSeed ( ) [inherited]

Returns a unique seed value based on the seed value passed to this PerlinNoise object (and on its current state).

double noise ( double  x,
double  y 
)

Returns the noise function of the three inputs.

double noise ( VBase2D const  value)

Returns the noise function of the three inputs.

float noise ( VBase2 const  value)

Returns the noise function of the three inputs.

double operator() ( VBase2D const  value)

Returns the noise function of the two inputs.

float operator() ( VBase2 const  value)

Returns the noise function of the two inputs.

double operator() ( double  x,
double  y 
)

Returns the noise function of the two inputs.

PerlinNoise2 operator= ( PerlinNoise2 const  copy)

Makes an exact copy of the existing PerlinNoise object, including its random seed.

setScale ( VBase2D const  scale)

Changes the scale (frequency) of the noise.

setScale ( VBase2 const  scale)

Changes the scale (frequency) of the noise.

setScale ( double  sx,
double  sy 
)

Changes the scale (frequency) of the noise.

setScale ( double  scale)

Changes the scale (frequency) of the noise.

 All Classes Namespaces Functions Variables Enumerations Enumerator Properties