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

#include <RadientImportedDocument.hpp>

Public Attributes

std::string Name
RadientTransform Transform {}
Bool Visible = True
RefCntAutoPtr< IRadientMeshAsset > pMesh
std::vector< Float32 > MorphWeights
Uint32 SkinIndex = InvalidImportedSkinIndex
Uint32 LightIndex = InvalidImportedLightIndex
std::optional< RadientCameraComponent > Camera
std::optional< RadientLightComponent > Light
std::vector< Uint32 > Children

Detailed Description

One node in an imported document's hierarchy.

Its position in ImportedDocument::Nodes is its document-local node index. Instantiation creates an entity for each occurrence of the node in the selected scene hierarchy. The node owns its metadata and retains its mesh.

Member Data Documentation

◆ Camera

std::optional<RadientCameraComponent> Diligent::RadientImport::ImportedNode::Camera

Optional camera component copied onto the instantiated entity. An empty optional creates no camera component.

◆ Children

std::vector<Uint32> Diligent::RadientImport::ImportedNode::Children

Owned array of zero-based indices in ImportedDocument::Nodes, in child instantiation order. Each child is instantiated under this node's entity. An empty array identifies a leaf. The hierarchy contains no cycles.

◆ Light

std::optional<RadientLightComponent> Diligent::RadientImport::ImportedNode::Light

Optional light component copied onto the instantiated entity. An empty optional creates no light component.

◆ LightIndex

Uint32 Diligent::RadientImport::ImportedNode::LightIndex = InvalidImportedLightIndex

Document-local identifier used by light animation targets, or InvalidImportedLightIndex when the light has no animation identifier. A RadientLightAnimationSchemaID target's Object matches this value. This is not a node index or an index into an asset array. Multiple nodes may use the same identifier; animation then updates each instantiated light with that identifier. The identifier is ignored when Light is empty.

◆ MorphWeights

std::vector<Float32> Diligent::RadientImport::ImportedNode::MorphWeights

Owned node-specific morph weights, in the mesh's morph-target order. An empty array uses the mesh defaults. When the array and target counts differ, instantiation applies their common prefix, retains defaults for remaining targets, and ignores excess weights. Weights are ignored when the node has no mesh or the mesh has no morph targets.

◆ Name

std::string Diligent::RadientImport::ImportedNode::Name

Owned entity name. An empty string selects a generated name during instantiation. Names need not be unique and do not identify animation targets.

◆ pMesh

RefCntAutoPtr<IRadientMeshAsset> Diligent::RadientImport::ImportedNode::pMesh

Strong reference to the mesh attached to this node. A null reference creates no mesh component. Multiple nodes may reference the same mesh.

◆ SkinIndex

Uint32 Diligent::RadientImport::ImportedNode::SkinIndex = InvalidImportedSkinIndex

Zero-based index in ImportedDocument::Skins, or InvalidImportedSkinIndex when the node does not use skinning. Skinning applies to pMesh. Nodes that use the same skin share a skeleton pose within one scene instantiation; separate scene instantiations create independent poses.

◆ Transform

RadientTransform Diligent::RadientImport::ImportedNode::Transform {}

Local transform relative to the parent node, or to the scene instance's root entity for a root node. The default transform is identity.

◆ Visible

Bool Diligent::RadientImport::ImportedNode::Visible = True

Node-local visibility. Effective visibility also depends on every ancestor in the instantiated scene hierarchy.