载入中...
搜索中...
未找到
HexMap.h
浏览该文件的文档.
89 [[nodiscard]] Result<void> reset(std::int32_t cellCountX, std::int32_t cellCountZ, std::uint32_t seed);
104 [[nodiscard]] std::int32_t cellCount() const noexcept { return static_cast<std::int32_t>(cells_.size()); }
212 [[nodiscard]] Result<HexCoordinates> pickCell(HexVec3 rayOrigin, HexVec3 rayDirection) const noexcept;
294 [[nodiscard]] Result<void> editElevation(HexCoordinates center, std::int32_t radius, std::int32_t delta);
296 [[nodiscard]] Result<void> editWaterLevel(HexCoordinates center, std::int32_t radius, std::int32_t delta);
298 [[nodiscard]] Result<void> editTerrainType(HexCoordinates center, std::int32_t radius, std::int32_t terrainType);
300 [[nodiscard]] Result<void> editFeatureLevel(HexCoordinates center, std::int32_t radius, std::int32_t feature,
304 void collectBrush(HexCoordinates center, std::int32_t radius, std::vector<std::int32_t>& out) const;
Packed per-cell state records of the hex map.
Axial hex coordinates and world-space conversion.
Pointy-top hex metrics, directions and vertex helpers.
Deterministic asset-free noise for hex perturbation and generation.
Move-only, checked operation results for the common layer.
Packed boolean cell state (roads, rivers, walls, exploration).
Definition HexCell.h:123
std::uint64_t revision() const noexcept
Monotonic counter bumped by every mutation; used to detect stale meshes.
Definition HexMap.h:108
bool contains(HexCoordinates coordinates) const noexcept
Whether coordinates address a cell inside the grid.
Definition HexMap.h:122
const HexNoise & noise() const noexcept
Deterministic noise field shared by this map's mesh builders.
Definition HexMap.h:110
HexVec3 cellGroundPosition(HexCoordinates coordinates) const noexcept
Cell centre at y = 0 (no elevation, no perturbation).
Definition HexMap.h:198
Deterministic four-channel value noise over the XZ plane.
Definition HexNoise.h:23
Definition HexCell.h:9
constexpr std::int32_t kMaxHexGridDimension
Largest grid edge, in cells, any entry point may request.
Definition HexMap.h:47
@ Feature
Urban, farm, plant and special decorations; built by buildFeatureMesh.
@ Terrain
@ Wall
City/farm walls, wall towers and bridges; built by buildWallMesh.
HexEdgeType
Relationship between two neighbouring cells of different elevation.
Definition HexMetrics.h:93
Definition Container.h:602
One cell of the hex map: packed values plus packed flags.
Definition HexCell.h:244
Minimal 3-component float vector used by the hex mesh builders.
Definition HexMetrics.h:18