Panda3D
Loading...
Searching...
No Matches
Public Member Functions | List of all members
PerlinNoise3 Class Reference

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

#include <pandadoc.hpp>

Inheritance diagram for PerlinNoise3:
PerlinNoise

Public Member Functions

 __init__ ()
 Randomizes the tables to make a unique noise function.
 
 __init__ (const PerlinNoise3 copy)
 Makes an exact copy of the existing PerlinNoise object, including its random seed.
 
 __init__ (double sx, double sy, double sz, int table_size, unsigned long int seed)
 Randomizes the tables to make a unique noise function.
 
double noise (const LVecBase3d value)
 Returns the noise function of the three inputs.
 
float noise (const LVecBase3f value)
 Returns the noise function of the three inputs.
 
double noise (double x, double y, double z)
 Returns the noise function of the three inputs.
 
double operator() (const LVecBase3d value)
 
float operator() (const LVecBase3f value)
 
double operator() (double x, double y, double z)
 
PerlinNoise3 operator= (const PerlinNoise3 copy)
 
 setScale (const LVecBase3d scale)
 Changes the scale (frequency) of the noise.
 
 setScale (const LVecBase3f scale)
 Changes the scale (frequency) of the noise.
 
 setScale (double scale)
 Changes the scale (frequency) of the noise.
 
 setScale (double sx, double sy, double sz)
 Changes the scale (frequency) of the noise.
 
- Public Member Functions inherited from PerlinNoise
unsigned long int getSeed ()
 Returns a unique seed value based on the seed value passed to this PerlinNoise object (and on its current state).
 

Detailed Description

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

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

Member Function Documentation

◆ __init__() [1/3]

__init__ ( )

Randomizes the tables to make a unique noise function.

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

◆ __init__() [2/3]

__init__ ( const PerlinNoise3 copy)

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

◆ __init__() [3/3]

__init__ ( double sx,
double sy,
double sz,
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.

◆ noise() [1/3]

double noise ( const LVecBase3d value)

Returns the noise function of the three inputs.

◆ noise() [2/3]

float noise ( const LVecBase3f value)

Returns the noise function of the three inputs.

◆ noise() [3/3]

double noise ( double x,
double y,
double z )

Returns the noise function of the three inputs.

◆ operator()() [1/3]

double operator() ( const LVecBase3d value)

◆ operator()() [2/3]

float operator() ( const LVecBase3f value)

◆ operator()() [3/3]

double operator() ( double x,
double y,
double z )

◆ operator=()

PerlinNoise3 operator= ( const PerlinNoise3 copy)

◆ setScale() [1/4]

setScale ( const LVecBase3d scale)

Changes the scale (frequency) of the noise.

◆ setScale() [2/4]

setScale ( const LVecBase3f scale)

Changes the scale (frequency) of the noise.

◆ setScale() [3/4]

setScale ( double scale)

Changes the scale (frequency) of the noise.

◆ setScale() [4/4]

setScale ( double sx,
double sy,
double sz )

Changes the scale (frequency) of the noise.