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 int
Beach
static float
beachColor
float[]
BIOME_COLOR_TABLE
float[]
BIOME_DARK_COLOR_TABLE
static float[]
BIOME_TABLE
protected float[]
biomeColors
protected WorldMapGenerator.DetailedBiomeMapper
biomeMapper
static int
BorealForest
static float
borealForestColor
protected float[][]
colorMap
static float
deepColor
static int
Desert
static float
desertColor
static int
Empty
static float
emptyColor
static float
foamColor
static int
Grassland
static float
grasslandColor
protected int
height
static int
Ice
static float
iceColor
static int
Ocean
static int
Rocky
static float
rockyColor
static int
Savanna
static float
savannaColor
static int
SeasonalForest
static float
seasonalForestColor
static int
Shallow
static float
shallowColor
static int
TemperateRainforest
static float
temperateRainforestColor
static int
TropicalRainforest
static float
tropicalRainforestColor
static int
Tundra
static float
tundraColor
protected int
width
static int
Woodland
static float
woodlandColor
protected WorldMapGenerator
world
-
Constructor Summary
Constructors Constructor Description WorldMapView(long seed, int width, int height)
WorldMapView(WorldMapGenerator worldMapGenerator)
-
Method Summary
Modifier and Type Method Description void
generate()
void
generate(double landMod, double heatMod)
void
generate(int seedA, int seedB, double landMod, double heatMod)
WorldMapGenerator.DetailedBiomeMapper
getBiomeMapper()
float[][]
getColorMap()
int
getHeight()
int
getWidth()
WorldMapGenerator
getWorld()
void
initialize()
void
initialize(float hue, float saturation, float brightness, float contrast)
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).void
match(float... similarColors)
Initializes the colors to use in some combination for all biomes, without regard for what the biome really is.void
setBiomeMapper(WorldMapGenerator.DetailedBiomeMapper biomeMapper)
void
setWorld(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 libGDXColor
or 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 withdeepColor
to get most ocean colorsdeepColor
- the color of very deep water; will be mixed withshallowColor
to 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
-