载入中...
搜索中...
未找到
HexMapMesh.h
浏览该文件的文档.
31 [[nodiscard]] static float encodeIndices(std::int32_t a, std::int32_t b, std::int32_t c) noexcept {
35 [[nodiscard]] static float encodeWeights(float weightB, float weightC) noexcept { return weightB + weightC * 16.f; }
45 [[nodiscard]] static HexTerrainWeights primary() noexcept { return HexTerrainWeights{1.f, 0.f, 0.f}; }
47 [[nodiscard]] static HexTerrainWeights blend(float t) noexcept { return HexTerrainWeights{1.f - t, t, 0.f}; }
53 [[nodiscard]] static HexTerrainWeights lerp(const HexTerrainWeights& a, const HexTerrainWeights& b,
70EVENGINE_API_WORLD void buildTerrainMesh(const HexMap& map, std::int32_t chunkIndex, HexMeshData& out);
78EVENGINE_API_WORLD void buildWaterMesh(const HexMap& map, std::int32_t chunkIndex, HexMeshData& out);
103EVENGINE_API_WORLD void buildChunkSurfaceMesh(const HexMap& map, std::int32_t chunkIndex, HexSurface surface,
122EVENGINE_API_WORLD void buildFogMesh(const HexMap& map, const HexVisibility& visibility, std::int32_t chunkIndex,
Editable hex cell grid: topology, queries, picking and authoring.
CPU vertex/index container shared by the hex surface builders.
Reference-counted cell visibility and explored state.
Definition HexCell.h:9
void buildRoadMesh(const HexMap &map, std::int32_t chunkIndex, HexMeshData &out)
Builds the road surface of one chunk.
Definition HexRoadMesh.cpp:102
void buildChunkSurfaceMesh(const HexMap &map, std::int32_t chunkIndex, HexSurface surface, HexMeshData &out)
Builds one chunk surface by dispatching on surface.
Definition HexMapMesh.cpp:5
EVENGINE_API_WORLD void buildTerrainMesh(const HexMap &map, std::int32_t chunkIndex, HexMeshData &out)
Builds the ground, terrace and cliff surface of one chunk.
Definition HexTerrainMesh.cpp:729
void buildRiverMesh(const HexMap &map, std::int32_t chunkIndex, HexMeshData &out)
Builds the river channel surface of one chunk.
Definition HexRiverMesh.cpp:103
EVENGINE_API_WORLD void buildWaterMesh(const HexMap &map, std::int32_t chunkIndex, HexMeshData &out)
Builds the water surface and shore band of one chunk.
Definition HexWaterMesh.cpp:191
void buildFogMesh(const HexMap &map, const HexVisibility &visibility, std::int32_t chunkIndex, HexMeshData &out)
Builds the fog-of-war overlay of one chunk.
Definition HexFogMesh.cpp:116
Encodes the three contributing cells of a terrain vertex.
Definition HexMapMesh.h:29
static float encodeIndices(std::int32_t a, std::int32_t b, std::int32_t c) noexcept
First texture coordinate, carrying the three terrain indices.
Definition HexMapMesh.h:31
static float encodeWeights(float weightB, float weightC) noexcept
Second texture coordinate, carrying the secondary/tertiary weights.
Definition HexMapMesh.h:35
Terrain-layer weights of a vertex; the three entries sum to 1.
Definition HexMapMesh.h:39
static HexTerrainWeights blend(float t) noexcept
Weights of two cells, t towards the second.
Definition HexMapMesh.h:47
static HexTerrainWeights lerp(const HexTerrainWeights &a, const HexTerrainWeights &b, float t) noexcept
Interpolates two weight sets.
Definition HexMapMesh.h:53
static HexTerrainWeights blend3(float t2, float t3) noexcept
Weights of three cells, t2/t3 towards the second and third.
Definition HexMapMesh.h:49
static HexTerrainWeights primary() noexcept
Weights of the first cell alone.
Definition HexMapMesh.h:45