CARLA
Weather.h
Go to the documentation of this file.
1 // Copyright (c) 2017 Computer Vision Center (CVC) at the Universitat Autonoma
2 // de Barcelona (UAB).
3 //
4 // This work is licensed under the terms of the MIT license.
5 // For a copy, see <https://opensource.org/licenses/MIT>.
6 
7 #pragma once
8 
9 #include "GameFramework/Actor.h"
10 
12 
13 #include "Weather.generated.h"
14 
15 UCLASS(Abstract)
16 class CARLA_API AWeather : public AActor
17 {
18  GENERATED_BODY()
19 
20 public:
21 
22  AWeather(const FObjectInitializer& ObjectInitializer);
23 
24  /// Update the weather parameters and notifies it to the blueprint's event
25  UFUNCTION(BlueprintCallable)
26  void ApplyWeather(const FWeatherParameters &WeatherParameters);
27 
28  /// Notifing the weather to the blueprint's event
29  void NotifyWeather();
30 
31  /// Update the weather parameters without notifing it to the blueprint's event
32  UFUNCTION(BlueprintCallable)
33  void SetWeather(const FWeatherParameters &WeatherParameters);
34 
35  /// Returns the current WeatherParameters
36  UFUNCTION(BlueprintCallable)
37  const FWeatherParameters &GetCurrentWeather() const
38  {
39  return Weather;
40  }
41 
42 protected:
43 
44  UFUNCTION(BlueprintImplementableEvent)
45  void RefreshWeather(const FWeatherParameters &WeatherParameters);
46 
47 private:
48 
49  UPROPERTY(VisibleAnywhere)
51 };