类 | |
| struct | Accessor |
| Borrowed validated accessor; its source document/resources must outlive synchronous reads. 更多... | |
| struct | Document |
| Owning parsed document; keep alive while resolved buffer spans are used. 更多... | |
函数 | |
| Result< void > | appendAnimation (const GltfImportRequest &request, const Value::Object &root, const std::vector< std::span< const std::uint8_t > > &buffers, PreparedAssetImport &output) |
| Append owning canonical skeleton, skin and clip assets to an unpublished candidate. | |
| const Value * | member (const Value::Object &object, std::string_view name) |
| Find an internal JSON field. @ownership Borrowed, nullable observer of object-owned storage. @lifetime Valid only until the object is mutated or destroyed; never retained by the importer. | |
| Result< std::uint64_t > | unsignedValue (const Value *value, std::string path, bool required=true, std::uint64_t fallback=0) |
| Validate an optional integer field. @ownership Borrowed nullable field owned by the input document. @lifetime Must remain valid for this call only; no pointer is retained. | |
| 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. | |
| void | put32 (std::vector< std::uint8_t > &bytes, std::uint32_t value) |
| Append little-endian uint32 to owned storage. | |
| void | putFloat (std::vector< std::uint8_t > &bytes, float value) |
| Append IEEE FLOAT to owned storage. | |
| Result< Document > | parseDocument (const GltfImportRequest &request) |
| Parse a bounded document into an owning result. | |
| bool | safeUri (std::string_view uri, const AssetImportLimits &limits) |
| Result< std::vector< std::span< const std::uint8_t > > > | resolveBuffers (const Value::Object &root, const Document &document, const GltfImportRequest &request) |
| Resolve immutable spans borrowed from document/request; both must outlive their use. | |
| std::uint32_t | componentSize (std::uint32_t type) |
| Return encoded component byte size, or zero for an unknown type. | |
| Result< Accessor > | accessorAt (const Value::Object &root, const std::vector< std::span< const std::uint8_t > > &buffers, std::uint64_t accessorIndex, const AssetImportLimits &limits) |
| Validate an accessor retaining only buffer spans borrowed for this import. | |
| Result< float > | readFloat (const Accessor &accessor, std::uint32_t element, std::uint32_t component) |
| Read one bounded finite FLOAT component. | |
| Result< std::uint32_t > | readIndex (const Accessor &accessor, std::uint32_t element) |
| Read one bounded unsigned scalar index. | |
| bool | supportsMaterialExtension (std::string_view name) |
| Whether this adapter translates the named standard material/texture extension. | |
| Result< void > | appendMaterials (const GltfImportRequest &request, const Value::Object &root, const std::vector< std::span< const uint8_t > > &buffers, PreparedAssetImport &output) |
| Result< void > | appendMaterials (const GltfImportRequest &request, const Value::Object &root, const std::vector< std::span< const std::uint8_t > > &buffers, PreparedAssetImport &output) |
| Append owned material/image assets and required bindings to an unpublished candidate. | |
函数说明
◆ accessorAt()
| Result< Accessor > eve::asset_import::gltf::accessorAt | ( | const Value::Object & | root, |
| const std::vector< std::span< const std::uint8_t > > & | buffers, | ||
| std::uint64_t | accessorIndex, | ||
| const AssetImportLimits & | limits | ||
| ) |
Validate an accessor retaining only buffer spans borrowed for this import.
在文件 GltfDecode.cpp 第 148 行定义.
引用了 eve::Value::asString(), componentSize(), count, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, eve::Value::isString(), limits, member, eve::ParseError, required, root, eve::Result< T >::success(), unsignedValue(), eve::Unsupported , 以及 view.
◆ appendAnimation()
| Result< void > eve::asset_import::gltf::appendAnimation | ( | const GltfImportRequest & | request, |
| const Value::Object & | root, | ||
| const std::vector< std::span< const std::uint8_t > > & | buffers, | ||
| PreparedAssetImport & | output | ||
| ) |
Append owning canonical skeleton, skin and clip assets to an unpublished candidate.
- 参数
-
request Borrowed input, valid for this synchronous call. root Borrowed parsed document, unchanged during this call. buffers Borrowed decoded buffers, valid for this call only. output Unpublished candidate; discard it on failure.
- 返回
- Structured admission failure or success. No callbacks, IO or retained borrows. @thread Worker-safe with exclusive access to output.
在文件 GltfAnimation.cpp 第 379 行定义.
引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), output, request, root , 以及 eve::Result< T >::success().
◆ appendMaterials() [1/2]
| Result< void > eve::asset_import::gltf::appendMaterials | ( | const GltfImportRequest & | request, |
| const Value::Object & | root, | ||
| const std::vector< std::span< const std::uint8_t > > & | buffers, | ||
| PreparedAssetImport & | output | ||
| ) |
Append owned material/image assets and required bindings to an unpublished candidate.
- 参数
-
request Borrowed source, valid for this synchronous call. root Borrowed immutable JSON document. buffers Borrowed source buffers, never retained. output Exclusively owned unpublished candidate; discard on failure.
- 返回
- Checked admission result. Worker-safe; no IO or callbacks.
◆ appendMaterials() [2/2]
| Result< void > eve::asset_import::gltf::appendMaterials | ( | const GltfImportRequest & | request, |
| const Value::Object & | root, | ||
| const std::vector< std::span< const uint8_t > > & | buffers, | ||
| PreparedAssetImport & | output | ||
| ) |
在文件 GltfMaterials.cpp 第 315 行定义.
引用了 error, eve::Diagnostic::error(), eve::Result< T >::failure(), output, request, root, eve::Result< T >::success() , 以及 eve::Unsupported.
◆ componentSize()
| std::uint32_t eve::asset_import::gltf::componentSize | ( | std::uint32_t | type | ) |
Return encoded component byte size, or zero for an unknown type.
在文件 GltfDecode.cpp 第 141 行定义.
引用了 type.
被这些函数引用 accessorAt().
◆ little32()
| std::uint32_t eve::asset_import::gltf::little32 | ( | std::span< const std::uint8_t > | bytes, |
| std::size_t | offset | ||
| ) |
Read a uint32 after the caller has bounded the byte range.
在文件 GltfDecode.cpp 第 22 行定义.
被这些函数引用 parseDocument(), readFloat() , 以及 readIndex().
◆ member()
| const Value * eve::asset_import::gltf::member | ( | const Value::Object & | object, |
| std::string_view | name | ||
| ) |
Find an internal JSON field. @ownership Borrowed, nullable observer of object-owned storage. @lifetime Valid only until the object is mutated or destroyed; never retained by the importer.
在文件 GltfDecode.cpp 第 8 行定义.
引用了 eve::Value::find(), found , 以及 name.
◆ parseDocument()
| Result< Document > eve::asset_import::gltf::parseDocument | ( | const GltfImportRequest & | request | ) |
Parse a bounded document into an owning result.
在文件 GltfDecode.cpp 第 34 行定义.
引用了 bytes, cursor, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::Value::fromJson(), eve::InvalidArgument, little32(), eve::ParseError, request , 以及 eve::Result< T >::success().
◆ put32()
| void eve::asset_import::gltf::put32 | ( | std::vector< std::uint8_t > & | bytes, |
| std::uint32_t | value | ||
| ) |
Append little-endian uint32 to owned storage.
在文件 GltfDecode.cpp 第 27 行定义.
被这些函数引用 eve::asset_import::prepareLegacyAnimationImport() , 以及 putFloat().
◆ putFloat()
| void eve::asset_import::gltf::putFloat | ( | std::vector< std::uint8_t > & | bytes, |
| float | value | ||
| ) |
Append IEEE FLOAT to owned storage.
在文件 GltfDecode.cpp 第 31 行定义.
引用了 bytes, put32() , 以及 value.
被这些函数引用 eve::asset_import::prepareCanonicalTerrainImport() , 以及 eve::asset_import::prepareLegacyAnimationImport().
◆ readFloat()
| Result< float > eve::asset_import::gltf::readFloat | ( | const Accessor & | accessor, |
| std::uint32_t | element, | ||
| std::uint32_t | component | ||
| ) |
Read one bounded finite FLOAT component.
在文件 GltfDecode.cpp 第 221 行定义.
引用了 eve::asset_import::gltf::Accessor::buffer, eve::asset_import::gltf::Accessor::components, eve::asset_import::gltf::Accessor::componentType, eve::asset_import::gltf::Accessor::count, element, eve::Diagnostic::error(), eve::Result< T >::failure(), little32(), eve::asset_import::gltf::Accessor::normalized, offset, eve::asset_import::gltf::Accessor::offset, eve::ParseError, eve::asset_import::gltf::Accessor::stride, eve::Result< T >::success(), eve::Unsupported , 以及 value.
◆ readIndex()
| Result< std::uint32_t > eve::asset_import::gltf::readIndex | ( | const Accessor & | accessor, |
| std::uint32_t | element | ||
| ) |
Read one bounded unsigned scalar index.
在文件 GltfDecode.cpp 第 234 行定义.
引用了 eve::asset_import::gltf::Accessor::buffer, eve::asset_import::gltf::Accessor::components, eve::asset_import::gltf::Accessor::componentType, element, eve::Diagnostic::error(), eve::Result< T >::failure(), little32(), offset, eve::asset_import::gltf::Accessor::offset, eve::ParseError, eve::asset_import::gltf::Accessor::stride, eve::Result< T >::success() , 以及 eve::Unsupported.
◆ resolveBuffers()
| Result< std::vector< std::span< const std::uint8_t > > > eve::asset_import::gltf::resolveBuffers | ( | const Value::Object & | root, |
| const Document & | document, | ||
| const GltfImportRequest & | request | ||
| ) |
Resolve immutable spans borrowed from document/request; both must outlive their use.
在文件 GltfDecode.cpp 第 89 行定义.
引用了 eve::Value::asString(), eve::asset_import::gltf::Document::binaryChunk, eve::Diagnostic::error(), found, eve::Value::getIf(), index, eve::InvalidArgument, eve::Value::isString(), member, eve::NotFound, eve::ParseError, request, root, safeUri(), unsignedValue() , 以及 eve::Unsupported.
◆ safeUri()
| bool eve::asset_import::gltf::safeUri | ( | std::string_view | uri, |
| const AssetImportLimits & | limits | ||
| ) |
◆ supportsMaterialExtension()
| bool eve::asset_import::gltf::supportsMaterialExtension | ( | std::string_view | name | ) |
Whether this adapter translates the named standard material/texture extension.
在文件 GltfMaterials.cpp 第 310 行定义.
引用了 name.
◆ unsignedValue()
| Result< std::uint64_t > eve::asset_import::gltf::unsignedValue | ( | const Value * | value, |
| std::string | path, | ||
| bool | required, | ||
| std::uint64_t | fallback | ||
| ) |
Validate an optional integer field. @ownership Borrowed nullable field owned by the input document. @lifetime Must remain valid for this call only; no pointer is retained.
在文件 GltfDecode.cpp 第 13 行定义.
引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::ParseError, path, required, eve::Result< T >::success() , 以及 value.
被这些函数引用 accessorAt() , 以及 resolveBuffers().