engine
 
载入中...
搜索中...
未找到
Public 成员函数 | Public 属性 | 所有成员列表
UE::MovieScene::TEntityTaskComponents< T > 模板结构体 参考

Defines the accessors for each desired component of an entity task 更多...

#include <MovieSceneEntitySystemTask.h>

继承自 UE::MovieScene::TEntityTaskComponentsImpl<... > .

Public 成员函数

TFilteredEntityTask< T... > CombineFilter (const FEntityComponentFilter &InFilter)
 Combine this task's filter with the specified filter
 
template<typename TaskImpl , typename... TaskConstructionArgs>
FGraphEventRef Dispatch_PerAllocation (FEntityManager *EntityManager, const FSystemTaskPrerequisites &Prerequisites, FSystemSubsequentTasks *Subsequents, TaskConstructionArgs &&... InArgs) const
 Dispatch a task for every allocation that matches the filters and component types. 更多...
 
template<typename TaskImpl , typename... TaskConstructionArgs>
FGraphEventRef Dispatch_PerEntity (FEntityManager *EntityManager, const FSystemTaskPrerequisites &Prerequisites, FSystemSubsequentTasks *Subsequents, TaskConstructionArgs &&... InArgs) const
 Dispatch a task for every entity that matches the filters and component types. 更多...
 
TFilteredEntityTask< T... > FilterAll (const FComponentMask &InComponentMask)
 Constrain this task to only run for entities that have all the specified components or tags
 
TFilteredEntityTask< T... > FilterAll (std::initializer_list< FComponentTypeID > InComponentTypes)
 Constrain this task to only run for entities that have all the specified components or tags
 
TFilteredEntityTask< T... > FilterAny (const FComponentMask &InComponentMask)
 Constrain this task to only run for entities that have at least one of the specified components or tags
 
TFilteredEntityTask< T... > FilterAny (std::initializer_list< FComponentTypeID > InComponentTypes)
 Constrain this task to only run for entities that have at least one of the specified components or tags
 
TFilteredEntityTask< T... > FilterNone (const FComponentMask &InComponentMask)
 Constrain this task to only run for entities that have none the specified components or tags
 
TFilteredEntityTask< T... > FilterNone (std::initializer_list< FComponentTypeID > InComponentTypes)
 Constrain this task to only run for entities that have none the specified components or tags
 
TFilteredEntityTask< T... > FilterOut (const FComponentMask &InComponentMask)
 Constrain this task to only run for entities that do not have the specific combination of components or tags
 
TFilteredEntityTask< T... > FilterOut (std::initializer_list< FComponentTypeID > InComponentTypes)
 Constrain this task to only run for entities that do not have the specific combination of components or tags
 
TEntityTaskComponents< T... > & SetCurrentThread (ENamedThreads::Type InCurrentThread)
 Assign the current thread for task dispatch to ensure that it is issued on the correct thread. 更多...
 
TEntityTaskComponents< T... > & SetDesiredThread (ENamedThreads::Type InDesiredThread)
 Assign a desired thread for this task to run on
 
TEntityTaskComponents< T... > & SetStat (TStatId InStatId)
 Assign a stat ID for this task
 

Public 属性

bool bBreakOnRun
 Useful for debugging to break the debugger when this task is run
 
ENamedThreads::Type CurrentThread
 The current thread that is being used to dispatch from. 更多...
 
ENamedThreads::Type DesiredThread
 The thread that this task wants to run on
 
TStatId StatId
 A stat ID for the task
 

详细描述

template<typename... T>
struct UE::MovieScene::TEntityTaskComponents< T >

Defines the accessors for each desired component of an entity task

成员函数说明

◆ Dispatch_PerAllocation()

template<typename... T>
template<typename TaskImpl , typename... TaskConstructionArgs>
FGraphEventRef UE::MovieScene::TEntityTaskComponents< T >::Dispatch_PerAllocation ( FEntityManager *  EntityManager,
const FSystemTaskPrerequisites &  Prerequisites,
FSystemSubsequentTasks *  Subsequents,
TaskConstructionArgs &&...  InArgs 
) const
inline

Dispatch a task for every allocation that matches the filters and component types.

Must be explicitly instantiated with the task type to dispatch. Construction arguments are deduced. Tasks must implement a ForEachAllocation function that matches this task's component accessor types.

For example: struct FForEachAllocation { void ForEachAllocation(FEntityAllocation* InAllocation, const TFilteredEntityTask< FReadEntityIDs, TRead<FMovieSceneFloatChannel> >& InputTask); };

TComponentTypeID<FMovieSceneFloatChannel> FloatChannelComponent = ...;

FGraphEventRef Task = FEntityTaskBuilder() .ReadEntityIDs() .Read(FloatChannelComponent) .SetStat(GET_STATID(MyStatName)) .SetDesiredThread(ENamedThreads::AnyThread) .Dispatch_PerAllocation<FForEachAllocation>(EntityManager, Prerequisites);

参数
EntityManagerThe entity manager to run the task on. All component types must relate to this entity manager.
PrerequisitesPrerequisite tasks that must run before this one
Subsequents(Optional) Subsequent task tracking that this task should be added to for each writable component type
InArgsOptional arguments that are forwarded to the constructor of TaskImpl
返回
A pointer to the graph event for the task, or nullptr if this task is not valid (ie contains invalid component types that would be necessary for the task to run), or threading is disabled

◆ Dispatch_PerEntity()

template<typename... T>
template<typename TaskImpl , typename... TaskConstructionArgs>
FGraphEventRef UE::MovieScene::TEntityTaskComponents< T >::Dispatch_PerEntity ( FEntityManager *  EntityManager,
const FSystemTaskPrerequisites &  Prerequisites,
FSystemSubsequentTasks *  Subsequents,
TaskConstructionArgs &&...  InArgs 
) const
inline

Dispatch a task for every entity that matches the filters and component types.

Must be explicitly instantiated with the task type to dispatch. Construction arguments are deduced. Tasks must implement a ForEachEntity function that matches this task's component accessor types.

For example: struct FForEachEntity { void ForEachEntity(FMovieSceneEntityID InEntityID, const FMovieSceneFloatChannel& Channel); };

TComponentTypeID<FMovieSceneFloatChannel> FloatChannelComponent = ...;

FGraphEventRef Task = FEntityTaskBuilder() .ReadEntityIDs() .Read(FloatChannelComponent) .SetStat(GET_STATID(MyStatName)) .SetDesiredThread(ENamedThreads::AnyThread) .Dispatch_PerEntity<FForEachEntity>(EntityManager, nullptr);

参数
EntityManagerThe entity manager to run the task on. All component types must relate to this entity manager.
PrerequisitesPrerequisite tasks that must run before this one, or nullptr if there are no prerequisites
Subsequents(Optional) Subsequent task tracking that this task should be added to for each writable component type
InArgsOptional arguments that are forwarded to the constructor of TaskImpl
返回
A pointer to the graph event for the task, or nullptr if this task is not valid (ie contains invalid component types that would be necessary for the task to run), or threading is disabled

◆ SetCurrentThread()

template<typename... T>
TEntityTaskComponents< T... > & UE::MovieScene::TEntityTaskComponents< T >::SetCurrentThread ( ENamedThreads::Type  InCurrentThread)
inline

Assign the current thread for task dispatch to ensure that it is issued on the correct thread.

This should only be required for tasks dispatched outside of the main linker execution, or tasks dispatched for the global entity manager

类成员变量说明

◆ CurrentThread

template<typename... T>
ENamedThreads::Type UE::MovieScene::TEntityTaskComponents< T >::CurrentThread

The current thread that is being used to dispatch from.

Only necessary when EntityManager->GetDispatchThread is not available (ie when tasks are being run outside of system linkers)


该结构体的文档由以下文件生成: