CARLA
 
载入中...
搜索中...
未找到
Public 类型 | Public 成员函数 | Private 成员函数 | Private 属性 | 所有成员列表
UActorDispatcher类 参考

Object in charge of binding ActorDefinitions to spawn functions, as well as keeping the registry of all the actors spawned. 更多...

#include <ActorDispatcher.h>

+ 类 UActorDispatcher 继承关系图:
+ UActorDispatcher 的协作图:

Public 类型

using SpawnFunctionType = TFunction<FActorSpawnResult(const FTransform &, const FActorDescription &)>
 

Public 成员函数

void Bind (ACarlaActorFactory &ActorFactory)
 Bind all the definitions of ActorFactory to its spawn function.
 
void Bind (FActorDefinition Definition, SpawnFunctionType SpawnFunction)
 Bind a definition to a spawn function.
 
bool DestroyActor (FCarlaActor::IdType ActorId)
 Destroys an actor, properly removing it from the registry.
 
const TArray< FActorDefinition > & GetActorDefinitions () const
 
FActorRegistryGetActorRegistry ()
 
const FActorRegistryGetActorRegistry () const
 
void PutActorToSleep (FCarlaActor::IdType Id, UCarlaEpisode *CarlaEpisode)
 
FCarlaActorRegisterActor (AActor &Actor, FActorDescription ActorDescription, FActorRegistry::IdType DesiredId=0)
 Register an actor that was not created using "SpawnActor" function but that should be kept in the registry.
 
AActorReSpawnActor (const FTransform &Transform, FActorDescription ActorDescription)
 ReSpawns an actor based on ActorDescription at Transform.
 
TPair< EActorSpawnResultStatus, FCarlaActor * > SpawnActor (const FTransform &Transform, FActorDescription ActorDescription, FCarlaActor::IdType DesiredId=0)
 Spawns an actor based on ActorDescription at Transform.
 
void WakeActorUp (FCarlaActor::IdType Id, UCarlaEpisode *CarlaEpisode)
 

Private 成员函数

void OnActorDestroyed (AActor *Actor)
 

Private 属性

TArray< TSubclassOf< AActor > > Classes
 
TArray< FActorDefinitionDefinitions
 
FActorRegistry Registry
 
TArray< SpawnFunctionTypeSpawnFunctions
 

详细描述

Object in charge of binding ActorDefinitions to spawn functions, as well as keeping the registry of all the actors spawned.

在文件 ActorDispatcher.h24 行定义.

成员类型定义说明

◆ SpawnFunctionType

using UActorDispatcher::SpawnFunctionType = TFunction<FActorSpawnResult(const FTransform &, const FActorDescription &)>

在文件 ActorDispatcher.h30 行定义.

成员函数说明

◆ Bind() [1/2]

void UActorDispatcher::Bind ( ACarlaActorFactory & ActorFactory)

Bind all the definitions of ActorFactory to its spawn function.

警告
Invalid definitions are ignored.

在文件 ActorDispatcher.cpp38 行定义.

引用了 Bind(), ACarlaActorFactory::GetDefinitions() , 以及 ACarlaActorFactory::SpawnActor().

+ 函数调用图:

◆ Bind() [2/2]

void UActorDispatcher::Bind ( FActorDefinition Definition,
SpawnFunctionType SpawnFunction )

Bind a definition to a spawn function.

When SpawnActor is called with a matching description Functor is called.

警告
Invalid definitions are ignored.

在文件 ActorDispatcher.cpp23 行定义.

引用了 UActorBlueprintFunctionLibrary::CheckActorDefinition(), FActorDefinition::Class, Classes, Definitions, FActorDefinition::Id, SpawnFunctions , 以及 FActorDefinition::UId.

被这些函数引用 Bind().

+ 函数调用图:
+ 这是这个函数的调用关系图:

◆ DestroyActor()

bool UActorDispatcher::DestroyActor ( FCarlaActor::IdType ActorId)

Destroys an actor, properly removing it from the registry.

Return true if the Actor is destroyed or already marked for destruction, false if indestructible or nullptr.

在文件 ActorDispatcher.cpp117 行定义.

引用了 FActorRegistry::Deregister(), FActorInfo::Description, FActorRegistry::FindCarlaActor(), FCarlaActor::GetActor(), FCarlaActor::GetActorInfo(), FActorDescription::Id, Registry , 以及 Success.

+ 函数调用图:

◆ GetActorDefinitions()

const TArray< FActorDefinition > & UActorDispatcher::GetActorDefinitions ( ) const
inline

在文件 ActorDispatcher.h82 行定义.

◆ GetActorRegistry() [1/2]

FActorRegistry & UActorDispatcher::GetActorRegistry ( )
inline

在文件 ActorDispatcher.h92 行定义.

◆ GetActorRegistry() [2/2]

const FActorRegistry & UActorDispatcher::GetActorRegistry ( ) const
inline

在文件 ActorDispatcher.h87 行定义.

◆ OnActorDestroyed()

void UActorDispatcher::OnActorDestroyed ( AActor * Actor)
private

在文件 ActorDispatcher.cpp234 行定义.

引用了 FActorRegistry::Deregister(), FActorRegistry::FindCarlaActor(), FCarlaActor::GetActorId(), carla::ros2::ROS2::GetInstance(), FCarlaActor::IsActive() , 以及 Registry.

被这些函数引用 RegisterActor().

+ 函数调用图:
+ 这是这个函数的调用关系图:

◆ PutActorToSleep()

void UActorDispatcher::PutActorToSleep ( FCarlaActor::IdType Id,
UCarlaEpisode * CarlaEpisode )

在文件 ActorDispatcher.cpp224 行定义.

引用了 FActorRegistry::PutActorToSleep() , 以及 Registry.

+ 函数调用图:

◆ RegisterActor()

FCarlaActor * UActorDispatcher::RegisterActor ( AActor & Actor,
FActorDescription ActorDescription,
FActorRegistry::IdType DesiredId = 0 )

Register an actor that was not created using "SpawnActor" function but that should be kept in the registry.

在文件 ActorDispatcher.cpp162 行定义.

引用了 FCarlaActor::GetActorId(), carla::ros2::ROS2::GetInstance(), FActorDescription::Id, OnActorDestroyed(), FActorRegistry::Register(), Registry , 以及 FActorDescription::Variations.

被这些函数引用 UCarlaEpisode::InitializeAtBeginPlay() , 以及 SpawnActor().

+ 函数调用图:
+ 这是这个函数的调用关系图:

◆ ReSpawnActor()

AActor * UActorDispatcher::ReSpawnActor ( const FTransform & Transform,
FActorDescription ActorDescription )

ReSpawns an actor based on ActorDescription at Transform.

To properly despawn an actor created with this function call DestroyActor. Used to respawn dormant actors.

返回
The actor to be respawned

在文件 ActorDispatcher.cpp86 行定义.

引用了 FActorSpawnResult::Actor, FActorDescription::Class, Classes, FActorDescription::Id, SpawnFunctions, FActorSpawnResult::Status , 以及 FActorDescription::UId.

◆ SpawnActor()

TPair< EActorSpawnResultStatus, FCarlaActor * > UActorDispatcher::SpawnActor ( const FTransform & Transform,
FActorDescription ActorDescription,
FCarlaActor::IdType DesiredId = 0 )

Spawns an actor based on ActorDescription at Transform.

To properly despawn an actor created with this function call DestroyActor.

返回
A pair containing the result of the spawn function and a view over the actor and its properties. If the status is different of Success the view is invalid.

在文件 ActorDispatcher.cpp48 行定义.

引用了 FActorSpawnResult::Actor, FActorDescription::Class, Classes, FCarlaActor::GetActor(), FActorDescription::Id, FActorSpawnResult::IsValid(), RegisterActor(), SpawnFunctions, FActorSpawnResult::Status, ATagger::TagActor() , 以及 FActorDescription::UId.

被这些函数引用 UCarlaEpisode::SpawnActorWithInfo().

+ 函数调用图:
+ 这是这个函数的调用关系图:

◆ WakeActorUp()

void UActorDispatcher::WakeActorUp ( FCarlaActor::IdType Id,
UCarlaEpisode * CarlaEpisode )

在文件 ActorDispatcher.cpp229 行定义.

引用了 Registry , 以及 FActorRegistry::WakeActorUp().

+ 函数调用图:

类成员变量说明

◆ Classes

TArray<TSubclassOf<AActor> > UActorDispatcher::Classes
private

在文件 ActorDispatcher.h106 行定义.

被这些函数引用 Bind(), ReSpawnActor() , 以及 SpawnActor().

◆ Definitions

TArray<FActorDefinition> UActorDispatcher::Definitions
private

在文件 ActorDispatcher.h102 行定义.

被这些函数引用 Bind().

◆ Registry

FActorRegistry UActorDispatcher::Registry
private

在文件 ActorDispatcher.h108 行定义.

被这些函数引用 DestroyActor(), OnActorDestroyed(), PutActorToSleep(), RegisterActor() , 以及 WakeActorUp().

◆ SpawnFunctions

TArray<SpawnFunctionType> UActorDispatcher::SpawnFunctions
private

在文件 ActorDispatcher.h104 行定义.

被这些函数引用 Bind(), ReSpawnActor() , 以及 SpawnActor().


该类的文档由以下文件生成: