载入中...
搜索中...
未找到
HexMapGenerator.h
浏览该文件的文档.
1#pragma once
2#include "common/Export.h"
3
4
7#include "common/Result.h"
8#include "hexmap/HexMap.h"
9#include "hexmap/HexMetrics.h"
10
11#include <cstdint>
12
13namespace eve::hexmap {
14
23 std::uint32_t seed = 0u;
24
26 float highRiseProbability = 0.25f;
28 float sinkProbability = 0.2f;
30 float jitterProbability = 0.25f;
31
33 std::int32_t chunkSizeMin = 30;
35 std::int32_t chunkSizeMax = 100;
37 std::int32_t landPercentage = 50;
39 std::int32_t waterLevel = 3;
41 std::int32_t elevationMinimum = -2;
43 std::int32_t elevationMaximum = 8;
44
46 std::int32_t mapBorderX = 5;
48 std::int32_t mapBorderZ = 5;
50 std::int32_t regionBorder = 5;
52 std::int32_t regionCount = 1;
54 std::int32_t erosionPercentage = 50;
55
57 float startingMoisture = 0.1f;
59 float evaporationFactor = 0.5f;
61 float precipitationFactor = 0.25f;
63 float runoffFactor = 0.25f;
65 float seepageFactor = 0.25f;
69 float windStrength = 4.f;
70
72 std::int32_t riverPercentage = 10;
74 float extraLakeProbability = 0.25f;
75
77 float lowTemperature = 0.f;
79 float highTemperature = 1.f;
81 float temperatureJitter = 0.1f;
82};
83
106
107} // namespace eve::hexmap
#define EVENGINE_API_WORLD
Definition Export.h:109
float u
Definition Grass.cpp:233
Editable hex cell grid: topology, queries, picking and authoring.
Pointy-top hex metrics, directions and vertex helpers.
Move-only, checked operation results for the common layer.
TerrainThermalSettings settings
Move-only operation result carrying either a value or Status.
Definition Result.h:155
An editable, chunked, pointy-top hex map.
Definition HexMap.h:72
HexDirection
Hex facing directions, counter-clockwise from north-east.
Definition HexMetrics.h:59
Result< void > generateHexMap(HexMap &map, const HexMapGeneratorSettings &settings)
Replaces the grid's contents with a procedurally generated map.
Tunables of the reference project's map generator.
float extraLakeProbability
Probability that a low point becomes an extra lake instead of land.
float evaporationFactor
Share of a cell's moisture that evaporates before it spreads.
float highRiseProbability
Probability that a land seed starts one elevation step higher.
std::int32_t regionCount
Number of independent land regions.
std::int32_t landPercentage
Target share of the map that ends up above the water level, in percent.
std::int32_t chunkSizeMax
Largest land-region growth step, in cells.
std::int32_t erosionPercentage
Share of the land that is eroded back towards the water level, in percent.
std::int32_t riverPercentage
Target share of the map covered by rivers, in percent.
float lowTemperature
Temperature at the lowest elevation.
float highTemperature
Temperature at the highest elevation.
std::int32_t elevationMinimum
Lowest elevation the generator writes.
std::int32_t mapBorderX
Unused border of the map in the X direction, in cells.
std::int32_t waterLevel
Cells at or below this elevation are flooded.
float seepageFactor
Share of a cell's moisture that seeps into the ground.
float startingMoisture
Moisture every cell starts with, in [0, 1].
std::uint32_t seed
Deterministic seed; the same seed and grid always produce the same map.
float sinkProbability
Probability that a land seed starts one elevation step lower.
float precipitationFactor
Share of a cell's moisture that rains out as it spreads downwind.
HexDirection windDirection
Direction the wind blows towards, used by the moisture model.
std::int32_t chunkSizeMin
Smallest land-region growth step, in cells.
std::int32_t mapBorderZ
Unused border of the map in the Z direction, in cells.
float temperatureJitter
Per-cell random spread added to the temperature.
std::int32_t regionBorder
Gap kept between two generated regions, in cells.
float jitterProbability
Probability that a region grows by a random block instead of a square.
std::int32_t elevationMaximum
Highest elevation the generator writes.
float runoffFactor
Share of a cell's moisture that runs downhill instead of spreading.
float windStrength
Wind strength, in cells the moisture is pushed per step.