载入中...
搜索中...
未找到
EvpackTerrainLoader.cpp
浏览该文件的文档.
54 DiagnosticCode::Conflict, "terrain has duplicate bulk chunks", {}, {}, "asset.procgen.terrain"));
75 DiagnosticCode::InvalidArgument, "terrain dimensions, spacing, or payload size is invalid", {}, {},
115 DiagnosticCode::Unsupported, "anisotropic terrain spacing is not supported by SpatialData", {}, {},
Runtime decoding of canonical terrain assets.
JSON-free versioned runtime metadata codec.
Owning, renderer-independent dynamic values.
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={}, DiagnosticDetails details={}, std::string source={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.h:125
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:175
const std::string & asString() const
Return the string payload; the caller must have checked the kind.
Definition Value.cpp:87
std::int64_t asInt() const
Return the Int64 payload; the caller must have checked the kind.
Definition Value.cpp:69
Result< RuntimeAssetPayload > read(const AssetRef &asset, std::string_view expectedType, const EvpackCapabilities &capabilities, std::uint64_t maximumDecodedBytes) const
Resolve, type-check, variant-select and decode a canonical runtime asset.
Definition EvpackResourceReader.cpp:10
Result< LoadedTerrain > load(const AssetRef &terrain, const asset::EvpackCapabilities &capabilities, const TerrainAssetLoadLimits &limits={}) const
Decode and validate one canonical terrain without mutating a world.
Definition EvpackTerrainLoader.cpp:36
In-memory terrain heightmap: a dense float grid (row-major, index = y * width + x) materialized from ...
Definition Heightmap.h:21
static SpatialData heightfield(const Heightmap &heightmap, float originX, float originZ, float cellSize, float heightScale)
Create a sampled heightfield surface in world space.
Definition SpatialData.cpp:200
std::uint32_t little32(std::span< const std::uint8_t > bytes, std::size_t offset)
Read a uint32 after the caller has bounded the byte range.
Definition GltfDecode.cpp:22
Result< Value > decodeRuntimeDefinition(std::span< const std::uint8_t > bytes, const RuntimeDefinitionLimits &limits)
Decode a bounded EVDEF\0\1 metadata tree without a JSON parser.
Definition RuntimeDefinition.cpp:246
@ Definition
std::variant< std::monostate, std::int64_t, double, std::string, bool > Value
Definition Database.h:26
const EditorValue * field(const EditorValue &value, const char *name)
Definition RoadNetworkEditTarget.cpp:15
@ InvalidArgument
@ Unsupported
@ ParseError
@ Conflict
Actual runtime device capabilities used for variant selection.
Definition Evpack.h:92
One decoded runtime chunk with its admitted semantic metadata.
Definition EvpackResourceReader.h:13
std::vector< std::uint8_t > bytes
Definition EvpackResourceReader.h:16
Structural and allocation limits for untrusted EVDEF metadata.
Definition RuntimeDefinition.h:17
std::uint64_t maximumBytes
Definition RuntimeDefinition.h:18
Explicit resource limits applied before terrain allocation.
Definition EvpackTerrainLoader.h:14