Diligent Engine
Loading...
Searching...
No Matches
Diligent::RadientImport::ImportedDocument Struct Reference

#include <RadientImportedDocument.hpp>

Public Attributes

TextureAssetList Textures
MaterialAssetList Materials
MeshAssetList Meshes
SkinAssetList Skins
std::vector< ImportedNode > Nodes
std::vector< ImportedScene > Scenes
std::vector< ImportedAnimation > Animations
Uint32 DefaultSceneId = 0

Detailed Description

Radient-native scene data produced by an asset importer.

The document owns every string, array, and component value stored in its records and holds strong references to its assets. Copying duplicates the metadata and retains the same assets; it does not clone asset data. Moving transfers the owned metadata and asset references. Scene-asset storage takes ownership of a completed document by moving it, so the importer's document object does not need to remain alive. The records have no source-format fields; retained assets may independently retain source data while loading.

Node, scene, and skin indices are zero-based positions in the corresponding arrays. Reordering an array requires updating all indices that refer to it, including animation targets and skin mappings. Light identifiers instead match ImportedNode::LightIndex and do not index an array in this document.

Member Data Documentation

◆ Animations

std::vector<ImportedAnimation> Diligent::RadientImport::ImportedDocument::Animations

Owned animation records available to scene instances. Only destinations present in the selected scene are bound during instantiation.

◆ DefaultSceneId

Uint32 Diligent::RadientImport::ImportedDocument::DefaultSceneId = 0

Zero-based index in Scenes selected when no explicit scene is requested. An out-of-range value falls back to scene zero. If Scenes is empty, the default scene has no nodes to instantiate.

◆ Materials

MaterialAssetList Diligent::RadientImport::ImportedDocument::Materials

Strong references to imported materials. Meshes carry their primitives' material references; this array also records the scene's material load and GPU-resource dependencies. Null entries are permitted and do not contribute to those dependencies. Material animation targets index this array, so reordering it requires updating their Object identifiers.

◆ Meshes

MeshAssetList Diligent::RadientImport::ImportedDocument::Meshes

Strong references to imported meshes. Nodes select meshes through pMesh; this array also records the scene's mesh load and GPU-resource dependencies. Null entries are permitted and do not contribute to those dependencies.

◆ Nodes

std::vector<ImportedNode> Diligent::RadientImport::ImportedDocument::Nodes

Owned node records shared by all scenes. Children, scene roots, and node and morph animation targets identify nodes by their positions in this array.

◆ Scenes

std::vector<ImportedScene> Diligent::RadientImport::ImportedDocument::Scenes

Owned scene records. Scene selection and DefaultSceneId index this array. A document with no scenes instantiates an empty hierarchy when the default scene is requested.

◆ Skins

SkinAssetList Diligent::RadientImport::ImportedDocument::Skins

Strong references to imported skins, indexed by ImportedNode::SkinIndex and ImportedAnimationSkinMapping::SkinIndex. Each skin retains its skeleton. Null entries are permitted; nodes referencing them instantiate without skinning.

◆ Textures

TextureAssetList Diligent::RadientImport::ImportedDocument::Textures

Strong references to imported textures. Materials reference the textures they use independently; node and animation indices do not index this array. Null entries are permitted. Texture load failures do not independently determine scene readiness; material dependencies account for texture use.