11 UCarlaLight::UCarlaLight()
13 PrimaryComponentTick.bCanEverTick =
false;
16 void UCarlaLight::BeginPlay()
23 void UCarlaLight::RegisterLight()
30 UWorld *World = GetWorld();
36 RegisterLightWithWeather();
40 void UCarlaLight::OnComponentDestroyed(
bool bDestroyingHierarchy)
42 Super::OnComponentDestroyed(bDestroyingHierarchy);
45 void UCarlaLight::EndPlay(
const EEndPlayReason::Type EndPlayReason)
47 UWorld *World = GetWorld();
53 Super::EndPlay(EndPlayReason);
56 void UCarlaLight::SetLightIntensity(
float Intensity)
58 LightIntensity = Intensity;
62 float UCarlaLight::GetLightIntensity()
const 64 return LightIntensity;
67 void UCarlaLight::SetLightColor(FLinearColor
Color)
74 FLinearColor UCarlaLight::GetLightColor()
const 79 void UCarlaLight::SetLightOn(
bool bOn)
86 bool UCarlaLight::GetLightOn()
const 91 void UCarlaLight::SetLightType(
ELightType Type)
106 static_cast<carla::rpc::LightState::LightGroup>(LightType),
119 LightColor = LightState.
_color;
126 FVector UCarlaLight::GetLocation()
const 128 auto Location = GetOwner()->GetActorLocation();
138 int UCarlaLight::GetId()
const 143 void UCarlaLight::SetId(
int InId)
148 void UCarlaLight::RecordLightChange()
const 153 auto* Recorder = Episode->GetRecorder();
154 if (Recorder && Recorder->IsEnabled())
156 Recorder->AddEventLightSceneChanged(
this);
sensor::data::Color Color
void UnregisterLight(UCarlaLight *CarlaLight)
static ACarlaGameModeBase * GetGameMode(const UObject *WorldContextObject)
ALargeMapManager * GetLMManager() const
static UCarlaEpisode * GetCurrentEpisode(const UObject *WorldContextObject)
void RegisterLight(UCarlaLight *CarlaLight)
Base class for the CARLA Game Mode.
FVector LocalToGlobalLocation(const FVector &InLocation) const