CARLA
Loading...
Searching...
No Matches
Unreal
CarlaUnreal
Plugins
Carla
Source
Carla
Game
TaggerDelegate.cpp
Go to the documentation of this file.
1
// Copyright (c) 2026 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 "
TaggerDelegate.h
"
8
#include "
Carla.h
"
9
#include "
Game/Tagger.h
"
10
11
#include <util/ue-header-guard-begin.h>
12
#include "Engine/World.h"
13
#include <util/ue-header-guard-end.h>
14
15
UTaggerDelegate::UTaggerDelegate
() :
16
ActorSpawnedDelegate(FOnActorSpawned::FDelegate::CreateUObject(this, &
UTaggerDelegate
::OnActorSpawned)) {}
17
18
void
UTaggerDelegate::RegisterSpawnHandler
(UWorld *InWorld)
19
{
20
InWorld->AddOnActorSpawnedHandler(
ActorSpawnedDelegate
);
21
}
22
23
void
UTaggerDelegate::OnActorSpawned
(
AActor
* InActor)
24
{
25
if
(InActor !=
nullptr
) {
26
ATagger::TagActor
(*InActor,
bSemanticSegmentationEnabled
);
27
}
28
}
Carla.h
TaggerDelegate.h
Tagger.h
AActor
ATagger::TagActor
static void TagActor(const AActor &Actor, bool bTagForSemanticSegmentation)
Set the tag of an actor.
Definition
Tagger.cpp:130
UTaggerDelegate
Used to tag every actor that is spawned into the world.
Definition
TaggerDelegate.h:18
UTaggerDelegate::OnActorSpawned
void OnActorSpawned(AActor *Actor)
Definition
TaggerDelegate.cpp:23
UTaggerDelegate::ActorSpawnedDelegate
FOnActorSpawned::FDelegate ActorSpawnedDelegate
Definition
TaggerDelegate.h:36
UTaggerDelegate::bSemanticSegmentationEnabled
bool bSemanticSegmentationEnabled
Definition
TaggerDelegate.h:38
UTaggerDelegate::UTaggerDelegate
UTaggerDelegate()
Definition
TaggerDelegate.cpp:15
UTaggerDelegate::RegisterSpawnHandler
void RegisterSpawnHandler(UWorld *World)
Definition
TaggerDelegate.cpp:18
Generated by
1.9.8