Diligent Engine
Loading...
Searching...
No Matches
Diligent::IRadientScene Struct Referenceabstract

Scene graph and ECS storage interface. More...

#include <RadientScene.h>

Inheritance diagram for Diligent::IRadientScene:
Diligent.IObject

Public Member Functions

virtual const RadientSceneDesc &DILIGENT_CALL_TYPE GetDesc () const =0
 Returns the scene description.
virtual RADIENT_STATUS DILIGENT_CALL_TYPE IsEntityAlive (RadientEntityID Entity) const =0
 Returns RADIENT_STATUS_OK if the entity is alive.
virtual RADIENT_STATUS DILIGENT_CALL_TYPE GetEntityName (RadientEntityID Entity, const Char *&Name) const =0
virtual RADIENT_STATUS DILIGENT_CALL_TYPE GetEntityFlags (RadientEntityID Entity, RADIENT_ENTITY_FLAGS &Flags) const =0
 Gets entity flags.
virtual RADIENT_STATUS DILIGENT_CALL_TYPE GetEntityOwnVisibility (RadientEntityID Entity, Bool &Visible) const =0
 Gets entity's own visibility flag.
virtual RADIENT_STATUS DILIGENT_CALL_TYPE GetEntityEffectiveVisibility (RadientEntityID Entity, Bool &Visible)=0
 Gets effective entity visibility, accounting for parent visibility.
virtual RADIENT_STATUS DILIGENT_CALL_TYPE GetCachedEntityEffectiveVisibility (RadientEntityID Entity, Bool &Visible) const =0
virtual Uint32 DILIGENT_CALL_TYPE GetRootEntityCount () const =0
virtual RADIENT_STATUS DILIGENT_CALL_TYPE GetRootEntities (Uint32 Capacity, RadientEntityID *pEntities, Uint32 &NumEntitiesWritten) const =0
virtual RADIENT_STATUS DILIGENT_CALL_TYPE GetParent (RadientEntityID Entity, RadientEntityID &Parent) const =0
 Gets the entity parent, or InvalidRadientEntityID for a root entity.
virtual RADIENT_STATUS DILIGENT_CALL_TYPE GetChildCount (RadientEntityID Entity, Uint32 &ChildCount) const =0
 Returns the number of child entities.
virtual RADIENT_STATUS DILIGENT_CALL_TYPE GetChildren (RadientEntityID Entity, Uint32 StartChild, Uint32 ChildCount, RadientEntityID *pChildren, Uint32 &NumChildrenWritten) const =0
 Gets child entities starting from StartChild.
virtual RADIENT_STATUS DILIGENT_CALL_TYPE GetLocalTransform (RadientEntityID Entity, RadientTransform &Transform) const =0
 Gets local transform.
virtual RADIENT_STATUS DILIGENT_CALL_TYPE GetWorldMatrix (RadientEntityID Entity, RadientMatrix4x4 &Matrix)=0
 Gets world transform matrix.
virtual RADIENT_STATUS DILIGENT_CALL_TYPE GetCachedWorldMatrix (RadientEntityID Entity, RadientMatrix4x4 &Matrix) const =0
virtual RADIENT_STATUS DILIGENT_CALL_TYPE GetCamera (RadientEntityID Entity, RadientCameraComponent &Camera) const =0
 Gets camera component.
virtual RADIENT_STATUS DILIGENT_CALL_TYPE GetMesh (RadientEntityID Entity, RadientMeshComponent &Mesh) const =0
virtual RADIENT_STATUS DILIGENT_CALL_TYPE GetSkin (RadientEntityID Entity, RadientSkinComponent &Skin) const =0
virtual RADIENT_STATUS DILIGENT_CALL_TYPE GetMorph (RadientEntityID Entity, RadientMorphComponent &Morph) const =0
virtual RADIENT_STATUS DILIGENT_CALL_TYPE GetMeshRenderer (RadientEntityID Entity, RadientMeshRendererComponent &Renderer) const =0
virtual RADIENT_STATUS DILIGENT_CALL_TYPE GetMaterialBindings (RadientEntityID Entity, RadientMaterialBindingsComponent &Bindings) const =0
virtual RADIENT_STATUS DILIGENT_CALL_TYPE GetLight (RadientEntityID Entity, RadientLightComponent &Light) const =0
virtual RADIENT_STATUS DILIGENT_CALL_TYPE HasComponent (RadientEntityID Entity, RadientComponentTypeID ComponentType, Bool &HasComponent) const =0
 Checks if the entity has the requested component.
virtual const RadientSceneRevisions &DILIGENT_CALL_TYPE GetSceneRevisions () const =0
 Returns renderer-relevant scene revisions.
Public Member Functions inherited from Diligent.IObject
virtual void DILIGENT_CALL_TYPE QueryInterface (const INTERFACE_ID &IID, IObject **ppInterface)=0
 Queries the specific interface.
template<typename DerivedType, typename = typename std::enable_if<std::is_base_of<IObject, DerivedType>::value>::type>
void QueryInterface (const INTERFACE_ID &IID, DerivedType **ppInterface)
virtual ReferenceCounterValueType DILIGENT_CALL_TYPE AddRef ()=0
 Increments the number of strong references by 1.
virtual ReferenceCounterValueType DILIGENT_CALL_TYPE Release ()=0
virtual IReferenceCounters *DILIGENT_CALL_TYPE GetReferenceCounters () const =0

Detailed Description

Scene graph and ECS storage interface.

Member Function Documentation

◆ GetCachedEntityEffectiveVisibility()

virtual RADIENT_STATUS DILIGENT_CALL_TYPE Diligent::IRadientScene::GetCachedEntityEffectiveVisibility ( RadientEntityID Entity,
Bool & Visible ) const
pure virtual

Gets cached effective entity visibility without updating dirty derived state. If the scene has changed, call CommitChanges() first to guarantee the cached value is up to date. Returns RADIENT_STATUS_OUT_OF_DATE if the cached value may be stale.

◆ GetCachedWorldMatrix()

virtual RADIENT_STATUS DILIGENT_CALL_TYPE Diligent::IRadientScene::GetCachedWorldMatrix ( RadientEntityID Entity,
RadientMatrix4x4 & Matrix ) const
pure virtual

Gets cached world transform matrix without updating dirty derived state. If the scene has changed, call CommitChanges() first to guarantee the cached value is up to date. Returns RADIENT_STATUS_OUT_OF_DATE if the cached value may be stale.

◆ GetEntityName()

virtual RADIENT_STATUS DILIGENT_CALL_TYPE Diligent::IRadientScene::GetEntityName ( RadientEntityID Entity,
const Char *& Name ) const
pure virtual

Gets the entity's name. Returns RADIENT_STATUS_OK and a non-null string for a live entity; unnamed entities return an empty string. Returns RADIENT_STATUS_NOT_FOUND and sets Name to null if Entity is not alive. The returned string is owned by the scene and remains valid until the next entity creation or destruction, until this entity's name is changed, or until the scene is released. Copy the string if it needs to be retained across those operations.

◆ GetLight()

virtual RADIENT_STATUS DILIGENT_CALL_TYPE Diligent::IRadientScene::GetLight ( RadientEntityID Entity,
RadientLightComponent & Light ) const
pure virtual

Gets a copy of the light component in entity-local space. Returns RADIENT_STATUS_NOT_FOUND and resets Light to its default values if the entity or component is absent.

◆ GetMaterialBindings()

virtual RADIENT_STATUS DILIGENT_CALL_TYPE Diligent::IRadientScene::GetMaterialBindings ( RadientEntityID Entity,
RadientMaterialBindingsComponent & Bindings ) const
pure virtual

Gets the entity's per-primitive material overrides. This does not include the default materials exposed by IRadientMeshAsset::GetDesc(). Returns RADIENT_STATUS_NOT_FOUND and resets Bindings to its default values if the entity or component is absent. An existing empty component returns RADIENT_STATUS_OK with a null pBindings and zero BindingCount. The returned array and material pointers are borrowed from the scene and remain valid until this component is changed or removed, the entity is destroyed, or the scene is released. To keep the bindings longer, copy the array and retain the referenced material assets.

◆ GetMesh()

virtual RADIENT_STATUS DILIGENT_CALL_TYPE Diligent::IRadientScene::GetMesh ( RadientEntityID Entity,
RadientMeshComponent & Mesh ) const
pure virtual

Gets a copy of the mesh component. Returns RADIENT_STATUS_NOT_FOUND and resets Mesh to its default values if the entity or component is absent. The mesh pointer is borrowed from the scene and remains valid until the component is changed or removed, the entity is destroyed, or the scene is released. The caller may retain the mesh when a longer lifetime is required.

◆ GetMeshRenderer()

virtual RADIENT_STATUS DILIGENT_CALL_TYPE Diligent::IRadientScene::GetMeshRenderer ( RadientEntityID Entity,
RadientMeshRendererComponent & Renderer ) const
pure virtual

Gets a copy of the mesh renderer component. Returns RADIENT_STATUS_NOT_FOUND and resets Renderer to its default values if the entity or component is absent.

◆ GetMorph()

virtual RADIENT_STATUS DILIGENT_CALL_TYPE Diligent::IRadientScene::GetMorph ( RadientEntityID Entity,
RadientMorphComponent & Morph ) const
pure virtual

Gets morph component. The returned weights pointer is borrowed from the scene and remains valid until the component is changed or removed. The caller may retain it when a longer lifetime is required.

◆ GetRootEntities()

virtual RADIENT_STATUS DILIGENT_CALL_TYPE Diligent::IRadientScene::GetRootEntities ( Uint32 Capacity,
RadientEntityID * pEntities,
Uint32 & NumEntitiesWritten ) const
pure virtual

Copies up to Capacity root entity IDs into the caller's array in ascending ID order. Returns RADIENT_STATUS_OK and sets NumEntitiesWritten to the smaller of Capacity and the current root count. Use GetRootEntityCount() to size the array when all roots are needed. Zero Capacity succeeds without writing any elements, and pEntities may be null in that case. Returns RADIENT_STATUS_INVALID_ARGUMENT if pEntities is null with nonzero Capacity; NumEntitiesWritten is set to zero. Does not require CommitChanges().

◆ GetRootEntityCount()

virtual Uint32 DILIGENT_CALL_TYPE Diligent::IRadientScene::GetRootEntityCount ( ) const
pure virtual

Returns the number of live entities without a parent. Reflects entity creation, destruction, and reparenting immediately, without requiring CommitChanges().

◆ GetSkin()

virtual RADIENT_STATUS DILIGENT_CALL_TYPE Diligent::IRadientScene::GetSkin ( RadientEntityID Entity,
RadientSkinComponent & Skin ) const
pure virtual

Gets skin component. The returned skin and pose pointers are borrowed from the scene and remain valid until the component is changed or removed. The caller may retain either object when a longer lifetime is required.