Package schule.ngb.zm.util
Class Noise
java.lang.Object
schule.ngb.zm.util.Noise
Generator für Perlin-Noise.
Die Implementierung basiert auf dem von Ken Perlin entwickelten Algorithmus und wurde anhand der Beschreibung von FLAFLA2 implementiert.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble
double
double
double
double
double
int
void
double
noise
(double x) double
noise
(double x, double y) double
noise
(double x, double y, double z) void
setAmplitude
(double pAmplitude) void
setFrequency
(double pFrequency) void
setOctaves
(double pOctaves) void
setPersistence
(double pPersistence) void
setRange
(double pRangeMin, double pRangeMax) void
setRepeat
(int pRepeat)
-
Constructor Details
-
Noise
public Noise() -
Noise
public Noise(long seed) -
Noise
Initialisiert diesen Perlin-Noise mit dem angegebenen Zufallsgenerator.- Parameters:
rand
- Ein Zufallsgenerator-Objekt.
-
-
Method Details
-
getOctaves
public double getOctaves() -
setOctaves
public void setOctaves(double pOctaves) -
getPersistence
public double getPersistence() -
setPersistence
public void setPersistence(double pPersistence) -
getFrequency
public double getFrequency() -
setFrequency
public void setFrequency(double pFrequency) -
getAmplitude
public double getAmplitude() -
setAmplitude
public void setAmplitude(double pAmplitude) -
setRange
public void setRange(double pRangeMin, double pRangeMax) -
getRangeMin
public double getRangeMin() -
getRangeMax
public double getRangeMax() -
getRepeat
public int getRepeat() -
setRepeat
public void setRepeat(int pRepeat) -
noise
public double noise(double x) -
noise
public double noise(double x, double y) -
noise
public double noise(double x, double y, double z) -
init
-