PocketMine-MP 5.23.3 git-f7687af337d001ddbcc47b8e773f014a33faa662
Loading...
Searching...
No Matches
pocketmine\world\generator\noise\Simplex Class Reference
+ Inheritance diagram for pocketmine\world\generator\noise\Simplex:
+ Collaboration diagram for pocketmine\world\generator\noise\Simplex:

Public Member Functions

 __construct (Random $random, int $octaves, float $persistence, float $expansion)
 
 getFastNoise1D (int $xSize, int $samplingRate, int $x, int $y, int $z)
 
 getFastNoise2D (int $xSize, int $zSize, int $samplingRate, int $x, int $y, int $z)
 
 getFastNoise3D (int $xSize, int $ySize, int $zSize, int $xSamplingRate, int $ySamplingRate, int $zSamplingRate, int $x, int $y, int $z)
 
 getNoise2D ($x, $y)
 
 getNoise3D ($x, $y, $z)
 
 noise2D ($x, $z, $normalized=false)
 
 noise3D ($x, $y, $z, $normalized=false)
 

Static Public Member Functions

static bilinearLerp ($x, $y, $q00, $q01, $q10, $q11, $x1, $x2, $y1, $y2)
 
static linearLerp ($x, $x1, $x2, $q0, $q1)
 
static trilinearLerp ($x, $y, $z, $q000, $q001, $q010, $q011, $q100, $q101, $q110, $q111, $x1, $x2, $y1, $y2, $z1, $z2)
 

Protected Attributes

float $offsetX
 
float $offsetY
 
float $offsetZ
 
array $perm = []
 
const F2 = 0.5 * (M_SQRT3 - 1)
 
const F3 = 1.0 / 3.0
 
const G2 = (3 - M_SQRT3) / 6
 
const G22 = self::G2 * 2.0 - 1
 
const G3 = 1.0 / 6.0
 
const grad3
 

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

Constructor & Destructor Documentation

◆ __construct()

pocketmine\world\generator\noise\Simplex::__construct ( Random $random,
int $octaves,
float $persistence,
float $expansion )

Definition at line 55 of file Simplex.php.

Member Function Documentation

◆ bilinearLerp()

static pocketmine\world\generator\noise\Noise::bilinearLerp ( $x,
$y,
$q00,
$q01,
$q10,
$q11,
$x1,
$x2,
$y1,
$y2 )
staticinherited
Parameters
float$x
float$y
float$q00
float$q01
float$q10
float$q11
float$x1
float$x2
float$y1
float$y2
Returns
float

Definition at line 61 of file Noise.php.

◆ getFastNoise1D()

pocketmine\world\generator\noise\Noise::getFastNoise1D ( int $xSize,
int $samplingRate,
int $x,
int $y,
int $z )
inherited
Returns
\SplFixedArray|float[] @phpstan-return \SplFixedArray<float>

Definition at line 203 of file Noise.php.

◆ getFastNoise2D()

pocketmine\world\generator\noise\Noise::getFastNoise2D ( int $xSize,
int $zSize,
int $samplingRate,
int $x,
int $y,
int $z )
inherited
Returns
\SplFixedArray|float[][] @phpstan-return \SplFixedArray<\SplFixedArray<float>>

Definition at line 238 of file Noise.php.

◆ getFastNoise3D()

pocketmine\world\generator\noise\Noise::getFastNoise3D ( int $xSize,
int $ySize,
int $zSize,
int $xSamplingRate,
int $ySamplingRate,
int $zSamplingRate,
int $x,
int $y,
int $z )
inherited
Returns
float[][][]

Definition at line 285 of file Noise.php.

◆ getNoise2D()

pocketmine\world\generator\noise\Simplex::getNoise2D ( $x,
$y )
Parameters
float$x
float$y
Returns
float

Reimplemented from pocketmine\world\generator\noise\Noise.

Definition at line 215 of file Simplex.php.

◆ getNoise3D()

pocketmine\world\generator\noise\Simplex::getNoise3D ( $x,
$y,
$z )
Parameters
float$x
float$y
float$z
Returns
float

Reimplemented from pocketmine\world\generator\noise\Noise.

Definition at line 85 of file Simplex.php.

◆ linearLerp()

static pocketmine\world\generator\noise\Noise::linearLerp ( $x,
$x1,
$x2,
$q0,
$q1 )
staticinherited
Parameters
float$x
float$x1
float$x2
float$q0
float$q1
Returns
float

Definition at line 43 of file Noise.php.

◆ noise2D()

pocketmine\world\generator\noise\Noise::noise2D ( $x,
$z,
$normalized = false )
inherited
Parameters
float$x
float$z
bool$normalized
Returns
float

Definition at line 144 of file Noise.php.

References pocketmine\world\generator\noise\Noise\getNoise2D().

+ Here is the call graph for this function:

◆ noise3D()

pocketmine\world\generator\noise\Noise::noise3D ( $x,
$y,
$z,
$normalized = false )
inherited
Parameters
float$x
float$y
float$z
bool$normalized
Returns
float

Definition at line 175 of file Noise.php.

References pocketmine\world\generator\noise\Noise\getNoise3D().

+ Here is the call graph for this function:

◆ trilinearLerp()

static pocketmine\world\generator\noise\Noise::trilinearLerp ( $x,
$y,
$z,
$q000,
$q001,
$q010,
$q011,
$q100,
$q101,
$q110,
$q111,
$x1,
$x2,
$y1,
$y2,
$z1,
$z2 )
staticinherited
Parameters
float$x
float$y
float$z
float$q000
float$q001
float$q010
float$q011
float$q100
float$q101
float$q110
float$q111
float$x1
float$x2
float$y1
float$y2
float$z1
float$z2
Returns
float

Definition at line 93 of file Noise.php.

Member Data Documentation

◆ $offsetX

float pocketmine\world\generator\noise\Simplex::$offsetX
protected

Definition at line 49 of file Simplex.php.

◆ $offsetY

float pocketmine\world\generator\noise\Simplex::$offsetY
protected

Definition at line 51 of file Simplex.php.

◆ $offsetZ

float pocketmine\world\generator\noise\Simplex::$offsetZ
protected

Definition at line 50 of file Simplex.php.

◆ $perm

array pocketmine\world\generator\noise\Simplex::$perm = []
protected

Definition at line 53 of file Simplex.php.

◆ F2

const pocketmine\world\generator\noise\Simplex::F2 = 0.5 * (M_SQRT3 - 1)
protected

Definition at line 43 of file Simplex.php.

◆ F3

const pocketmine\world\generator\noise\Simplex::F3 = 1.0 / 3.0
protected

Definition at line 46 of file Simplex.php.

◆ G2

const pocketmine\world\generator\noise\Simplex::G2 = (3 - M_SQRT3) / 6
protected

Definition at line 44 of file Simplex.php.

◆ G22

const pocketmine\world\generator\noise\Simplex::G22 = self::G2 * 2.0 - 1
protected

Definition at line 45 of file Simplex.php.

◆ G3

const pocketmine\world\generator\noise\Simplex::G3 = 1.0 / 6.0
protected

Definition at line 47 of file Simplex.php.

◆ grad3

const pocketmine\world\generator\noise\Simplex::grad3
protected
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 37 of file Simplex.php.


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