|
CARLA
|
Used to set settings for every actor that is spawned into the world. More...
#include <CarlaSettingsDelegate.h>
Inheritance diagram for UCarlaSettingsDelegate:Public Member Functions | |
| void | ApplyQualityLevelPostRestart () |
| After loading a level, apply the current settings. | |
| void | ApplyQualityLevelPreRestart () |
| Before loading a level, apply the current settings. | |
| void | RegisterSpawnHandler (UWorld *World) |
| Create the event trigger handler for all the newly spawned actors to be processed with a custom function here. | |
| void | Reset () |
| Reset settings to default. | |
| void | SetAllActorsDrawDistance (UWorld *world, float max_draw_distance) const |
| UCarlaSettingsDelegate () | |
Private Member Functions | |
| void | ApplyPerActorQualitySettings (UWorld *world, float light_fade_distance, bool cast_directional_shadows, bool hide_non_directional_lights, float draw_distance) const |
| Single-pass replacement for SetAllLights + SetAllActorsDrawDistance when applying a quality tier. | |
| void | CheckCarlaSettings (UWorld *world) |
| Check that the world, instance and settings are valid and save the CarlaSettings instance. | |
| UWorld * | GetLocalWorld () |
| void | SetActorComponentsDrawDistance (AActor *actor, float max_draw_distance) const |
| void | SetAllLights (UWorld *world, float max_distance_fade, bool cast_shadows, bool hide_non_directional) const |
| void | SetAllRoads (UWorld *world, float max_draw_distance, const TArray< FStaticMaterial > &road_pieces_materials) const |
| void | SetPostProcessEffectsEnabled (UWorld *world, bool enabled) const |
Private Attributes | |
| UCarlaSettings * | CarlaSettings = nullptr |
Static Private Attributes | |
| static EQualityLevel | AppliedLowPostResetQualityLevel = EQualityLevel::Epic |
| Currently applied quality level after level is restarted. | |
Used to set settings for every actor that is spawned into the world.
Definition at line 23 of file CarlaSettingsDelegate.h.
| UCarlaSettingsDelegate::UCarlaSettingsDelegate | ( | ) |
Definition at line 34 of file CarlaSettingsDelegate.cpp.
|
private |
Single-pass replacement for SetAllLights + SetAllActorsDrawDistance when applying a quality tier.
Walks the actor list once and dispatches per-type, halving the cost of a tier change.
Definition at line 296 of file CarlaSettingsDelegate.cpp.
References UCarlaSettings::CARLA_ROAD_TAG, UCarlaSettings::CARLA_SKY_TAG, IsValid(), and SetActorComponentsDrawDistance().
Referenced by ApplyQualityLevelPostRestart().
| void UCarlaSettingsDelegate::ApplyQualityLevelPostRestart | ( | ) |
After loading a level, apply the current settings.
Definition at line 46 of file CarlaSettingsDelegate.cpp.
References AppliedLowPostResetQualityLevel, ApplyPerActorQualitySettings(), CarlaSettings, CheckCarlaSettings(), UCarlaSettings::GetQualityLevel(), SetAllRoads(), and SetPostProcessEffectsEnabled().
Referenced by ACarlaGameModeBase::InitGame().
| void UCarlaSettingsDelegate::ApplyQualityLevelPreRestart | ( | ) |
Before loading a level, apply the current settings.
Definition at line 67 of file CarlaSettingsDelegate.cpp.
References UCarlaSettings::bDisableRendering, CarlaSettings, CheckCarlaSettings(), and IsValid().
Referenced by ACarlaGameModeBase::RestartPlayer().
|
private |
Check that the world, instance and settings are valid and save the CarlaSettings instance.
| world | used to get the instance of CarlaSettings. |
Definition at line 97 of file CarlaSettingsDelegate.cpp.
References CarlaSettings, GetLocalWorld(), and IsValid().
Referenced by ApplyQualityLevelPostRestart(), ApplyQualityLevelPreRestart(), and RegisterSpawnHandler().
|
private |
Definition at line 92 of file CarlaSettingsDelegate.cpp.
Referenced by CheckCarlaSettings().
| void UCarlaSettingsDelegate::RegisterSpawnHandler | ( | UWorld * | World | ) |
Create the event trigger handler for all the newly spawned actors to be processed with a custom function here.
Definition at line 41 of file CarlaSettingsDelegate.cpp.
References CheckCarlaSettings().
Referenced by ACarlaGameModeBase::InitGame().
| void UCarlaSettingsDelegate::Reset | ( | ) |
Reset settings to default.
Definition at line 36 of file CarlaSettingsDelegate.cpp.
References AppliedLowPostResetQualityLevel, and Epic.
Referenced by ACarlaGameModeBase::EndPlay().
|
private |
Definition at line 178 of file CarlaSettingsDelegate.cpp.
References CARLA_SETTINGS_MAX_SCALE_SIZE, and IsValid().
Referenced by ApplyPerActorQualitySettings(), and SetAllActorsDrawDistance().
| void UCarlaSettingsDelegate::SetAllActorsDrawDistance | ( | UWorld * | world, |
| float | max_draw_distance | ||
| ) | const |
@TODO: use semantics to grab all actors by type (vehicles,ground,people,props) and set different distances configured in the global properties
Definition at line 205 of file CarlaSettingsDelegate.cpp.
References UCarlaSettings::CARLA_ROAD_TAG, UCarlaSettings::CARLA_SKY_TAG, IsValid(), and SetActorComponentsDrawDistance().
Referenced by ACarlaGameModeBase::OnEpisodeSettingsChanged().
|
private |
Definition at line 258 of file CarlaSettingsDelegate.cpp.
References IsValid().
|
private |
Definition at line 114 of file CarlaSettingsDelegate.cpp.
References UCarlaSettings::CARLA_ROAD_TAG, and IsValid().
Referenced by ApplyQualityLevelPostRestart().
|
private |
Definition at line 239 of file CarlaSettingsDelegate.cpp.
References IsValid().
Referenced by ApplyQualityLevelPostRestart().
|
staticprivate |
Currently applied quality level after level is restarted.
quality settings configuration between runs
Definition at line 86 of file CarlaSettingsDelegate.h.
Referenced by ApplyQualityLevelPostRestart(), and Reset().
|
private |
Definition at line 88 of file CarlaSettingsDelegate.h.
Referenced by ApplyQualityLevelPostRestart(), ApplyQualityLevelPreRestart(), and CheckCarlaSettings().