11#include <util/ue-header-guard-begin.h>
12#include "GameFramework/Actor.h"
13#include "Camera/CameraModifier.h"
14#include <util/ue-header-guard-end.h>
16#include "Weather.generated.h"
21class UParticleSystemComponent;
34 FPostProcessSettings& Settings) override;
44 AWeather(
const FObjectInitializer& ObjectInitializer);
47 UFUNCTION(BlueprintCallable)
54 UFUNCTION(BlueprintCallable)
58 UFUNCTION(BlueprintCallable)
72 UFUNCTION(BlueprintCallable)
79 void SetDayNightCycle(
const bool &active);
88 UFUNCTION(BlueprintCallable, Category =
"Weather")
93 static
void FillSkyPostProcessFallback(class UPostProcessComponent* PostProcessComponent);
103 static
bool SetSkyLightMap(UWorld* World, class UTextureCube* Cubemap,
float Intensity);
107 static
void ClearSkyLightMap(UWorld* World);
109 static
bool HasSkyLightMap();
114 virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent)
override;
117 UFUNCTION(BlueprintImplementableEvent)
122 virtual
void Tick(
float DeltaSeconds) override;
124 virtual
void EndPlay(const EEndPlayReason::Type EndPlayReason) override;
159 UPROPERTY(EditAnywhere, Category=
"Parameters")
170 UPROPERTY(EditAnywhere, Category =
"Weather")
A sensor that captures images from the scene.
uint64 GetApplySerial() const
How many times ApplyWeather ran: Multi-GPU secondaries mirror every apply, also the ones that set the...
UCarlaRainCameraModifier * RainCameraModifier
void SetWeather(const FWeatherParameters &WeatherParameters)
Update the weather parameters without notifing it to the blueprint's event.
FWeatherParameters Weather
TMap< TWeakObjectPtr< ASceneCaptureCamera >, TWeakObjectPtr< UParticleSystemComponent > > SensorRain
void ApplyWeather(const FWeatherParameters &WeatherParameters)
Update the weather parameters and notifies it to the blueprint's event.
void UpdateStreetLightsForDayNight()
Broadcast the current day/night state (derived from SunAltitudeAngle) to UCarlaLightSubsystem so regi...
UMaterial * PrecipitationPostProcessMaterial
UParticleSystemComponent * ViewportRain
void CheckWeatherPostProcessEffects()
UParticleSystem * RainTemplate
UParticleSystemComponent * CreateRainEmitter(AActor *Owner, bool bSensor)
AWeather(const FObjectInitializer &ObjectInitializer)
void NotifyWeather(ASensor *Sensor=nullptr)
Notifing the weather to the blueprint's event.
UMaterial * DustStormPostProcessMaterial
void RefreshWeather(const FWeatherParameters &WeatherParameters)
void PushWeatherToSky()
Push the current weather into the ASkyBase rig (BP_Carla_Sky) and run its blueprint Update.
class UMaterialParameterCollection * RainParameters
TMap< UMaterial *, float > ActiveBlendables
const bool & GetDayNightCycle() const
Returns whether the day night cycle is active (automatic on/off switch when changin to night mode).
virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override
const FWeatherParameters & GetCurrentWeather() const
Returns the current WeatherParameters.
virtual void BeginPlay() override
virtual void Tick(float DeltaSeconds) override
Main-view lens pass; sensor passes are managed separately by AWeather.
virtual void ModifyPostProcess(float DeltaTime, float &BlendWeight, FPostProcessSettings &Settings) override