Bukkit  1.5.2-R1.0
 All Classes Namespaces Files Functions Variables Enumerator Pages
org.bukkit.util.noise.NoiseGenerator Class Referenceabstract

Base class for all noise generators. More...

+ Inheritance diagram for org.bukkit.util.noise.NoiseGenerator:

Public Member Functions

double noise (double x)
 Computes and returns the 1D noise for the given coordinate in 1D space.
 
double noise (double x, double y)
 Computes and returns the 2D noise for the given coordinates in 2D space.
 
abstract double noise (double x, double y, double z)
 Computes and returns the 3D noise for the given coordinates in 3D space.
 
double noise (double x, int octaves, double frequency, double amplitude)
 Generates noise for the 1D coordinates using the specified number of octaves and parameters.
 
double noise (double x, int octaves, double frequency, double amplitude, boolean normalized)
 Generates noise for the 1D coordinates using the specified number of octaves and parameters.
 
double noise (double x, double y, int octaves, double frequency, double amplitude)
 Generates noise for the 2D coordinates using the specified number of octaves and parameters.
 
double noise (double x, double y, int octaves, double frequency, double amplitude, boolean normalized)
 Generates noise for the 2D coordinates using the specified number of octaves and parameters.
 
double noise (double x, double y, double z, int octaves, double frequency, double amplitude)
 Generates noise for the 3D coordinates using the specified number of octaves and parameters.
 
double noise (double x, double y, double z, int octaves, double frequency, double amplitude, boolean normalized)
 Generates noise for the 3D coordinates using the specified number of octaves and parameters.
 

Static Public Member Functions

static int floor (double x)
 Speedy floor, faster than (int)Math.floor(x)
 

Static Protected Member Functions

static double fade (double x)
 
static double lerp (double x, double y, double z)
 
static double grad (int hash, double x, double y, double z)
 

Protected Attributes

final int perm [] = new int[512]
 
double offsetX
 
double offsetY
 
double offsetZ
 

Detailed Description

Base class for all noise generators.

Definition at line 6 of file NoiseGenerator.java.

Member Function Documentation

static double org.bukkit.util.noise.NoiseGenerator.fade ( double  x)
staticprotected
static int org.bukkit.util.noise.NoiseGenerator.floor ( double  x)
static

Speedy floor, faster than (int)Math.floor(x)

Parameters
xValue to floor
Returns
Floored value

Definition at line 18 of file NoiseGenerator.java.

Referenced by org.bukkit.util.noise.PerlinNoiseGenerator.noise(), and org.bukkit.util.noise.SimplexNoiseGenerator.noise().

static double org.bukkit.util.noise.NoiseGenerator.grad ( int  hash,
double  x,
double  y,
double  z 
)
staticprotected
static double org.bukkit.util.noise.NoiseGenerator.lerp ( double  x,
double  y,
double  z 
)
staticprotected
double org.bukkit.util.noise.NoiseGenerator.noise ( double  x)

Computes and returns the 1D noise for the given coordinate in 1D space.

Parameters
xX coordinate
Returns
Noise at given location, from range -1 to 1

Definition at line 43 of file NoiseGenerator.java.

Referenced by org.bukkit.util.noise.NoiseGenerator.noise().

double org.bukkit.util.noise.NoiseGenerator.noise ( double  x,
double  y 
)

Computes and returns the 2D noise for the given coordinates in 2D space.

Parameters
xX coordinate
yY coordinate
Returns
Noise at given location, from range -1 to 1

Definition at line 54 of file NoiseGenerator.java.

References org.bukkit.util.noise.NoiseGenerator.noise().

abstract double org.bukkit.util.noise.NoiseGenerator.noise ( double  x,
double  y,
double  z 
)
pure virtual

Computes and returns the 3D noise for the given coordinates in 3D space.

Parameters
xX coordinate
yY coordinate
zZ coordinate
Returns
Noise at given location, from range -1 to 1

Implemented in org.bukkit.util.noise.SimplexNoiseGenerator, and org.bukkit.util.noise.PerlinNoiseGenerator.

double org.bukkit.util.noise.NoiseGenerator.noise ( double  x,
int  octaves,
double  frequency,
double  amplitude 
)

Generates noise for the 1D coordinates using the specified number of octaves and parameters.

Parameters
xX-coordinate
octavesNumber of octaves to use
frequencyHow much to alter the frequency by each octave
amplitudeHow much to alter the amplitude by each octave
Returns
Resulting noise

Definition at line 77 of file NoiseGenerator.java.

References org.bukkit.util.noise.NoiseGenerator.noise().

double org.bukkit.util.noise.NoiseGenerator.noise ( double  x,
int  octaves,
double  frequency,
double  amplitude,
boolean  normalized 
)

Generates noise for the 1D coordinates using the specified number of octaves and parameters.

Parameters
xX-coordinate
octavesNumber of octaves to use
frequencyHow much to alter the frequency by each octave
amplitudeHow much to alter the amplitude by each octave
normalizedIf true, normalize the value to [-1, 1]
Returns
Resulting noise

Definition at line 91 of file NoiseGenerator.java.

References org.bukkit.util.noise.NoiseGenerator.noise().

double org.bukkit.util.noise.NoiseGenerator.noise ( double  x,
double  y,
int  octaves,
double  frequency,
double  amplitude 
)

Generates noise for the 2D coordinates using the specified number of octaves and parameters.

Parameters
xX-coordinate
yY-coordinate
octavesNumber of octaves to use
frequencyHow much to alter the frequency by each octave
amplitudeHow much to alter the amplitude by each octave
Returns
Resulting noise

Definition at line 105 of file NoiseGenerator.java.

References org.bukkit.util.noise.NoiseGenerator.noise().

double org.bukkit.util.noise.NoiseGenerator.noise ( double  x,
double  y,
int  octaves,
double  frequency,
double  amplitude,
boolean  normalized 
)

Generates noise for the 2D coordinates using the specified number of octaves and parameters.

Parameters
xX-coordinate
yY-coordinate
octavesNumber of octaves to use
frequencyHow much to alter the frequency by each octave
amplitudeHow much to alter the amplitude by each octave
normalizedIf true, normalize the value to [-1, 1]
Returns
Resulting noise

Definition at line 120 of file NoiseGenerator.java.

References org.bukkit.util.noise.NoiseGenerator.noise().

double org.bukkit.util.noise.NoiseGenerator.noise ( double  x,
double  y,
double  z,
int  octaves,
double  frequency,
double  amplitude 
)

Generates noise for the 3D coordinates using the specified number of octaves and parameters.

Parameters
xX-coordinate
yY-coordinate
zZ-coordinate
octavesNumber of octaves to use
frequencyHow much to alter the frequency by each octave
amplitudeHow much to alter the amplitude by each octave
Returns
Resulting noise

Definition at line 135 of file NoiseGenerator.java.

References org.bukkit.util.noise.NoiseGenerator.noise().

double org.bukkit.util.noise.NoiseGenerator.noise ( double  x,
double  y,
double  z,
int  octaves,
double  frequency,
double  amplitude,
boolean  normalized 
)

Generates noise for the 3D coordinates using the specified number of octaves and parameters.

Parameters
xX-coordinate
yY-coordinate
zZ-coordinate
octavesNumber of octaves to use
frequencyHow much to alter the frequency by each octave
amplitudeHow much to alter the amplitude by each octave
normalizedIf true, normalize the value to [-1, 1]
Returns
Resulting noise

Definition at line 151 of file NoiseGenerator.java.

References org.bukkit.util.noise.NoiseGenerator.noise().

Member Data Documentation

final int org.bukkit.util.noise.NoiseGenerator.perm[] = new int[512]
protected

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