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 34 UCLASS(Blueprintable, BlueprintType, ClassGroup=(Custom), meta=(BlueprintSpawnableComponent))
35 class 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(BlueprintCallable, Category =
"Carla Light")
55 void SetLightIntensity(
float Intensity);
57 UFUNCTION(BlueprintPure, Category =
"Carla Light")
58 float GetLightIntensity()
const;
60 UFUNCTION(BlueprintCallable, Category =
"Carla Light")
61 void SetLightColor(FLinearColor
Color);
63 UFUNCTION(BlueprintPure, Category =
"Carla Light")
64 FLinearColor GetLightColor()
const;
66 UFUNCTION(BlueprintCallable, Category =
"Carla Light")
67 void SetLightOn(
bool bOn);
69 UFUNCTION(BlueprintPure, Category =
"Carla Light")
70 bool GetLightOn()
const;
72 UFUNCTION(BlueprintCallable, Category =
"Carla Light")
75 UFUNCTION(BlueprintPure, Category =
"Carla Light")
82 FVector GetLocation()
const;
84 UFUNCTION(BlueprintPure, Category =
"Carla Light")
87 UFUNCTION(BlueprintCallable, Category =
"Carla Light")
92 UPROPERTY(EditAnywhere, Category =
"Carla Light")
95 UPROPERTY(EditAnywhere, Category =
"Carla Light")
98 UPROPERTY(EditAnywhere, Category =
"Carla Light")
99 FLinearColor LightColor;
101 UPROPERTY(EditAnywhere, Category =
"Carla Light")
104 UPROPERTY(EditAnywhere, Category =
"Carla Light")
109 void RecordLightChange()
const;
111 bool bRegistered =
false;
#define CARLA_ENUM_FROM_RPC(e)
sensor::data::Color Color