Class GalaxyGenerator
java.lang.Object
gaiasky.scene.record.GalaxyGenerator
Generates galaxies as lists of
BillboardDataset objects.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumGalaxy morphologies according to Edwin Hubble's classification. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.badlogic.gdx.utils.JsonValueconvertToJson(com.badlogic.ashley.core.Entity e) com.badlogic.gdx.utils.JsonValueconvertToJson(com.badlogic.ashley.core.Entity full, com.badlogic.ashley.core.Entity half) generateGalaxy(GalaxyGenerator.GalaxyMorphology gm, long seed) Generates galaxies given a morphology.static Stringdouble[]getRandomColors(double[][] colorMatrix)
-
Constructor Details
-
GalaxyGenerator
public GalaxyGenerator()
-
-
Method Details
-
generateGalaxyName
-
generateGalaxy
public Pair<BillboardDataset[], BillboardDataset[]> generateGalaxy(GalaxyGenerator.GalaxyMorphology gm, long seed) Generates galaxies given a morphology.- Parameters:
gm- The galaxy morphology.seed- The RNG seed.- Returns:
- A couple of
BillboardDatasetarrays, the first being the full-resolution channel, and the second being the half-resolution channel.
-
getRandomColors
public double[] getRandomColors(double[][] colorMatrix) -
convertToJson
public com.badlogic.gdx.utils.JsonValue convertToJson(com.badlogic.ashley.core.Entity full, com.badlogic.ashley.core.Entity half) -
convertToJson
public com.badlogic.gdx.utils.JsonValue convertToJson(com.badlogic.ashley.core.Entity e)
-