A registry of all the Carla actors. More...
#include <ActorRegistry.h>
Collaboration diagram for FActorRegistry:Public Types | |
| using | IdType = FCarlaActor::IdType |
| using | ValueType = TSharedPtr< FCarlaActor > |
Public Member Functions | |
Actor registry functions | |
| FCarlaActor * | Register (AActor &Actor, FActorDescription Description, IdType DesiredId=0) |
| Register the Actor in the database. More... | |
| void | Deregister (IdType Id) |
| void | Deregister (AActor *Actor) |
Look up functions | |
| int32 | Num () const |
| bool | IsEmpty () const |
| bool | Contains (uint32 Id) const |
| FCarlaActor * | FindCarlaActor (IdType Id) |
| const FCarlaActor * | FindCarlaActor (IdType Id) const |
| FCarlaActor * | FindCarlaActor (const AActor *Actor) |
| const FCarlaActor * | FindCarlaActor (const AActor *Actor) const |
| FString | GetDescriptionFromStream (carla::streaming::detail::stream_id_type Id) |
| void | PutActorToSleep (IdType Id, UCarlaEpisode *CarlaEpisode) |
| void | WakeActorUp (IdType Id, UCarlaEpisode *CarlaEpisode) |
Range iteration support | |
| auto | begin () const noexcept |
| auto | end () const noexcept |
Private Types | |
| using | DatabaseType = TMap< IdType, TSharedPtr< FCarlaActor > > |
Private Member Functions | |
| TSharedPtr< FCarlaActor > | MakeCarlaActor (IdType Id, AActor &Actor, FActorDescription Description, carla::rpc::ActorState InState) const |
| FCarlaActor | MakeFakeActor (AActor &Actor) const |
Private Attributes | |
| DatabaseType | ActorDatabase |
| TMap< IdType, AActor * > | Actors |
| TMap< AActor *, IdType > | Ids |
Static Private Attributes | |
| static IdType | ID_COUNTER = 0u |
A registry of all the Carla actors.
Definition at line 20 of file ActorRegistry.h.
|
private |
Definition at line 30 of file ActorRegistry.h.
Definition at line 24 of file ActorRegistry.h.
| using FActorRegistry::ValueType = TSharedPtr<FCarlaActor> |
Definition at line 25 of file ActorRegistry.h.
|
inlinenoexcept |
Definition at line 106 of file ActorRegistry.h.
References ActorDatabase.
Referenced by FCarlaServer::FPimpl::BindActions(), CarlaReplayerHelper::FindTrafficLightAt(), FFrameData::FindTrafficLightAt(), FFrameData::GetFrameData(), and ACarlaRecorder::Ticking().
Here is the caller graph for this function:
|
inline |
Definition at line 64 of file ActorRegistry.h.
References ActorDatabase.
Referenced by FFrameData::CreateOrReuseActor(), and CarlaReplayerHelper::TryToCreateReplayerActor().
Here is the caller graph for this function:| void FActorRegistry::Deregister | ( | IdType | Id | ) |
Definition at line 118 of file ActorRegistry.cpp.
References ActorDatabase, Actors, FindCarlaActor(), FCarlaActor::GetActor(), Ids, and FCarlaActor::TheActor.
Referenced by Deregister(), UActorDispatcher::DestroyActor(), and UActorDispatcher::OnActorDestroyed().
Here is the call graph for this function:
Here is the caller graph for this function:| void FActorRegistry::Deregister | ( | AActor * | Actor | ) |
Definition at line 135 of file ActorRegistry.cpp.
References Deregister(), FindCarlaActor(), FCarlaActor::GetActor(), and FCarlaActor::GetActorId().
Here is the call graph for this function:
|
inlinenoexcept |
Definition at line 111 of file ActorRegistry.h.
References ActorDatabase, MakeCarlaActor(), and MakeFakeActor().
Referenced by FCarlaServer::FPimpl::BindActions(), CarlaReplayerHelper::FindTrafficLightAt(), FFrameData::FindTrafficLightAt(), FFrameData::GetFrameData(), and ACarlaRecorder::Ticking().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 69 of file ActorRegistry.h.
References ActorDatabase.
Referenced by ACarlaRecorder::AddCollision(), FFrameData::AddPhysicsControl(), ACarlaRecorder::AddPhysicsControl(), FFrameData::AddTrafficLightTime(), ACarlaRecorder::AddTrafficLightTime(), FFrameData::AddTriggerVolume(), ACarlaRecorder::AddTriggerVolume(), ARayCastSemanticLidar::ComputeRawDetection(), Deregister(), UActorDispatcher::DestroyActor(), FindCarlaActor(), FWorldObserver_GetActorState(), UActorDispatcher::OnActorDestroyed(), PutActorToSleep(), Register(), and WakeActorUp().
Here is the caller graph for this function:
|
inline |
Definition at line 75 of file ActorRegistry.h.
References ActorDatabase.
|
inline |
Definition at line 81 of file ActorRegistry.h.
References FindCarlaActor(), and Ids.
Here is the call graph for this function:
|
inline |
Definition at line 87 of file ActorRegistry.h.
References FindCarlaActor(), GetDescriptionFromStream(), Ids, PutActorToSleep(), and WakeActorUp().
Here is the call graph for this function:| FString FActorRegistry::GetDescriptionFromStream | ( | carla::streaming::detail::stream_id_type | Id | ) |
Definition at line 240 of file ActorRegistry.cpp.
References ActorDatabase, FActorInfo::Description, ASensor::GetToken(), and FActorDescription::Id.
Referenced by FindCarlaActor().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 59 of file ActorRegistry.h.
References Num().
Here is the call graph for this function:
|
private |
Definition at line 143 of file ActorRegistry.cpp.
References CarlaGetRelevantTagAsString(), FCarlaActor::ConstructCarlaActor(), FActorRegistry_GetActorType(), UBoundingBoxCalculator::GetActorBoundingBox(), and ATagger::GetTagsOfTaggedActor().
Referenced by end(), and Register().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
|
inline |
Definition at line 54 of file ActorRegistry.h.
References Actors.
Referenced by FWorldObserver_Serialize(), and IsEmpty().
Here is the caller graph for this function:| void FActorRegistry::PutActorToSleep | ( | FCarlaActor::IdType | Id, |
| UCarlaEpisode * | CarlaEpisode | ||
| ) |
Definition at line 186 of file ActorRegistry.cpp.
References Actors, FindCarlaActor(), FCarlaActor::GetActor(), FCarlaActor::GetChildren(), Ids, and FCarlaActor::PutActorToSleep().
Referenced by FindCarlaActor(), and UActorDispatcher::PutActorToSleep().
Here is the call graph for this function:
Here is the caller graph for this function:| FCarlaActor * FActorRegistry::Register | ( | AActor & | Actor, |
| FActorDescription | Description, | ||
| IdType | DesiredId = 0 |
||
| ) |
Register the Actor in the database.
A new ID will be assign to this actor.
Definition at line 72 of file ActorRegistry.cpp.
References ActorDatabase, Actors, FindCarlaActor(), ID_COUNTER, Ids, FCarlaActor::IsDormant(), MakeCarlaActor(), and FCarlaActor::TheActor.
Referenced by UActorDispatcher::RegisterActor().
Here is the call graph for this function:
Here is the caller graph for this function:| void FActorRegistry::WakeActorUp | ( | FCarlaActor::IdType | Id, |
| UCarlaEpisode * | CarlaEpisode | ||
| ) |
Definition at line 206 of file ActorRegistry.cpp.
References Actors, UCarlaEpisode::AttachActors(), FindCarlaActor(), FCarlaActor::GetActor(), FCarlaActor::GetAttachmentType(), FCarlaActor::GetChildren(), FCarlaActor::GetParent(), Ids, FCarlaActor::IsDormant(), and FCarlaActor::WakeActorUp().
Referenced by FindCarlaActor(), and UActorDispatcher::WakeActorUp().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 132 of file ActorRegistry.h.
Referenced by begin(), Contains(), Deregister(), end(), FindCarlaActor(), GetDescriptionFromStream(), and Register().
Definition at line 128 of file ActorRegistry.h.
Referenced by Deregister(), Num(), PutActorToSleep(), Register(), and WakeActorUp().
|
staticprivate |
Definition at line 134 of file ActorRegistry.h.
Referenced by Register().
Definition at line 130 of file ActorRegistry.h.
Referenced by Deregister(), FindCarlaActor(), PutActorToSleep(), Register(), and WakeActorUp().
1.8.13