CARLA
ObjectRegister.h
Go to the documentation of this file.
1 // Copyright (c) 2020 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 
13 
14 #include "ObjectRegister.generated.h"
15 
16 class AActor;
17 
18 UCLASS()
19 class CARLA_API UObjectRegister : public UObject
20 {
21  GENERATED_BODY()
22 
23 public:
24 
27 
28  UFUNCTION(Category = "Carla Object Register", BlueprintCallable, CallInEditor)
29  TArray<FEnvironmentObject> GetEnvironmentObjects(uint8 InTagQueried = 0xFF) const;
30 
31  UFUNCTION(Category = "Carla Object Register")
32  void RegisterObjects(TArray<AActor*> Actors);
33 
34  UFUNCTION(Category = "Carla Object Register")
35  void EnableEnvironmentObjects(const TSet<uint64>& EnvObjectIds, bool Enable);
36 
37 private:
38 
39  void RegisterEnvironmentObject(
40  AActor* Actor,
43  uint8 Tag);
44 
45  void RegisterVehicle(ACarlaWheeledVehicle* Vehicle);
46 
47  void RegisterCharacter(ACharacter* Character);
48 
49  void RegisterTrafficLight(ATrafficLightBase* TrafficLight);
50 
51  void RegisterISMComponents(AActor* Actor);
52 
53  void RegisterSMComponents(AActor* Actor);
54 
55  void RegisterSKMComponents(AActor* Actor);
56 
57  void EnableEnvironmentObject(FEnvironmentObject& EnvironmentObject, bool Enable);
58 
59  void EnableActor(FEnvironmentObject& EnvironmentObject, bool Enable);
60 
61  void EnableTrafficLight(FEnvironmentObject& EnvironmentObject, bool Enable);
62 
63  void EnableISMComp(FEnvironmentObject& EnvironmentObject, bool Enable);
64 
65  TMultiMap<uint64, const UStaticMeshComponent*> ObjectIdToComp;
66 
67  UPROPERTY(Category = "Carla Object Register", EditAnywhere)
68  TArray<FEnvironmentObject> EnvironmentObjects;
69 
70  int FoliageActorInstanceCount = 0;
71 
72 };
carla::SharedPtr< cc::Actor > Actor
TMultiMap< uint64, const UStaticMeshComponent * > ObjectIdToComp
Base class for CARLA wheeled vehicles.