public static class WorldMapGenerator.LocalMap extends WorldMapGenerator
WorldMapGenerator that does no projection of the map, as if the area were
completely flat or small enough that curvature is impossible to see. This also does not change heat levels at the
far north and south regions of the map, since it is meant for areas that are all about the same heat level.
Example map, showing lack of polar iceWorldMapGenerator.BiomeMapper, WorldMapGenerator.DetailedBiomeMapper, WorldMapGenerator.EllipticalHammerMap, WorldMapGenerator.EllipticalMap, WorldMapGenerator.HexagonalMap, WorldMapGenerator.HyperellipticalMap, WorldMapGenerator.LocalMap, WorldMapGenerator.LocalMimicMap, WorldMapGenerator.MimicMap, WorldMapGenerator.RotatingSpaceMap, WorldMapGenerator.RoundSideMap, WorldMapGenerator.SimpleBiomeMapper, WorldMapGenerator.SpaceViewMap, WorldMapGenerator.SphereMap, WorldMapGenerator.TilingMap| Modifier and Type | Field and Description |
|---|---|
Noise.InverseLayered2D |
heat |
protected static double |
heatFreq |
protected double |
maxHeat0 |
protected double |
maxHeat1 |
protected double |
maxWet0 |
protected double |
minHeat0 |
protected double |
minHeat1 |
protected double |
minWet0 |
Noise.InverseLayered2D |
moisture |
protected static double |
moistureFreq |
protected static double |
otherFreq |
Noise.Maelstrom2D |
otherRidged |
Noise.Maelstrom2D |
terrain |
protected static double |
terrainFreq |
Noise.InverseLayered2D |
terrainLayered |
protected static double |
terrainRidgedFreq |
double[][] |
xPositions |
double[][] |
yPositions |
double[][] |
zPositions |
cacheA, cacheB, centerLongitude, coastalWaterLower, coastalWaterUpper, deepWaterLower, deepWaterUpper, DEFAULT_NOISE, forestLower, forestUpper, grassLower, grassUpper, heatData, heatModifier, height, heightCodeData, heightData, landData, landModifier, maxHeat, maxHeight, maxHeightActual, maxWet, mediumWaterLower, mediumWaterUpper, minHeat, minHeight, minHeightActual, minWet, moistureData, rng, rockLower, rockUpper, sandLower, sandUpper, seedA, seedB, shallowWaterLower, shallowWaterUpper, snowLower, snowUpper, startCacheX, startCacheY, startX, startY, usedHeight, usedWidth, width, zoom, zoomStartX, zoomStartY| Constructor and Description |
|---|
LocalMap()
Constructs a concrete WorldMapGenerator for a map that can be used to wrap a sphere (as with a texture on a
3D model), with seamless east-west wrapping, no north-south wrapping, and distortion that causes the poles to
have significantly-exaggerated-in-size features while the equator is not distorted.
|
LocalMap(int mapWidth,
int mapHeight)
Constructs a concrete WorldMapGenerator for a map that can be used to wrap a sphere (as with a texture on a
3D model), with seamless east-west wrapping, no north-south wrapping, and distortion that causes the poles to
have significantly-exaggerated-in-size features while the equator is not distorted.
|
LocalMap(long initialSeed,
int mapWidth,
int mapHeight)
Constructs a concrete WorldMapGenerator for a map that can be used to wrap a sphere (as with a texture on a
3D model), with seamless east-west wrapping, no north-south wrapping, and distortion that causes the poles to
have significantly-exaggerated-in-size features while the equator is not distorted.
|
LocalMap(long initialSeed,
int mapWidth,
int mapHeight,
double octaveMultiplier)
Constructs a concrete WorldMapGenerator for a map that can be used to wrap a sphere (as with a texture on a
3D model), with seamless east-west wrapping, no north-south wrapping, and distortion that causes the poles to
have significantly-exaggerated-in-size features while the equator is not distorted.
|
LocalMap(long initialSeed,
int mapWidth,
int mapHeight,
Noise.Noise2D noiseGenerator)
Constructs a concrete WorldMapGenerator for a map that can be used to wrap a sphere (as with a texture on a
3D model), with seamless east-west wrapping, no north-south wrapping, and distortion that causes the poles to
have significantly-exaggerated-in-size features while the equator is not distorted.
|
LocalMap(long initialSeed,
int mapWidth,
int mapHeight,
Noise.Noise2D noiseGenerator,
double octaveMultiplier)
Constructs a concrete WorldMapGenerator for a map that can be used to wrap a sphere (as with a texture on a
3D model), with seamless east-west wrapping, no north-south wrapping, and distortion that causes the poles to
have significantly-exaggerated-in-size features while the equator is not distorted.
|
LocalMap(WorldMapGenerator.LocalMap other)
Copies the LocalMap
other to construct a new one that is exactly the same. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
regenerate(int startX,
int startY,
int usedWidth,
int usedHeight,
double landMod,
double heatMod,
int stateA,
int stateB) |
int |
wrapX(int x,
int y) |
int |
wrapY(int x,
int y) |
codeHeight, decodeX, decodeY, generate, generate, generate, getCenterLongitude, project, removeExcess, setCenterLongitude, zoomIn, zoomIn, zoomOut, zoomOutprotected static final double terrainFreq
protected static final double terrainRidgedFreq
protected static final double heatFreq
protected static final double moistureFreq
protected static final double otherFreq
protected double minHeat0
protected double maxHeat0
protected double minHeat1
protected double maxHeat1
protected double minWet0
protected double maxWet0
public final Noise.Maelstrom2D terrain
public final Noise.Maelstrom2D otherRidged
public final Noise.InverseLayered2D heat
public final Noise.InverseLayered2D moisture
public final Noise.InverseLayered2D terrainLayered
public final double[][] xPositions
public final double[][] yPositions
public final double[][] zPositions
public LocalMap()
LocalMap#LocalMap(long, int, int, Noise2D, double), then this would be the
same as passing the parameters 0x1337BABE1337D00DL, 256, 128, DEFAULT_NOISE, 1.0.public LocalMap(int mapWidth,
int mapHeight)
WorldMapGenerator.generate(long). The width and
height of the map cannot be changed after the fact, but you can zoom in.
Uses FastNoise as its noise generator, with 1.0 as the octave multiplier affecting detail.mapWidth - the width of the map(s) to generate; cannot be changed latermapHeight - the height of the map(s) to generate; cannot be changed laterpublic LocalMap(long initialSeed,
int mapWidth,
int mapHeight)
initialSeed
parameter may or may not be used, since you can specify the seed to use when you call WorldMapGenerator.generate(long).
The width and height of the map cannot be changed after the fact, but you can zoom in.
Uses FastNoise as its noise generator, with 1.0 as the octave multiplier affecting detail.initialSeed - the seed for the GWTRNG this uses; this may also be set per-call to generatemapWidth - the width of the map(s) to generate; cannot be changed latermapHeight - the height of the map(s) to generate; cannot be changed laterpublic LocalMap(long initialSeed,
int mapWidth,
int mapHeight,
double octaveMultiplier)
initialSeed
parameter may or may not be used, since you can specify the seed to use when you call WorldMapGenerator.generate(long).
The width and height of the map cannot be changed after the fact, but you can zoom in.
Uses FastNoise as its noise generator, with the given octave multiplier affecting detail.initialSeed - the seed for the GWTRNG this uses; this may also be set per-call to generatemapWidth - the width of the map(s) to generate; cannot be changed latermapHeight - the height of the map(s) to generate; cannot be changed lateroctaveMultiplier - used to adjust the level of detail, with 0.5 at the bare-minimum detail and 1.0 normalpublic LocalMap(long initialSeed,
int mapWidth,
int mapHeight,
Noise.Noise2D noiseGenerator)
initialSeed
parameter may or may not be used, since you can specify the seed to use when you call WorldMapGenerator.generate(long).
The width and height of the map cannot be changed after the fact, but you can zoom in.
Uses the given noise generator, with 1.0 as the octave multiplier affecting detail.initialSeed - the seed for the GWTRNG this uses; this may also be set per-call to generatemapWidth - the width of the map(s) to generate; cannot be changed latermapHeight - the height of the map(s) to generate; cannot be changed laternoiseGenerator - an instance of a noise generator capable of 3D noise, usually FastNoisepublic LocalMap(long initialSeed,
int mapWidth,
int mapHeight,
Noise.Noise2D noiseGenerator,
double octaveMultiplier)
Noise.Noise3D implementation, which is usually FastNoise.instance, and a
multiplier on how many octaves of noise to use, with 1.0 being normal (high) detail and higher multipliers
producing even more detailed noise when zoomed-in). The initialSeed parameter may or may not be used,
since you can specify the seed to use when you call WorldMapGenerator.generate(long). The width and height of the map
cannot be changed after the fact, but you can zoom in. FastNoise will be the fastest 3D generator to use for
noiseGenerator, and the seed it's constructed with doesn't matter because this will change the
seed several times at different scales of noise (it's fine to use the static FastNoise.instance
because it has no changing state between runs of the program). The octaveMultiplier parameter should
probably be no lower than 0.5, but can be arbitrarily high if you're willing to spend much more time on
generating detail only noticeable at very high zoom; normally 1.0 is fine and may even be too high for maps
that don't require zooming.initialSeed - the seed for the GWTRNG this uses; this may also be set per-call to generatemapWidth - the width of the map(s) to generate; cannot be changed latermapHeight - the height of the map(s) to generate; cannot be changed laternoiseGenerator - an instance of a noise generator capable of 3D noise, usually FastNoise.instanceoctaveMultiplier - used to adjust the level of detail, with 0.5 at the bare-minimum detail and 1.0 normalpublic LocalMap(WorldMapGenerator.LocalMap other)
other to construct a new one that is exactly the same. References will only
be shared to Noise classes.other - a LocalMap to copypublic int wrapX(int x,
int y)
wrapX in class WorldMapGeneratorpublic int wrapY(int x,
int y)
wrapY in class WorldMapGeneratorprotected void regenerate(int startX,
int startY,
int usedWidth,
int usedHeight,
double landMod,
double heatMod,
int stateA,
int stateB)
regenerate in class WorldMapGeneratorCopyright © Eben Howard 2012–2022. All rights reserved.