Package gaiasky.scenegraph.component
Class ElevationComponent
java.lang.Object
gaiasky.scenegraph.component.ElevationComponent
Contains the parameters and functions for procedural elevation
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionPair<float[][],com.badlogic.gdx.graphics.Pixmap>
generateElevation(int N, int M, float heightScale)
void
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(Double power)
void
setNoiseSize(Double noiseSize)
Only if height isMaterialComponent.GEN_HEIGHT_KEYWORD
void
setNoiseType(String noiseType)
-
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
-
setNoiseSize
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
-