CARLA
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
AWeather Class Reference

#include <Weather.h>

+ Inheritance diagram for AWeather:
+ Collaboration diagram for AWeather:

Public Member Functions

void ApplyWeather (const FWeatherParameters &WeatherParameters)
 Update the weather parameters and notifies it to the blueprint's event. More...
 
 AWeather (const FObjectInitializer &ObjectInitializer)
 
const FWeatherParametersGetCurrentWeather () const
 Returns the current WeatherParameters. More...
 
const bool & GetDayNightCycle () const
 Returns whether the day night cycle is active (automatic on/off switch when changin to night mode) More...
 
void NotifyWeather (ASensor *Sensor=nullptr)
 Notifing the weather to the blueprint's event. More...
 
void SetDayNightCycle (const bool &active)
 Update the day night cycle. More...
 
void SetWeather (const FWeatherParameters &WeatherParameters)
 Update the weather parameters without notifing it to the blueprint's event. More...
 

Protected Member Functions

void RefreshWeather (const FWeatherParameters &WeatherParameters)
 

Private Member Functions

void CheckWeatherPostProcessEffects ()
 

Private Attributes

TMap< UMaterial *, float > ActiveBlendables
 
bool DayNightCycle = true
 
UMaterial * DustStormPostProcessMaterial
 
UMaterial * PrecipitationPostProcessMaterial
 
FWeatherParameters Weather
 

Detailed Description

Definition at line 18 of file Weather.h.

Constructor & Destructor Documentation

◆ AWeather()

AWeather::AWeather ( const FObjectInitializer &  ObjectInitializer)

Definition at line 14 of file Weather.cpp.

References DustStormPostProcessMaterial, and PrecipitationPostProcessMaterial.

Member Function Documentation

◆ ApplyWeather()

void AWeather::ApplyWeather ( const FWeatherParameters WeatherParameters)

Update the weather parameters and notifies it to the blueprint's event.

Definition at line 49 of file Weather.cpp.

References CheckWeatherPostProcessEffects(), FWeatherParameters::Cloudiness, FWeatherParameters::DustStorm, FWeatherParameters::FogDensity, FWeatherParameters::FogDistance, FWeatherParameters::FogFalloff, FWeatherParameters::MieScatteringScale, FWeatherParameters::Precipitation, FWeatherParameters::PrecipitationDeposits, FWeatherParameters::RayleighScatteringScale, RefreshWeather(), FWeatherParameters::ScatteringIntensity, SetWeather(), FWeatherParameters::SunAltitudeAngle, FWeatherParameters::SunAzimuthAngle, Weather, FWeatherParameters::Wetness, and FWeatherParameters::WindIntensity.

Referenced by ACarlaGameModeBase::BeginPlay().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CheckWeatherPostProcessEffects()

void AWeather::CheckWeatherPostProcessEffects ( )
private

Definition at line 27 of file Weather.cpp.

References ActiveBlendables, FWeatherParameters::DustStorm, DustStormPostProcessMaterial, ASceneCaptureSensor::GetCaptureComponent2D(), FWeatherParameters::Precipitation, PrecipitationPostProcessMaterial, and Weather.

Referenced by ApplyWeather(), and NotifyWeather().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetCurrentWeather()

const FWeatherParameters& AWeather::GetCurrentWeather ( ) const
inline

Returns the current WeatherParameters.

Definition at line 39 of file Weather.h.

◆ GetDayNightCycle()

const bool& AWeather::GetDayNightCycle ( ) const
inline

Returns whether the day night cycle is active (automatic on/off switch when changin to night mode)

Definition at line 46 of file Weather.h.

◆ NotifyWeather()

void AWeather::NotifyWeather ( ASensor Sensor = nullptr)

Notifing the weather to the blueprint's event.

Definition at line 76 of file Weather.cpp.

References CheckWeatherPostProcessEffects(), RefreshWeather(), and Weather.

Referenced by ASceneCaptureSensor::BeginPlay().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RefreshWeather()

void AWeather::RefreshWeather ( const FWeatherParameters WeatherParameters)
protected

Referenced by ApplyWeather(), and NotifyWeather().

+ Here is the caller graph for this function:

◆ SetDayNightCycle()

void AWeather::SetDayNightCycle ( const bool &  active)

Update the day night cycle.

Definition at line 89 of file Weather.cpp.

References DayNightCycle.

◆ SetWeather()

void AWeather::SetWeather ( const FWeatherParameters WeatherParameters)

Update the weather parameters without notifing it to the blueprint's event.

Definition at line 84 of file Weather.cpp.

References Weather.

Referenced by ApplyWeather().

+ Here is the caller graph for this function:

Member Data Documentation

◆ ActiveBlendables

TMap<UMaterial*, float> AWeather::ActiveBlendables
private

Definition at line 70 of file Weather.h.

Referenced by CheckWeatherPostProcessEffects().

◆ DayNightCycle

bool AWeather::DayNightCycle = true
private

Definition at line 73 of file Weather.h.

Referenced by SetDayNightCycle().

◆ DustStormPostProcessMaterial

UMaterial* AWeather::DustStormPostProcessMaterial
private

Definition at line 68 of file Weather.h.

Referenced by AWeather(), and CheckWeatherPostProcessEffects().

◆ PrecipitationPostProcessMaterial

UMaterial* AWeather::PrecipitationPostProcessMaterial
private

Definition at line 66 of file Weather.h.

Referenced by AWeather(), and CheckWeatherPostProcessEffects().

◆ Weather

FWeatherParameters AWeather::Weather
private

Definition at line 64 of file Weather.h.

Referenced by ApplyWeather(), CheckWeatherPostProcessEffects(), NotifyWeather(), and SetWeather().


The documentation for this class was generated from the following files: