PocketMine-MP  1.4 - API 1.10.0
 All Classes Namespaces Functions Variables Pages
pocketmine\level\generator\noise\Simplex Class Reference
+ Inheritance diagram for pocketmine\level\generator\noise\Simplex:
+ Collaboration diagram for pocketmine\level\generator\noise\Simplex:

Public Member Functions

 __construct (Random $random, $octaves, $frequency, $amplitude)
 
 getNoise3D ($x, $y, $z)
 
 getNoise2D ($x, $y)
 
 noise2D ($x, $z, $normalized=false)
 
 noise3D ($x, $y, $z, $normalized=false)
 
 setOffset ($x, $y, $z)
 

Static Public Member Functions

static floor ($x)
 
static fade ($x)
 
static lerp ($x, $y, $z)
 
static grad ($hash, $x, $y, $z)
 

Static Public Attributes

static $grad3
 

Static Protected Member Functions

static dot2D ($g, $x, $y)
 
static dot3D ($g, $x, $y, $z)
 
static dot4D ($g, $x, $y, $z, $w)
 

Protected Attributes

 $offsetW
 
 $perm = []
 
 $offsetX = 0
 
 $offsetY = 0
 
 $offsetZ = 0
 
 $octaves = 8
 
 $frequency
 
 $amplitude
 

Static Protected Attributes

static $SQRT_3
 
static $SQRT_5
 
static $F2
 
static $G2
 
static $G22
 
static $F3
 
static $G3
 
static $F4
 
static $G4
 
static $G42
 
static $G43
 
static $G44
 
static $grad4
 
static $simplex
 

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 33 of file Simplex.php.

Member Data Documentation

pocketmine\level\generator\noise\Perlin::$grad3
staticinherited
Initial value:
= [
[1, 1, 0], [-1, 1, 0], [1, -1, 0], [-1, -1, 0],
[1, 0, 1], [-1, 0, 1], [1, 0, -1], [-1, 0, -1],
[0, 1, 1], [0, -1, 1], [0, 1, -1], [0, -1, -1]
]

Definition at line 27 of file Perlin.php.

pocketmine\level\generator\noise\Simplex::$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 46 of file Simplex.php.

pocketmine\level\generator\noise\Simplex::$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 54 of file Simplex.php.


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