CARLA
TaggerDelegate.cpp
Go to the documentation of this file.
1 // Copyright (c) 2017 Computer Vision Center (CVC) at the Universitat Autonoma
2 // de Barcelona (UAB).
3 //
4 // This work is licensed under the terms of the MIT license.
5 // For a copy, see <https://opensource.org/licenses/MIT>.
6 
7 #include "Carla.h"
8 #include "TaggerDelegate.h"
9 
10 #include "Game/Tagger.h"
11 
12 #include "Engine/World.h"
13 
15  ActorSpawnedDelegate(FOnActorSpawned::FDelegate::CreateUObject(this, &UTaggerDelegate::OnActorSpawned)) {}
16 
18 {
19  InWorld->AddOnActorSpawnedHandler(ActorSpawnedDelegate);
20 }
21 
23 {
24  if (InActor != nullptr) {
26  }
27 }
Used to tag every actor that is spawned into the world.
FOnActorSpawned::FDelegate ActorSpawnedDelegate
void OnActorSpawned(AActor *Actor)
static void TagActor(const AActor &Actor, bool bTagForSemanticSegmentation)
Set the tag of an actor.
Definition: Tagger.cpp:90
bool bSemanticSegmentationEnabled
void RegisterSpawnHandler(UWorld *World)