Package com.jme3.terrain.noise.fractal
Class FractalSum
java.lang.Object
com.jme3.terrain.noise.basis.Noise
com.jme3.terrain.noise.fractal.FractalSum
FractalSum is the simplest form of fractal functions summing up a few octaves
of the noise value with an ever decreasing roughness (0 to 1) amplitude
lacunarity = 2.0f is the classical octave distance
Note: though noise basis functions are generally designed to return value
between -1..1, there sum can easily be made to extend out of this range. To
handle this is up to the user.
-
Field Summary
Fields inherited from class com.jme3.terrain.noise.basis.Noise
modulators, scale
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfloat
float
float
float
float
void
init()
setAmplitude
(float amplitude) setFrequency
(float frequency) setLacunarity
(float lacunarity) setOctaves
(float octaves) setRoughness
(float roughness) float
value
(float x, float y, float z) Methods inherited from class com.jme3.terrain.noise.basis.Noise
addModulator, getBuffer, getScale, modulate, setScale, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.jme3.terrain.noise.Basis
addModulator, getBuffer, getScale, setScale
-
Constructor Details
-
FractalSum
public FractalSum()
-
-
Method Details
-
value
public float value(float x, float y, float z) -
addBasis
-
getOctaves
public float getOctaves() -
setOctaves
- Specified by:
setOctaves
in interfaceFractal
-
getFrequency
public float getFrequency() -
setFrequency
- Specified by:
setFrequency
in interfaceFractal
-
getRoughness
public float getRoughness() -
setRoughness
- Specified by:
setRoughness
in interfaceFractal
-
getAmplitude
public float getAmplitude() -
setAmplitude
- Specified by:
setAmplitude
in interfaceFractal
-
getLacunarity
public float getLacunarity() -
setLacunarity
- Specified by:
setLacunarity
in interfaceFractal
-
init
public void init()
-