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

#include <RadientSceneWriter.h>

Inheritance diagram for Diligent::IRadientSceneWriter:
Diligent.IObject

Public Member Functions

virtual IRadientScene *DILIGENT_CALL_TYPE GetScene () const =0
virtual RADIENT_STATUS DILIGENT_CALL_TYPE CreateEntity (const RadientEntityDesc &Desc, RadientEntityID &Entity)=0
 Creates an entity.
virtual RADIENT_STATUS DILIGENT_CALL_TYPE DestroyEntity (RadientEntityID Entity)=0
 Destroys an entity and its owned components.
virtual RADIENT_STATUS DILIGENT_CALL_TYPE SetEntityName (RadientEntityID Entity, const Char *Name)=0
virtual RADIENT_STATUS DILIGENT_CALL_TYPE SetEntityFlags (RadientEntityID Entity, RADIENT_ENTITY_FLAGS Flags)=0
 Sets entity flags.
virtual RADIENT_STATUS DILIGENT_CALL_TYPE SetEntityOwnVisibility (RadientEntityID Entity, Bool Visible)=0
 Sets entity's own visibility flag.
virtual RADIENT_STATUS DILIGENT_CALL_TYPE SetParent (RadientEntityID Entity, RadientEntityID Parent, Bool KeepWorldTransform=True)=0
virtual RADIENT_STATUS DILIGENT_CALL_TYPE SetLocalTransform (RadientEntityID Entity, const RadientTransform &Transform)=0
 Sets local transform.
virtual RADIENT_STATUS DILIGENT_CALL_TYPE SetCamera (RadientEntityID Entity, const RadientCameraComponent &Camera)=0
 Adds or updates a camera component.
virtual RADIENT_STATUS DILIGENT_CALL_TYPE SetMesh (RadientEntityID Entity, const RadientMeshComponent &Mesh)=0
virtual RADIENT_STATUS DILIGENT_CALL_TYPE SetSkin (RadientEntityID Entity, const RadientSkinComponent &Skin)=0
 Adds or updates a skin component.
virtual RADIENT_STATUS DILIGENT_CALL_TYPE SetMorph (RadientEntityID Entity, const RadientMorphComponent &Morph)=0
virtual RADIENT_STATUS DILIGENT_CALL_TYPE SetMeshRenderer (RadientEntityID Entity, const RadientMeshRendererComponent &Renderer)=0
 Adds or updates a mesh renderer component.
virtual RADIENT_STATUS DILIGENT_CALL_TYPE SetMaterialBindings (RadientEntityID Entity, const RadientMaterialBindingsComponent &Bindings)=0
 Adds or updates per-primitive material overrides.
virtual RADIENT_STATUS DILIGENT_CALL_TYPE SetLight (RadientEntityID Entity, const RadientLightComponent &Light)=0
 Adds or updates a light component.
virtual RADIENT_STATUS DILIGENT_CALL_TYPE SetCustomComponentData (RadientEntityID Entity, const RadientCustomComponentData &Component)=0
 Adds or updates a custom serialized component.
virtual RADIENT_STATUS DILIGENT_CALL_TYPE RemoveComponent (RadientEntityID Entity, RadientComponentTypeID ComponentType)=0
 Removes a component from the entity.
virtual RADIENT_STATUS DILIGENT_CALL_TYPE CommitChanges ()=0
 Commits pending scene changes to the active backend.
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 mutation interface. Radient-created writers expose IID_RadientAnimationDestination through QueryInterface() for batched scene node, light-component, and camera-component animation. Each RadientAnimationPropertyBindingDesc::DestinationElement is a RadientEntityID. No scene-writer method may be called between a successful animation destination binding BeginUpdate() and its matching EndUpdate().

Member Function Documentation

◆ GetScene()

virtual IRadientScene *DILIGENT_CALL_TYPE Diligent::IRadientSceneWriter::GetScene ( ) const
pure virtual

Returns the scene modified by this writer. The returned pointer is borrowed and remains valid for the writer lifetime.

◆ SetEntityName()

virtual RADIENT_STATUS DILIGENT_CALL_TYPE Diligent::IRadientSceneWriter::SetEntityName ( RadientEntityID Entity,
const Char * Name )
pure virtual

Sets the entity name, copying the string during the call. Null and empty names are stored as an empty string. Names need not be unique. Returns RADIENT_STATUS_NOT_FOUND if Entity is not alive, RADIENT_STATUS_NO_CHANGE if the name is unchanged, or RADIENT_STATUS_OK if it changed. The new name is visible through GetEntityName() immediately, without requiring CommitChanges().

◆ SetMesh()

virtual RADIENT_STATUS DILIGENT_CALL_TYPE Diligent::IRadientSceneWriter::SetMesh ( RadientEntityID Entity,
const RadientMeshComponent & Mesh )
pure virtual

Adds or updates a mesh component. Replacing the mesh removes an existing morph component if its weights belong to a different mesh.

◆ SetMorph()

virtual RADIENT_STATUS DILIGENT_CALL_TYPE Diligent::IRadientSceneWriter::SetMorph ( RadientEntityID Entity,
const RadientMorphComponent & Morph )
pure virtual

Adds or updates a morph component. The weights must belong to the mesh currently assigned to the entity.

◆ SetParent()

virtual RADIENT_STATUS DILIGENT_CALL_TYPE Diligent::IRadientSceneWriter::SetParent ( RadientEntityID Entity,
RadientEntityID Parent,
Bool KeepWorldTransform = True )
pure virtual

Sets the entity parent. If KeepWorldTransform is true, the world transform is preserved exactly only when the resulting local matrix can be represented as translation, rotation, and scale.