13#include "CoreMinimal.h"
14#include "Components/ActorComponent.h"
15#include "CarlaLight.generated.h"
19#define CARLA_ENUM_FROM_RPC(e) static_cast<uint8>(carla::rpc::LightState::LightGroup:: e)
31#undef CARLA_ENUM_FROM_RPC
34UCLASS(Blueprintable, BlueprintType, ClassGroup=(Custom), meta=(BlueprintSpawnableComponent))
35class CARLA_API UCarlaLight :
public UActorComponent
42 void BeginPlay() override;
44 void EndPlay(const EEndPlayReason::Type EndPlayReason) override;
46 void OnComponentDestroyed(
bool bDestroyingHierarchy) override;
48 UFUNCTION(BlueprintCallable, Category = "Carla Light")
51 UFUNCTION(BlueprintImplementableEvent, BlueprintCallable, Category = "Carla Light")
54 UFUNCTION(BlueprintImplementableEvent, BlueprintCallable, Category = "Carla Light")
55 void RegisterLightWithWeather();
57 UFUNCTION(BlueprintCallable, Category = "Carla Light")
58 void SetLightIntensity(
float Intensity);
60 UFUNCTION(BlueprintPure, Category = "Carla Light")
61 float GetLightIntensity() const;
63 UFUNCTION(BlueprintCallable, Category = "Carla Light")
64 void SetLightColor(FLinearColor Color);
66 UFUNCTION(BlueprintPure, Category = "Carla Light")
67 FLinearColor GetLightColor() const;
69 UFUNCTION(BlueprintCallable, Category = "Carla Light")
70 void SetLightOn(
bool bOn);
72 UFUNCTION(BlueprintPure, Category = "Carla Light")
73 bool GetLightOn() const;
75 UFUNCTION(BlueprintCallable, Category = "Carla Light")
78 UFUNCTION(BlueprintPure, Category = "Carla Light")
81 carla::rpc::LightState GetLightState();
83 void SetLightState(
carla::rpc::LightState LightState);
85 FVector GetLocation() const;
87 UFUNCTION(BlueprintPure, Category = "Carla Light")
90 UFUNCTION(BlueprintCallable, Category = "Carla Light")
95 UPROPERTY(EditAnywhere, Category = "Carla Light")
98 UPROPERTY(EditAnywhere, Category = "Carla Light")
101 UPROPERTY(EditAnywhere, Category = "Carla Light")
102 FLinearColor LightColor;
104 UPROPERTY(EditAnywhere, Category = "Carla Light")
107 UPROPERTY(EditAnywhere, Category = "Carla Light")
112 void RecordLightChange() const;
114 bool bRegistered = false;
#define CARLA_ENUM_FROM_RPC(e)
This file contains definitions of common data structures used in traffic manager.