Bukkit  1.4.7-R1.0
 All Classes Namespaces Files Functions Variables Enumerator Pages
org.bukkit.util.noise.SimplexNoiseGenerator Class Reference

Generates simplex-based noise. More...

+ Inheritance diagram for org.bukkit.util.noise.SimplexNoiseGenerator:
+ Collaboration diagram for org.bukkit.util.noise.SimplexNoiseGenerator:

Public Member Functions

 SimplexNoiseGenerator (World world)
 Creates a seeded simplex noise generator for the given world.
 
 SimplexNoiseGenerator (long seed)
 Creates a seeded simplex noise generator for the given seed.
 
 SimplexNoiseGenerator (Random rand)
 Creates a seeded simplex noise generator with the given Random.
 
double noise (double xin, double yin, double zin)
 Computes and returns the 3D noise for the given coordinates in 3D space.
 
double noise (double xin, double yin)
 
double noise (double x, double y, double z, double w)
 Computes and returns the 4D simplex noise for the given coordinates in 4D space.
 
- Public Member Functions inherited from org.bukkit.util.noise.PerlinNoiseGenerator
 PerlinNoiseGenerator (World world)
 Creates a seeded perlin noise generator for the given world.
 
 PerlinNoiseGenerator (long seed)
 Creates a seeded perlin noise generator for the given seed.
 
 PerlinNoiseGenerator (Random rand)
 Creates a seeded perlin noise generator with the given Random.
 
- Public Member Functions inherited from org.bukkit.util.noise.NoiseGenerator
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.
 
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 double getNoise (double xin)
 Computes and returns the 1D unseeded simplex noise for the given coordinates in 1D space.
 
static double getNoise (double xin, double yin)
 Computes and returns the 2D unseeded simplex noise for the given coordinates in 2D space.
 
static double getNoise (double xin, double yin, double zin)
 Computes and returns the 3D unseeded simplex noise for the given coordinates in 3D space.
 
static double getNoise (double x, double y, double z, double w)
 Computes and returns the 4D simplex noise for the given coordinates in 4D space.
 
static SimplexNoiseGenerator getInstance ()
 Gets the singleton unseeded instance of this generator.
 
- Static Public Member Functions inherited from org.bukkit.util.noise.PerlinNoiseGenerator
static double getNoise (double x)
 Computes and returns the 1D unseeded perlin noise for the given coordinates in 1D space.
 
static double getNoise (double x, double y)
 Computes and returns the 2D unseeded perlin noise for the given coordinates in 2D space.
 
static double getNoise (double x, double y, double z)
 Computes and returns the 3D unseeded perlin noise for the given coordinates in 3D space.
 
static PerlinNoiseGenerator getInstance ()
 Gets the singleton unseeded instance of this generator.
 
static double getNoise (double x, int octaves, double frequency, double amplitude)
 Generates noise for the 1D coordinates using the specified number of octaves and parameters.
 
static double getNoise (double x, double y, int octaves, double frequency, double amplitude)
 Generates noise for the 2D coordinates using the specified number of octaves and parameters.
 
static double getNoise (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.
 
- Static Public Member Functions inherited from org.bukkit.util.noise.NoiseGenerator
static int floor (double x)
 Speedy floor, faster than (int)Math.floor(x)
 

Protected Member Functions

 SimplexNoiseGenerator ()
 
- Protected Member Functions inherited from org.bukkit.util.noise.PerlinNoiseGenerator
 PerlinNoiseGenerator ()
 

Static Protected Member Functions

static double dot (int g[], double x, double y)
 
static double dot (int g[], double x, double y, double z)
 
static double dot (int g[], double x, double y, double z, double w)
 

Static Protected Attributes

static final double SQRT_3 = Math.sqrt(3)
 
static final double SQRT_5 = Math.sqrt(5)
 
static final double F2 = 0.5 * (SQRT_3 - 1)
 
static final double G2 = (3 - SQRT_3) / 6
 
static final double G22 = G2 * 2.0 - 1
 
static final double F3 = 1.0 / 3.0
 
static final double G3 = 1.0 / 6.0
 
static final double F4 = (SQRT_5 - 1.0) / 4.0
 
static final double G4 = (5.0 - SQRT_5) / 20.0
 
static final double G42 = G4 * 2.0
 
static final double G43 = G4 * 3.0
 
static final double G44 = G4 * 4.0 - 1.0
 
static final int grad4 [][]
 
static final int simplex [][]
 
static double offsetW
 
- Static Protected Attributes inherited from org.bukkit.util.noise.PerlinNoiseGenerator
static final int grad3 [][]
 

Additional Inherited Members

- Protected Attributes inherited from org.bukkit.util.noise.NoiseGenerator
final int perm [] = new int[512]
 
double offsetX
 
double offsetY
 
double offsetZ
 

Detailed Description

Generates simplex-based noise.

This is a modified version of the freely published version in the paper by Stefan Gustavson at http://staffwww.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf

Definition at line 12 of file SimplexNoiseGenerator.java.

Constructor & Destructor Documentation

org.bukkit.util.noise.SimplexNoiseGenerator.SimplexNoiseGenerator ( )
protected

Definition at line 45 of file SimplexNoiseGenerator.java.

org.bukkit.util.noise.SimplexNoiseGenerator.SimplexNoiseGenerator ( World  world)

Creates a seeded simplex noise generator for the given world.

Parameters
worldWorld to construct this generator for

Definition at line 54 of file SimplexNoiseGenerator.java.

References org.bukkit.World.getSeed().

org.bukkit.util.noise.SimplexNoiseGenerator.SimplexNoiseGenerator ( long  seed)

Creates a seeded simplex noise generator for the given seed.

Parameters
seedSeed to construct this generator for

Definition at line 63 of file SimplexNoiseGenerator.java.

org.bukkit.util.noise.SimplexNoiseGenerator.SimplexNoiseGenerator ( Random  rand)

Creates a seeded simplex noise generator with the given Random.

Parameters
randRandom to construct with

Definition at line 72 of file SimplexNoiseGenerator.java.

References org.bukkit.util.noise.SimplexNoiseGenerator.offsetW.

Member Function Documentation

static double org.bukkit.util.noise.SimplexNoiseGenerator.dot ( int  g[],
double  x,
double  y 
)
staticprotected
static double org.bukkit.util.noise.SimplexNoiseGenerator.dot ( int  g[],
double  x,
double  y,
double  z 
)
staticprotected

Definition at line 81 of file SimplexNoiseGenerator.java.

static double org.bukkit.util.noise.SimplexNoiseGenerator.dot ( int  g[],
double  x,
double  y,
double  z,
double  w 
)
staticprotected

Definition at line 85 of file SimplexNoiseGenerator.java.

static SimplexNoiseGenerator org.bukkit.util.noise.SimplexNoiseGenerator.getInstance ( )
static

Gets the singleton unseeded instance of this generator.

Returns
Singleton

Definition at line 510 of file SimplexNoiseGenerator.java.

static double org.bukkit.util.noise.SimplexNoiseGenerator.getNoise ( double  xin)
static

Computes and returns the 1D unseeded simplex noise for the given coordinates in 1D space.

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

Definition at line 95 of file SimplexNoiseGenerator.java.

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

static double org.bukkit.util.noise.SimplexNoiseGenerator.getNoise ( double  xin,
double  yin 
)
static

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

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

Definition at line 106 of file SimplexNoiseGenerator.java.

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

static double org.bukkit.util.noise.SimplexNoiseGenerator.getNoise ( double  xin,
double  yin,
double  zin 
)
static

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

Parameters
xinX coordinate
yinY coordinate
zinZ coordinate
Returns
Noise at given location, from range -1 to 1

Definition at line 118 of file SimplexNoiseGenerator.java.

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

static double org.bukkit.util.noise.SimplexNoiseGenerator.getNoise ( double  x,
double  y,
double  z,
double  w 
)
static

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

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

Definition at line 131 of file SimplexNoiseGenerator.java.

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

double org.bukkit.util.noise.SimplexNoiseGenerator.noise ( double  x,
double  y,
double  z 
)
virtual

Member Data Documentation

final double org.bukkit.util.noise.SimplexNoiseGenerator.F2 = 0.5 * (SQRT_3 - 1)
staticprotected
final double org.bukkit.util.noise.SimplexNoiseGenerator.F3 = 1.0 / 3.0
staticprotected
final double org.bukkit.util.noise.SimplexNoiseGenerator.F4 = (SQRT_5 - 1.0) / 4.0
staticprotected
final double org.bukkit.util.noise.SimplexNoiseGenerator.G2 = (3 - SQRT_3) / 6
staticprotected
final double org.bukkit.util.noise.SimplexNoiseGenerator.G22 = G2 * 2.0 - 1
staticprotected
final double org.bukkit.util.noise.SimplexNoiseGenerator.G3 = 1.0 / 6.0
staticprotected
final double org.bukkit.util.noise.SimplexNoiseGenerator.G4 = (5.0 - SQRT_5) / 20.0
staticprotected
final double org.bukkit.util.noise.SimplexNoiseGenerator.G42 = G4 * 2.0
staticprotected
final double org.bukkit.util.noise.SimplexNoiseGenerator.G43 = G4 * 3.0
staticprotected
final double org.bukkit.util.noise.SimplexNoiseGenerator.G44 = G4 * 4.0 - 1.0
staticprotected
final int org.bukkit.util.noise.SimplexNoiseGenerator.grad4[][]
staticprotected
Initial value:
= {{0, 1, 1, 1}, {0, 1, 1, -1}, {0, 1, -1, 1}, {0, 1, -1, -1},
{0, -1, 1, 1}, {0, -1, 1, -1}, {0, -1, -1, 1}, {0, -1, -1, -1},
{1, 0, 1, 1}, {1, 0, 1, -1}, {1, 0, -1, 1}, {1, 0, -1, -1},
{-1, 0, 1, 1}, {-1, 0, 1, -1}, {-1, 0, -1, 1}, {-1, 0, -1, -1},
{1, 1, 0, 1}, {1, 1, 0, -1}, {1, -1, 0, 1}, {1, -1, 0, -1},
{-1, 1, 0, 1}, {-1, 1, 0, -1}, {-1, -1, 0, 1}, {-1, -1, 0, -1},
{1, 1, 1, 0}, {1, 1, -1, 0}, {1, -1, 1, 0}, {1, -1, -1, 0},
{-1, 1, 1, 0}, {-1, 1, -1, 0}, {-1, -1, 1, 0}, {-1, -1, -1, 0}}

Definition at line 25 of file SimplexNoiseGenerator.java.

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

double org.bukkit.util.noise.SimplexNoiseGenerator.offsetW
staticprotected
final int org.bukkit.util.noise.SimplexNoiseGenerator.simplex[][]
staticprotected
Initial value:
= {
{0, 1, 2, 3}, {0, 1, 3, 2}, {0, 0, 0, 0}, {0, 2, 3, 1}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {1, 2, 3, 0},
{0, 2, 1, 3}, {0, 0, 0, 0}, {0, 3, 1, 2}, {0, 3, 2, 1}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {1, 3, 2, 0},
{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0},
{1, 2, 0, 3}, {0, 0, 0, 0}, {1, 3, 0, 2}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {2, 3, 0, 1}, {2, 3, 1, 0},
{1, 0, 2, 3}, {1, 0, 3, 2}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {2, 0, 3, 1}, {0, 0, 0, 0}, {2, 1, 3, 0},
{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0},
{2, 0, 1, 3}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {3, 0, 1, 2}, {3, 0, 2, 1}, {0, 0, 0, 0}, {3, 1, 2, 0},
{2, 1, 0, 3}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {3, 1, 0, 2}, {0, 0, 0, 0}, {3, 2, 0, 1}, {3, 2, 1, 0}}

Definition at line 33 of file SimplexNoiseGenerator.java.

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

final double org.bukkit.util.noise.SimplexNoiseGenerator.SQRT_3 = Math.sqrt(3)
staticprotected

Definition at line 13 of file SimplexNoiseGenerator.java.

final double org.bukkit.util.noise.SimplexNoiseGenerator.SQRT_5 = Math.sqrt(5)
staticprotected

Definition at line 14 of file SimplexNoiseGenerator.java.


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