Package squidpony.squidgrid.gui.gdx
Class WorldMapView
java.lang.Object
squidpony.squidgrid.gui.gdx.WorldMapView
public class WorldMapView extends Object
Created by Tommy Ettinger on 9/6/2019.
-
Field Summary
Fields Modifier and Type Field Description static intBeachstatic floatbeachColorfloat[]BIOME_COLOR_TABLEfloat[]BIOME_DARK_COLOR_TABLEstatic float[]BIOME_TABLEprotected float[]biomeColorsprotected WorldMapGenerator.DetailedBiomeMapperbiomeMapperstatic intBorealForeststatic floatborealForestColorprotected float[][]colorMapstatic floatdeepColorstatic intDesertstatic floatdesertColorstatic intEmptystatic floatemptyColorstatic floatfoamColorstatic intGrasslandstatic floatgrasslandColorprotected intheightstatic intIcestatic floaticeColorstatic intOceanstatic intRockystatic floatrockyColorstatic intSavannastatic floatsavannaColorstatic intSeasonalForeststatic floatseasonalForestColorstatic intShallowstatic floatshallowColorstatic intTemperateRainforeststatic floattemperateRainforestColorstatic intTropicalRainforeststatic floattropicalRainforestColorstatic intTundrastatic floattundraColorprotected intwidthstatic intWoodlandstatic floatwoodlandColorprotected WorldMapGeneratorworld -
Constructor Summary
Constructors Constructor Description WorldMapView(long seed, int width, int height)WorldMapView(WorldMapGenerator worldMapGenerator) -
Method Summary
Modifier and Type Method Description voidgenerate()voidgenerate(double landMod, double heatMod)voidgenerate(int seedA, int seedB, double landMod, double heatMod)WorldMapGenerator.DetailedBiomeMappergetBiomeMapper()float[][]getColorMap()intgetHeight()intgetWidth()WorldMapGeneratorgetWorld()voidinitialize()voidinitialize(float hue, float saturation, float brightness, float contrast)voidinitialize(com.badlogic.gdx.graphics.Color desertColor, com.badlogic.gdx.graphics.Color savannaColor, com.badlogic.gdx.graphics.Color tropicalRainforestColor, com.badlogic.gdx.graphics.Color grasslandColor, com.badlogic.gdx.graphics.Color woodlandColor, com.badlogic.gdx.graphics.Color seasonalForestColor, com.badlogic.gdx.graphics.Color temperateRainforestColor, com.badlogic.gdx.graphics.Color borealForestColor, com.badlogic.gdx.graphics.Color tundraColor, com.badlogic.gdx.graphics.Color iceColor, com.badlogic.gdx.graphics.Color beachColor, com.badlogic.gdx.graphics.Color rockyColor, com.badlogic.gdx.graphics.Color shallowColor, com.badlogic.gdx.graphics.Color deepColor, com.badlogic.gdx.graphics.Color emptyColor)Initializes the colors to use for each biome (these are almost always mixed with other biome colors in practice).voidmatch(float... similarColors)Initializes the colors to use in some combination for all biomes, without regard for what the biome really is.voidsetBiomeMapper(WorldMapGenerator.DetailedBiomeMapper biomeMapper)voidsetWorld(WorldMapGenerator world)float[][]show()
-
Field Details
-
width
-
height
-
colorMap
-
world
-
biomeMapper
-
Desert
- See Also:
- Constant Field Values
-
Savanna
- See Also:
- Constant Field Values
-
TropicalRainforest
- See Also:
- Constant Field Values
-
Grassland
- See Also:
- Constant Field Values
-
Woodland
- See Also:
- Constant Field Values
-
SeasonalForest
- See Also:
- Constant Field Values
-
TemperateRainforest
- See Also:
- Constant Field Values
-
BorealForest
- See Also:
- Constant Field Values
-
Tundra
- See Also:
- Constant Field Values
-
Ice
- See Also:
- Constant Field Values
-
Beach
- See Also:
- Constant Field Values
-
Rocky
- See Also:
- Constant Field Values
-
Shallow
- See Also:
- Constant Field Values
-
Ocean
- See Also:
- Constant Field Values
-
Empty
- See Also:
- Constant Field Values
-
iceColor
-
desertColor
-
savannaColor
-
tropicalRainforestColor
-
tundraColor
-
temperateRainforestColor
-
grasslandColor
-
seasonalForestColor
-
borealForestColor
-
woodlandColor
-
rockyColor
-
beachColor
-
emptyColor
-
deepColor
-
shallowColor
-
foamColor
-
biomeColors
-
BIOME_TABLE
-
BIOME_COLOR_TABLE
-
BIOME_DARK_COLOR_TABLE
-
-
Constructor Details
-
Method Details
-
getWidth
-
getHeight
-
getColorMap
-
getBiomeMapper
-
setBiomeMapper
-
getWorld
-
setWorld
-
initialize
-
initialize
-
initialize
public void initialize(com.badlogic.gdx.graphics.Color desertColor, com.badlogic.gdx.graphics.Color savannaColor, com.badlogic.gdx.graphics.Color tropicalRainforestColor, com.badlogic.gdx.graphics.Color grasslandColor, com.badlogic.gdx.graphics.Color woodlandColor, com.badlogic.gdx.graphics.Color seasonalForestColor, com.badlogic.gdx.graphics.Color temperateRainforestColor, com.badlogic.gdx.graphics.Color borealForestColor, com.badlogic.gdx.graphics.Color tundraColor, com.badlogic.gdx.graphics.Color iceColor, com.badlogic.gdx.graphics.Color beachColor, com.badlogic.gdx.graphics.Color rockyColor, com.badlogic.gdx.graphics.Color shallowColor, com.badlogic.gdx.graphics.Color deepColor, com.badlogic.gdx.graphics.Color emptyColor)Initializes the colors to use for each biome (these are almost always mixed with other biome colors in practice). Each parameter may be null to use the default for an Earth-like world; otherwise it should be a libGDXColoror some subclass, likeSColor. All non-null parameters should probably be fully opaque, exceptemptyColor, which is only used for world maps that show empty space (like a globe, as produced byWorldMapGenerator.RotatingSpaceMap).- Parameters:
desertColor- hot, dry, barren land; may be sandy, but many real-world deserts don't have much sandsavannaColor- hot, mostly-dry land with some parched vegetation; also called scrub or chaparraltropicalRainforestColor- hot, extremely wet forests with dense rich vegetationgrasslandColor- prairies that are dry and usually wind-swept, but not especially hot or coldwoodlandColor- part-way between a prairie and a forest; not especially hot or coldseasonalForestColor- forest that becomes barren in winter (deciduous trees); not especially hot or coldtemperateRainforestColor- forest that tends to be slightly warm but very wetborealForestColor- forest that tends to be cold and very wettundraColor- very cold plains that still have some low-lying vegetation; also called taigaiceColor- cold barren land covered in permafrost; also used for rivers and lakes that are frozenbeachColor- sandy or otherwise light-colored shorelines; here, these are more common in warmer placesrockyColor- rocky or otherwise rugged shorelines; here, these are more common in colder placesshallowColor- the color of very shallow water; will be mixed withdeepColorto get most ocean colorsdeepColor- the color of very deep water; will be mixed withshallowColorto get most ocean colorsemptyColor- the color used for empty space off the edge of the world map; may be transparent
-
match
Initializes the colors to use in some combination for all biomes, without regard for what the biome really is. There should be at least one packed float color given in similarColors, but there can be many of them.- Parameters:
similarColors- an array or vararg of packed float colors with at least one element
-
generate
-
generate
-
generate
-
show
-