UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
TSceneUpdateCommandQueue< InSceneInfoType, EInDirtyFlagsType, EInId > Class Template Reference

#include <SceneUpdateCommandQueue.h>

Classes

struct  FUpdateCommand
 
struct  TConstPayloadIterator
 
struct  TPayloadBase
 
struct  TPayloadRangeView
 

Public Types

using EDirtyFlags = EInDirtyFlagsType
 
using FSceneInfo = InSceneInfoType
 
using FSceneInfoPersistentId = typename InSceneInfoType::FPersistentId
 
using EId = EInId
 

Public Member Functions

 TSceneUpdateCommandQueue ()
 
 TSceneUpdateCommandQueue (const TSceneUpdateCommandQueue &)=delete
 
 TSceneUpdateCommandQueue (TSceneUpdateCommandQueue &&Other)
 
 ~TSceneUpdateCommandQueue ()
 
bool IsEmpty () const
 
int32 NumCommands () const
 
bool HasCommand (FSceneInfo *SceneInfo) const
 
const FUpdateCommandFindCommand (FSceneInfo *SceneInfo) const
 
void EnqueueDelete (FSceneInfo *SceneInfo)
 
void EnqueueAdd (FSceneInfo *SceneInfo)
 
template<typename PayloadType >
void Enqueue (FSceneInfo *SceneInfo, PayloadType &&Payload)
 
template<typename PayloadType >
PayloadType * GetPayloadPtr (const FUpdateCommand &Command)
 
void Reset ()
 
template<typename CallbackFuncType >
void ForEachCommand (ESceneUpdateCommandFilter CommandFilter, CallbackFuncType CallbackFunc)
 
template<typename CallbackFuncType >
void ForEachCommand (CallbackFuncType CallbackFunc)
 
template<typename CallbackFuncType >
void ForEachUpdateCommand (ESceneUpdateCommandFilter CommandFilter, uint64 UpdatePayloadMask, CallbackFuncType CallbackFunc) const
 
template<typename CallbackFuncType >
void ForEachUpdateCommand (ESceneUpdateCommandFilter CommandFilter, EDirtyFlags DirtyFlags, CallbackFuncType CallbackFunc) const
 
template<typename PayloadType >
TConstPayloadIterator< PayloadType > GetIterator () const
 
template<typename PayloadType >
int32 GetNumItems () const
 
template<typename PayloadType >
TPayloadRangeView< PayloadType > GetRangeView ()
 

Static Public Attributes

static constexpr int32 MaxId = int32(EId::MAX)
 

Detailed Description

template<typename InSceneInfoType, typename EInDirtyFlagsType, typename EInId>
class TSceneUpdateCommandQueue< InSceneInfoType, EInDirtyFlagsType, EInId >

An unordered queue for sending scene object updates (agnostic to the object type InSceneInfoType/FSceneInfo). Several update payloads can be enqueued for each object but only the last of each type will have effect. The update payloads are stored in a typed compact array, but are not themselves required to have virtual destructors or even be of any particular type. TPayloadBase is a helper & example that can be used as a base class to implement payload data types. Update payload types are identified by an ID that comes from the template argument enum EInId. While iterating the FUpdateCommand it is possible to access each type of update payload safely, or one can interate the payload types in a continuous fashion.

Member Typedef Documentation

◆ EDirtyFlags

◆ EId

◆ FSceneInfo

◆ FSceneInfoPersistentId

using TSceneUpdateCommandQueue< InSceneInfoType, EInDirtyFlagsType, EInId >::FSceneInfoPersistentId = typename InSceneInfoType::FPersistentId

Constructor & Destructor Documentation

◆ TSceneUpdateCommandQueue() [1/3]

◆ TSceneUpdateCommandQueue() [2/3]

◆ TSceneUpdateCommandQueue() [3/3]

◆ ~TSceneUpdateCommandQueue()

Member Function Documentation

◆ Enqueue()

template<typename PayloadType >
void TSceneUpdateCommandQueue< InSceneInfoType, EInDirtyFlagsType, EInId >::Enqueue ( FSceneInfo SceneInfo,
PayloadType &&  Payload 
)
inline

Enqueue an update with a data payload.

◆ EnqueueAdd()

Enqueue an Add command. This will mark the command for the scene object as added, and must always be the first command for the object.

◆ EnqueueDelete()

Enqueue a Delete command. This will mark the command for the scene object as deleted, but does not remove the command or associated updates. Thus a command may have both add/delete flags and update payloads. It is up to the consumer to handle these appropriately.

◆ FindCommand()

◆ ForEachCommand() [1/2]

◆ ForEachCommand() [2/2]

◆ ForEachUpdateCommand() [1/2]

void TSceneUpdateCommandQueue< InSceneInfoType, EInDirtyFlagsType, EInId >::ForEachUpdateCommand ( ESceneUpdateCommandFilter  CommandFilter,
EDirtyFlags  DirtyFlags,
CallbackFuncType  CallbackFunc 
) const
inline

Filter on ESceneUpdateCommandFilter and updates on DirtyFlags mask. I.e., the DirtyFlags mask only matters if the Command is an update. E.g., ForEachUpdateCommand(ESceneUpdateCommandFilter::Added,...) will return all added commands regardless of payload mask. E.g., ForEachUpdateCommand(ESceneUpdateCommandFilter::Added | ESceneUpdateCommandFilter::Updated,...) will return all added commands regardless of DirtyFlags AND all updates that match the DirtyFlags.

◆ ForEachUpdateCommand() [2/2]

void TSceneUpdateCommandQueue< InSceneInfoType, EInDirtyFlagsType, EInId >::ForEachUpdateCommand ( ESceneUpdateCommandFilter  CommandFilter,
uint64  UpdatePayloadMask,
CallbackFuncType  CallbackFunc 
) const
inline

Filter on ESceneUpdateCommandFilter and updates on payload mask. I.e., the payload mask only matters if the Command is an update. E.g., ForEachUpdateCommand(ESceneUpdateCommandFilter::Added,...) will return all added commands regardless of payload mask. E.g., ForEachUpdateCommand(ESceneUpdateCommandFilter::Added | ESceneUpdateCommandFilter::Updated,...) will return all added commands regardless of UpdatePayloadMask AND all updates that match the UpdatePayloadMask.

◆ GetIterator()

template<typename PayloadType >
TConstPayloadIterator< PayloadType > TSceneUpdateCommandQueue< InSceneInfoType, EInDirtyFlagsType, EInId >::GetIterator ( ) const
inline

Get an iterator to iterate updates with a given payload type.

◆ GetNumItems()

Get the number of updates with a given payload type.

◆ GetPayloadPtr()

template<typename PayloadType >
PayloadType * TSceneUpdateCommandQueue< InSceneInfoType, EInDirtyFlagsType, EInId >::GetPayloadPtr ( const FUpdateCommand Command)
inline

Retriev a pointer to the PayloadType data for the given command. Returs nullptr if no such data exists.

◆ GetRangeView()

Get a "range" that can be used in a range for loop to access updates of a single payload type. e.g. for (auto& Item : Buffer.GetRangeView<MyUpdatePayloadType>()); Deleted items are automatically skipped.

◆ HasCommand()

◆ IsEmpty()

◆ NumCommands()

◆ Reset()

Reset the command and payload data stored in the buffer, leaving allocations unchanged.

Member Data Documentation

◆ MaxId


The documentation for this class was generated from the following file: