载入中...
搜索中...
未找到
CanonicalMesh.cpp
浏览该文件的文档.
22Result<CanonicalMeshData> decodeCanonicalMesh(std::span<const std::uint8_t> bytes, const CanonicalMeshLimits& limits) {
27 Diagnostic::error(DiagnosticCode::ParseError, "canonical mesh header is invalid", {}, {}, "asset.mesh"));
33 3ull + ((flags & 1u) ? 3ull : 0ull) + uint64_t(candidateUvCount) * 2ull + ((flags & 2u) ? 4ull : 0ull);
45 Diagnostic::error(DiagnosticCode::ParseError, "canonical mesh metadata is invalid", {}, {}, "asset.mesh"));
48 Diagnostic::error(DiagnosticCode::InvalidArgument, "canonical mesh exceeds limits", {}, {}, "asset.mesh"));
73 Diagnostic::error(DiagnosticCode::ParseError, "invalid attribute semantic", {}, {}, "asset.mesh"));
80 Diagnostic::error(DiagnosticCode::ParseError, "invalid attribute descriptor", {}, {}, "asset.mesh"));
92 const uint64_t expected = header + uint64_t(vertexCount) * floatsPerVertex * 4 + uint64_t(indexCount) * 4;
104 DiagnosticCode::ParseError, "UV set descriptors must be strictly increasing", {}, {}, "asset.mesh"));
117 DiagnosticCode::ParseError, "canonical mesh contains a non-finite value", {}, {}, "asset.mesh"));
148 DiagnosticCode::ParseError, "canonical mesh index exceeds vertex count", {}, {}, "asset.mesh"));
ScriptMotionSinkStore< ScriptMotionSink< MotionColorTraits > > colors
Definition MotionScriptBindings.cpp:218
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.cpp:21
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:196
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:24
Definition AssetCooker.cpp:19
Result< CanonicalMeshData > decodeCanonicalMesh(std::span< const std::uint8_t > bytes, const CanonicalMeshLimits &limits)
Decode canonical EVMESH binary v1, v2 or v3 into independently owned arrays.
Definition CanonicalMesh.cpp:22
@ InvalidArgument
@ ParseError
Owning float vertex attribute; one to four components per vertex.
Definition CanonicalMesh.h:11
Owning CPU mesh snapshot; UV arrays are packed ST pairs indexed by source set number....
Definition CanonicalMesh.h:18
Allocation limits checked before decoding any vertex arrays. UV count is byte-budget bounded.
Definition CanonicalMesh.h:27