Panda3D

- Main Page
- Packages
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions

# PerlinNoise3 Class Reference

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

Inheritance diagram for PerlinNoise3:

List of all members.

## Public Member Functions
| PerlinNoise3 ()
| Randomizes the tables to make a unique noise function.
| PerlinNoise3 (PerlinNoise3 const copy)
| Makes an exact copy of the existing PerlinNoise object, including its random seed.
| PerlinNoise3 (double sx, double sy, double sz, int table_size)
| Randomizes the tables to make a unique noise function.
| PerlinNoise3 (double sx, double sy, double sz)
| Randomizes the tables to make a unique noise function.
| PerlinNoise3 (double sx, double sy, double sz, int table_size, unsigned long int seed)
| Randomizes the tables to make a unique noise function.
double | noise (VBase3D const 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.
float | noise (VBase3 const value)
| Returns the noise function of the three inputs.
double | operator() (double x, double y, double z)
| Returns the noise function of the three inputs.
float | operator() (VBase3 const value)
| Returns the noise function of the three inputs.
double | operator() (VBase3D const value)
| Returns the noise function of the three inputs.
PerlinNoise3 | operator= (PerlinNoise3 const copy)
| Makes an exact copy of the existing PerlinNoise object, including its random seed.
| setScale (double scale)
| Changes the scale (frequency) of the noise.
| setScale (VBase3 const scale)
| Changes the scale (frequency) of the noise.
| setScale (double sx, double sy, double sz)
| Changes the scale (frequency) of the noise.
| setScale (VBase3D const scale)
| Changes the scale (frequency) of the noise.

## 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/ .

## Constructor & Destructor Documentation

PerlinNoise3 | ( |  | ) |

Randomizes the tables to make a unique noise function.

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

PerlinNoise3 | ( | PerlinNoise3 const | copy | ) |

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

PerlinNoise3 | ( | 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.

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

PerlinNoise3 | ( | double | sx,
|  | double | sy,
|  | double | sz
| ) |  |

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

double noise | ( | VBase3D const | 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.

float noise | ( | VBase3 const | value | ) |

Returns the noise function of the three inputs.

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

Returns the noise function of the three inputs.

double operator() | ( | VBase3D const | value | ) |

Returns the noise function of the three inputs.

float operator() | ( | VBase3 const | value | ) |

Returns the noise function of the three inputs.

PerlinNoise3 operator= | ( | PerlinNoise3 const | copy | ) |

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

setScale | ( | double | scale | ) |

Changes the scale (frequency) of the noise.

setScale | ( | VBase3D const | scale | ) |

Changes the scale (frequency) of the noise.

setScale | ( | VBase3 const | scale | ) |

Changes the scale (frequency) of the noise.

setScale | ( | double | sx,
|  | double | sy,
|  | double | sz
| ) |  |

Changes the scale (frequency) of the noise.

All Classes Namespaces Functions Variables Enumerations Enumerator Properties