Object in charge of binding ActorDefinitions to spawn functions, as well as keeping the registry of all the actors spawned. 更多...
#include <ActorDispatcher.h>
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 |
FActorRegistry & | GetActorRegistry () |
const FActorRegistry & | GetActorRegistry () const |
void | PutActorToSleep (FCarlaActor::IdType Id, UCarlaEpisode *CarlaEpisode) |
FCarlaActor * | 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. | |
AActor * | ReSpawnActor (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< FActorDefinition > | Definitions |
FActorRegistry | Registry |
TArray< SpawnFunctionType > | SpawnFunctions |
Object in charge of binding ActorDefinitions to spawn functions, as well as keeping the registry of all the actors spawned.
在文件 ActorDispatcher.h 第 24 行定义.
using UActorDispatcher::SpawnFunctionType = TFunction<FActorSpawnResult(const FTransform &, const FActorDescription &)> |
在文件 ActorDispatcher.h 第 30 行定义.
void UActorDispatcher::Bind | ( | ACarlaActorFactory & | ActorFactory | ) |
Bind all the definitions of ActorFactory to its spawn function.
在文件 ActorDispatcher.cpp 第 38 行定义.
引用了 Bind(), ACarlaActorFactory::GetDefinitions() , 以及 ACarlaActorFactory::SpawnActor().
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.
在文件 ActorDispatcher.cpp 第 23 行定义.
引用了 UActorBlueprintFunctionLibrary::CheckActorDefinition(), FActorDefinition::Class, Classes, Definitions, FActorDefinition::Id, SpawnFunctions , 以及 FActorDefinition::UId.
被这些函数引用 Bind().
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.cpp 第 117 行定义.
引用了 FActorRegistry::Deregister(), FActorInfo::Description, FActorRegistry::FindCarlaActor(), FCarlaActor::GetActor(), FCarlaActor::GetActorInfo(), FActorDescription::Id, Registry , 以及 Success.
|
inline |
在文件 ActorDispatcher.h 第 82 行定义.
|
inline |
在文件 ActorDispatcher.h 第 92 行定义.
|
inline |
在文件 ActorDispatcher.h 第 87 行定义.
|
private |
在文件 ActorDispatcher.cpp 第 234 行定义.
引用了 FActorRegistry::Deregister(), FActorRegistry::FindCarlaActor(), FCarlaActor::GetActorId(), carla::ros2::ROS2::GetInstance(), FCarlaActor::IsActive() , 以及 Registry.
被这些函数引用 RegisterActor().
void UActorDispatcher::PutActorToSleep | ( | FCarlaActor::IdType | Id, |
UCarlaEpisode * | CarlaEpisode ) |
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.cpp 第 162 行定义.
引用了 FCarlaActor::GetActorId(), carla::ros2::ROS2::GetInstance(), FActorDescription::Id, OnActorDestroyed(), FActorRegistry::Register(), Registry , 以及 FActorDescription::Variations.
被这些函数引用 UCarlaEpisode::InitializeAtBeginPlay() , 以及 SpawnActor().
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.
在文件 ActorDispatcher.cpp 第 86 行定义.
引用了 FActorSpawnResult::Actor, FActorDescription::Class, Classes, FActorDescription::Id, SpawnFunctions, FActorSpawnResult::Status , 以及 FActorDescription::UId.
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.
在文件 ActorDispatcher.cpp 第 48 行定义.
引用了 FActorSpawnResult::Actor, FActorDescription::Class, Classes, FCarlaActor::GetActor(), FActorDescription::Id, FActorSpawnResult::IsValid(), RegisterActor(), SpawnFunctions, FActorSpawnResult::Status, ATagger::TagActor() , 以及 FActorDescription::UId.
被这些函数引用 UCarlaEpisode::SpawnActorWithInfo().
void UActorDispatcher::WakeActorUp | ( | FCarlaActor::IdType | Id, |
UCarlaEpisode * | CarlaEpisode ) |
|
private |
在文件 ActorDispatcher.h 第 106 行定义.
被这些函数引用 Bind(), ReSpawnActor() , 以及 SpawnActor().
|
private |
在文件 ActorDispatcher.h 第 102 行定义.
被这些函数引用 Bind().
|
private |
在文件 ActorDispatcher.h 第 108 行定义.
被这些函数引用 DestroyActor(), OnActorDestroyed(), PutActorToSleep(), RegisterActor() , 以及 WakeActorUp().
|
private |
在文件 ActorDispatcher.h 第 104 行定义.
被这些函数引用 Bind(), ReSpawnActor() , 以及 SpawnActor().