Package gaiasky.scenegraph.component
Class ElevationComponent
java.lang.Object
gaiasky.scenegraph.component.ElevationComponent
public class ElevationComponent
extends java.lang.Object
Contains the parameters and functions for procedural elevation
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ElevationComponent.NoiseType
-
Constructor Summary
Constructors Constructor Description ElevationComponent()
-
Method Summary
Modifier and Type Method Description Pair<float[][],com.badlogic.gdx.graphics.Pixmap>
generateElevation(int N, int M, float heightScale)
void
initOctaves()
Initialize the octave frequencies and amplitudes with the default values if neededvoid
setNoiseOctaves(double[][] octaves)
Sets the noiseOctaves as a matrix of [frequency,amplitude]void
setNoisePower(java.lang.Double power)
void
setNoiseSize(java.lang.Double noiseSize)
Only if height isMaterialComponent.GEN_HEIGHT_KEYWORD
void
setNoiseType(java.lang.String noiseType)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ElevationComponent
public ElevationComponent()
-
-
Method Details
-
generateElevation
public Pair<float[][],com.badlogic.gdx.graphics.Pixmap> generateElevation(int N, int M, float heightScale) -
initOctaves
public void initOctaves()Initialize the octave frequencies and amplitudes with the default values if needed -
setNoiseType
public void setNoiseType(java.lang.String noiseType) -
setNoiseSize
public void setNoiseSize(java.lang.Double noiseSize)Only if height isMaterialComponent.GEN_HEIGHT_KEYWORD
- Parameters:
noiseSize
- Size of the sampling area
-
setNoiseOctaves
public void setNoiseOctaves(double[][] octaves)Sets the noiseOctaves as a matrix of [frequency,amplitude]- Parameters:
octaves
- The noiseOctaves
-
setNoisePower
public void setNoisePower(java.lang.Double power)
-