载入中...
搜索中...
未找到
eve::asset_import::gltf 命名空间参考

类

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 
)

◆ 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.

参数
requestBorrowed input, valid for this synchronous call.
rootBorrowed parsed document, unchanged during this call.
buffersBorrowed decoded buffers, valid for this call only.
outputUnpublished 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().

被这些函数引用 eve::asset_import::prepareGltfImport().

◆ 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.

参数
requestBorrowed source, valid for this synchronous call.
rootBorrowed immutable JSON document.
buffersBorrowed source buffers, never retained.
outputExclusively 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 
)

◆ 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 行定义.

引用了 bytes , 以及 offset.

被这些函数引用 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)

◆ 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 行定义.

引用了 bytes , 以及 value.

被这些函数引用 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()

◆ readIndex()

◆ 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 
)

◆ safeUri()

bool eve::asset_import::gltf::safeUri ( std::string_view  uri,
const AssetImportLimits &  limits 
)

在文件 GltfDecode.cpp 第 75 行定义.

引用了 index, limits, start , 以及 uri.

被这些函数引用 resolveBuffers().

◆ 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.

被这些函数引用 eve::asset_import::prepareGltfImport().

◆ 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().