载入中...
搜索中...
未找到
StructuredModelCommon.cpp
浏览该文件的文档.
8Result<void> appendTriangle(asset::CanonicalMeshData& mesh, const std::array<std::array<double, 3>, 3>& triangle,
15 DiagnosticCode::InvalidArgument, "structured model triangle budget exceeded", {}, {}, "asset.import"));
20 DiagnosticCode::ParseError, "nonfinite or overflowing model coordinate", {}, {}, "asset.import"));
33 Diagnostic::error(DiagnosticCode::ParseError, "degenerate model triangle", {}, {}, "asset.import"));
44Result<PreparedAssetImport> packageModel(const ImportPackageIdentity& identity, std::string_view sourceName,
81 auto node = [](PersistentId id, std::int64_t index, std::int64_t parent, std::string name) -> Value {
90 asset::CanonicalMeshLimits meshLimits{limits.maximumVerticesPerPrimitive, limits.maximumIndicesPerPrimitive,
101 for (std::size_t axis = 0; axis < 3; ++axis) minimum[axis] = maximum[axis] = part.mesh.positions[axis];
175 return Output::failure(Diagnostic::error(DiagnosticCode::InvalidArgument, "model sources exceed budget", {},
179 sourceIndex.emplace_back(Value::Object{{"name", name}, {"path", path}, {"hash", detail::sha256(bytes)}});
std::vector< std::pair< std::uint64_t, OceanBoatReceipt > > sources
Definition OceanSprayBindings.cpp:21
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
Result< std::string > toJson() const
Serialize this value as deterministic compact JSON.
Definition Value.cpp:187
EVENGINE_API_PLATFORM Result< void > finalizeImportReport(PreparedAssetImport &prepared, const ImportPackageIdentity &package, std::string_view sourceEngine, std::string_view sourceVersion, Value::Object options={})
Append the deterministic mandatory import report and bind it from provenance.
Definition ImportReport.cpp:21
Result< asset::EvaManifest > baseManifest(const ImportPackageIdentity &package, std::string_view importer)
Base manifest.
Definition ImportCommon.h:31
Result< void > appendTriangle(asset::CanonicalMeshData &mesh, const std::array< std::array< double, 3 >, 3 > &triangle, const AssetImportLimits &limits)
Definition StructuredModelCommon.cpp:8
Result< PreparedAssetImport > packageModel(const ImportPackageIdentity &identity, std::string_view sourceName, std::string_view format, std::map< std::string, MeshPart > parts, const std::map< std::string, std::vector< std::uint8_t > > &sources, std::vector< ImportFinding > findings, const AssetImportLimits &limits)
Definition StructuredModelCommon.cpp:44
EVENGINE_API_FOUNDATION Result< std::vector< std::uint8_t > > encodeCanonicalMesh(const CanonicalMeshData &mesh, const CanonicalMeshLimits &limits={})
Encode an owning snapshot to EVMESH v3, or v2 when no named attributes exist. Borrows input synchrono...
Definition CanonicalMeshEncode.cpp:15
@ RuntimeRequired
@ InvalidArgument
@ ParseError
detail::StrongUint64< detail::SchemaVersionTag > SchemaVersion
Persistent data-format version; not a runtime replacement generation.
Definition SchemaVersion.h:13
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
std::uint64_t maximumDecodedBytes
Definition CanonicalMesh.h:30
Parser and allocation budgets applied to untrusted importer inputs.
Definition AssetImporter.h:17
Common stable package metadata supplied by an import transaction.
Definition AssetImporter.h:33
Owning, validated source archive candidate not yet published to disk/database.
Definition AssetImporter.h:90
asset::EvaManifest manifest
Definition AssetImporter.h:91