CARLA
 
载入中...
搜索中...
未找到
ObjectRegister.h
浏览该文件的文档.
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
9#include "GameFramework/Actor.h"
10
15
16#include "ObjectRegister.generated.h"
17
18UCLASS()
19class CARLA_API UObjectRegister : public UObject
20{
21 GENERATED_BODY()
22
23public:
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
37private:
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};
Base class for CARLA wheeled vehicles.