CARLA
 
载入中...
搜索中...
未找到
LibCarla/source/carla/rpc/WeatherParameters.h
浏览该文件的文档.
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 "carla/MsgPack.h"
10
11#ifdef LIBCARLA_INCLUDED_FROM_UE4
15#endif // LIBCARLA_INCLUDED_FROM_UE4
16
17namespace carla {
18namespace rpc {
19
21 public:
22
23 /// @name Weather presets
24 /// @{
25
49
50 /// @}
51
52 WeatherParameters() = default;
53
55 float in_cloudiness,
56 float in_precipitation,
57 float in_precipitation_deposits,
58 float in_wind_intensity,
59 float in_sun_azimuth_angle,
60 float in_sun_altitude_angle,
61 float in_fog_density,
62 float in_fog_distance,
63 float in_fog_falloff,
64 float in_wetness,
65 float in_scattering_intensity,
66 float in_mie_scattering_scale,
67 float in_rayleigh_scattering_scale,
68 float in_dust_storm)
69 : cloudiness(in_cloudiness),
70 precipitation(in_precipitation),
71 precipitation_deposits(in_precipitation_deposits),
72 wind_intensity(in_wind_intensity),
73 sun_azimuth_angle(in_sun_azimuth_angle),
74 sun_altitude_angle(in_sun_altitude_angle),
75 fog_density(in_fog_density),
76 fog_distance(in_fog_distance),
77 fog_falloff(in_fog_falloff),
78 wetness(in_wetness),
79 scattering_intensity(in_scattering_intensity),
80 mie_scattering_scale(in_mie_scattering_scale),
81 rayleigh_scattering_scale(in_rayleigh_scattering_scale),
82 dust_storm(in_dust_storm) {}
83
84 float cloudiness = 0.0f;
85 float precipitation = 0.0f;
87 float wind_intensity = 0.0f;
88 float sun_azimuth_angle = 0.0f;
89 float sun_altitude_angle = 0.0f;
90 float fog_density = 0.0f;
91 float fog_distance = 0.0f;
92 float fog_falloff = 0.0f;
93 float wetness = 0.0f;
97 float dust_storm = 0.0f;
98
99#ifdef LIBCARLA_INCLUDED_FROM_UE4
100
102 : cloudiness(Weather.Cloudiness),
103 precipitation(Weather.Precipitation),
104 precipitation_deposits(Weather.PrecipitationDeposits),
105 wind_intensity(Weather.WindIntensity),
106 sun_azimuth_angle(Weather.SunAzimuthAngle),
107 sun_altitude_angle(Weather.SunAltitudeAngle),
108 fog_density(Weather.FogDensity),
109 fog_distance(Weather.FogDistance),
110 fog_falloff(Weather.FogFalloff),
111 wetness(Weather.Wetness),
112 scattering_intensity(Weather.ScatteringIntensity),
113 mie_scattering_scale(Weather.MieScatteringScale),
114 rayleigh_scattering_scale(Weather.RayleighScatteringScale),
115 dust_storm(Weather.DustStorm) {}
116
117 operator FWeatherParameters() const {
118 FWeatherParameters Weather;
119 Weather.Cloudiness = cloudiness;
125 Weather.FogDensity = fog_density;
126 Weather.FogDistance = fog_distance;
127 Weather.FogFalloff = fog_falloff;
128 Weather.Wetness = wetness;
132 Weather.DustStorm = dust_storm;
133 return Weather;
134 }
135
136#endif // LIBCARLA_INCLUDED_FROM_UE4
137
155
156 bool operator==(const WeatherParameters &rhs) const {
157 return !(*this != rhs);
158 }
159
170 wetness,
174 dust_storm);
175 };
176
177} // namespace rpc
178} // namespace carla
MSGPACK_DEFINE_ARRAY(cloudiness, precipitation, precipitation_deposits, wind_intensity, sun_azimuth_angle, sun_altitude_angle, fog_density, fog_distance, fog_falloff, wetness, scattering_intensity, mie_scattering_scale, rayleigh_scattering_scale, dust_storm)
bool operator==(const WeatherParameters &rhs) const
bool operator!=(const WeatherParameters &rhs) const
WeatherParameters(float in_cloudiness, float in_precipitation, float in_precipitation_deposits, float in_wind_intensity, float in_sun_azimuth_angle, float in_sun_altitude_angle, float in_fog_density, float in_fog_distance, float in_fog_falloff, float in_wetness, float in_scattering_intensity, float in_mie_scattering_scale, float in_rayleigh_scattering_scale, float in_dust_storm)
This file contains definitions of common data structures used in traffic manager.
Definition Carla.cpp:133