CARLA
TaggerDelegate.h
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 #pragma once
8 
9 #include "Engine/World.h"
10 
11 #include "TaggerDelegate.generated.h"
12 
13 /// Used to tag every actor that is spawned into the world.
14 UCLASS()
15 class CARLA_API UTaggerDelegate : public UObject
16 {
17  GENERATED_BODY()
18 
19 public:
20 
22 
23  void RegisterSpawnHandler(UWorld *World);
24 
25  void SetSemanticSegmentationEnabled(bool Enable = true)
26  {
27  bSemanticSegmentationEnabled = Enable;
28  }
29 
30  void OnActorSpawned(AActor *Actor);
31 
32 private:
33 
34  FOnActorSpawned::FDelegate ActorSpawnedDelegate;
35 
36  bool bSemanticSegmentationEnabled = false;
37 };
Used to tag every actor that is spawned into the world.
carla::SharedPtr< cc::Actor > Actor
FOnActorSpawned::FDelegate ActorSpawnedDelegate
void SetSemanticSegmentationEnabled(bool Enable=true)