Added DustStorm boolean option in WeatherParameters.
This commit is contained in:
parent
e50ffbeea3
commit
9d8c6175ab
|
@ -11,29 +11,30 @@ namespace rpc {
|
|||
|
||||
using WP = WeatherParameters;
|
||||
|
||||
// cloudiness precip. prec.dep. wind azimuth altitude fog dens fog dist fog fall wetness scat.i mie.scat.s rayleigh.scat.scale
|
||||
WP WP::Default = { -1.0f, -1.0f, -1.0f, -1.00f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, 1.0f, 0.03f, 0.0331f};
|
||||
WP WP::ClearNoon = { 5.0f, 0.0f, 0.0f, 10.0f, -1.0f, 45.0f, 2.0f, 0.75f, 0.1f, 0.0f, 1.0f, 0.03f, 0.0331f};
|
||||
WP WP::CloudyNoon = { 60.0f, 0.0f, 0.0f, 10.0f, -1.0f, 45.0f, 3.0f, 0.75f, 0.1f, 0.0f, 1.0f, 0.03f, 0.0331f};
|
||||
WP WP::WetNoon = { 5.0f, 0.0f, 50.0f, 10.0f, -1.0f, 45.0f, 3.0f, 0.75f, 0.1f, 0.0f, 1.0f, 0.03f, 0.0331f};
|
||||
WP WP::WetCloudyNoon = { 60.0f, 0.0f, 50.0f, 10.0f, -1.0f, 45.0f, 3.0f, 0.75f, 0.1f, 0.0f, 1.0f, 0.03f, 0.0331f};
|
||||
WP WP::MidRainyNoon = { 60.0f, 60.0f, 60.0f, 60.0f, -1.0f, 45.0f, 3.0f, 0.75f, 0.1f, 0.0f, 1.0f, 0.03f, 0.0331f};
|
||||
WP WP::HardRainNoon = { 100.0f, 100.0f, 90.0f, 100.0f, -1.0f, 45.0f, 7.0f, 0.75f, 0.1f, 0.0f, 1.0f, 0.03f, 0.0331f};
|
||||
WP WP::SoftRainNoon = { 20.0f, 30.0f, 50.0f, 30.0f, -1.0f, 45.0f, 3.0f, 0.75f, 0.1f, 0.0f, 1.0f, 0.03f, 0.0331f};
|
||||
WP WP::ClearSunset = { 5.0f, 0.0f, 0.0f, 10.0f, -1.0f, 15.0f, 2.0f, 0.75f, 0.1f, 0.0f, 1.0f, 0.03f, 0.0331f};
|
||||
WP WP::CloudySunset = { 60.0f, 0.0f, 0.0f, 10.0f, -1.0f, 15.0f, 3.0f, 0.75f, 0.1f, 0.0f, 1.0f, 0.03f, 0.0331f};
|
||||
WP WP::WetSunset = { 5.0f, 0.0f, 50.0f, 10.0f, -1.0f, 15.0f, 2.0f, 0.75f, 0.1f, 0.0f, 1.0f, 0.03f, 0.0331f};
|
||||
WP WP::WetCloudySunset = { 60.0f, 0.0f, 50.0f, 10.0f, -1.0f, 15.0f, 2.0f, 0.75f, 0.1f, 0.0f, 1.0f, 0.03f, 0.0331f};
|
||||
WP WP::MidRainSunset = { 60.0f, 60.0f, 60.0f, 60.0f, -1.0f, 15.0f, 3.0f, 0.75f, 0.1f, 0.0f, 1.0f, 0.03f, 0.0331f};
|
||||
WP WP::HardRainSunset = { 100.0f, 100.0f, 90.0f, 100.0f, -1.0f, 15.0f, 7.0f, 0.75f, 0.1f, 0.0f, 1.0f, 0.03f, 0.0331f};
|
||||
WP WP::SoftRainSunset = { 20.0f, 30.0f, 50.0f, 30.0f, -1.0f, 15.0f, 2.0f, 0.75f, 0.1f, 0.0f, 1.0f, 0.03f, 0.0331f};
|
||||
WP WP::ClearNight = { 5.0f, 0.0f, 0.0f, 10.0f, -1.0f, -90.0f, 60.0f, 75.0f, 1.0f, 0.0f, 1.0f, 0.03f, 0.0331f};
|
||||
WP WP::CloudyNight = { 60.0f, 0.0f, 0.0f, 10.0f, -1.0f, -90.0f, 60.0f, 0.75f, 0.1f, 0.0f, 1.0f, 0.03f, 0.0331f};
|
||||
WP WP::WetNight = { 5.0f, 0.0f, 50.0f, 10.0f, -1.0f, -90.0f, 60.0f, 75.0f, 1.0f, 60.0f, 1.0f, 0.03f, 0.0331f};
|
||||
WP WP::WetCloudyNight = { 60.0f, 0.0f, 50.0f, 10.0f, -1.0f, -90.0f, 60.0f, 0.75f, 0.1f, 60.0f, 1.0f, 0.03f, 0.0331f};
|
||||
WP WP::SoftRainNight = { 60.0f, 30.0f, 50.0f, 30.0f, -1.0f, -90.0f, 60.0f, 0.75f, 0.1f, 60.0f, 1.0f, 0.03f, 0.0331f};
|
||||
WP WP::MidRainyNight = { 80.0f, 60.0f, 60.0f, 60.0f, -1.0f, -90.0f, 60.0f, 0.75f, 0.1f, 80.0f, 1.0f, 0.03f, 0.0331f};
|
||||
WP WP::HardRainNight = { 100.0f, 100.0f, 90.0f, 100.0f, -1.0f, -90.0f, 100.0f, 0.75f, 0.1f, 100.0f, 1.0f, 0.03f, 0.0331f};
|
||||
// cloudiness precip. prec.dep. wind azimuth altitude fog dens fog dist fog fall wetness scat.i mie.scat.s rayleigh.scat.scale dust storm
|
||||
WP WP::Default = { -1.0f, -1.0f, -1.0f, -1.00f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, 1.0f, 0.03f, 0.0331f, false };
|
||||
WP WP::ClearNoon = { 5.0f, 0.0f, 0.0f, 10.0f, -1.0f, 45.0f, 2.0f, 0.75f, 0.1f, 0.0f, 1.0f, 0.03f, 0.0331f, false };
|
||||
WP WP::CloudyNoon = { 60.0f, 0.0f, 0.0f, 10.0f, -1.0f, 45.0f, 3.0f, 0.75f, 0.1f, 0.0f, 1.0f, 0.03f, 0.0331f, false };
|
||||
WP WP::WetNoon = { 5.0f, 0.0f, 50.0f, 10.0f, -1.0f, 45.0f, 3.0f, 0.75f, 0.1f, 0.0f, 1.0f, 0.03f, 0.0331f, false };
|
||||
WP WP::WetCloudyNoon = { 60.0f, 0.0f, 50.0f, 10.0f, -1.0f, 45.0f, 3.0f, 0.75f, 0.1f, 0.0f, 1.0f, 0.03f, 0.0331f, false };
|
||||
WP WP::MidRainyNoon = { 60.0f, 60.0f, 60.0f, 60.0f, -1.0f, 45.0f, 3.0f, 0.75f, 0.1f, 0.0f, 1.0f, 0.03f, 0.0331f, false };
|
||||
WP WP::HardRainNoon = { 100.0f, 100.0f, 90.0f, 100.0f, -1.0f, 45.0f, 7.0f, 0.75f, 0.1f, 0.0f, 1.0f, 0.03f, 0.0331f, false };
|
||||
WP WP::SoftRainNoon = { 20.0f, 30.0f, 50.0f, 30.0f, -1.0f, 45.0f, 3.0f, 0.75f, 0.1f, 0.0f, 1.0f, 0.03f, 0.0331f, false };
|
||||
WP WP::ClearSunset = { 5.0f, 0.0f, 0.0f, 10.0f, -1.0f, 15.0f, 2.0f, 0.75f, 0.1f, 0.0f, 1.0f, 0.03f, 0.0331f, false };
|
||||
WP WP::CloudySunset = { 60.0f, 0.0f, 0.0f, 10.0f, -1.0f, 15.0f, 3.0f, 0.75f, 0.1f, 0.0f, 1.0f, 0.03f, 0.0331f, false };
|
||||
WP WP::WetSunset = { 5.0f, 0.0f, 50.0f, 10.0f, -1.0f, 15.0f, 2.0f, 0.75f, 0.1f, 0.0f, 1.0f, 0.03f, 0.0331f, false };
|
||||
WP WP::WetCloudySunset = { 60.0f, 0.0f, 50.0f, 10.0f, -1.0f, 15.0f, 2.0f, 0.75f, 0.1f, 0.0f, 1.0f, 0.03f, 0.0331f, false };
|
||||
WP WP::MidRainSunset = { 60.0f, 60.0f, 60.0f, 60.0f, -1.0f, 15.0f, 3.0f, 0.75f, 0.1f, 0.0f, 1.0f, 0.03f, 0.0331f, false };
|
||||
WP WP::HardRainSunset = { 100.0f, 100.0f, 90.0f, 100.0f, -1.0f, 15.0f, 7.0f, 0.75f, 0.1f, 0.0f, 1.0f, 0.03f, 0.0331f, false };
|
||||
WP WP::SoftRainSunset = { 20.0f, 30.0f, 50.0f, 30.0f, -1.0f, 15.0f, 2.0f, 0.75f, 0.1f, 0.0f, 1.0f, 0.03f, 0.0331f, false };
|
||||
WP WP::ClearNight = { 5.0f, 0.0f, 0.0f, 10.0f, -1.0f, -90.0f, 60.0f, 75.0f, 1.0f, 0.0f, 1.0f, 0.03f, 0.0331f, false };
|
||||
WP WP::CloudyNight = { 60.0f, 0.0f, 0.0f, 10.0f, -1.0f, -90.0f, 60.0f, 0.75f, 0.1f, 0.0f, 1.0f, 0.03f, 0.0331f, false };
|
||||
WP WP::WetNight = { 5.0f, 0.0f, 50.0f, 10.0f, -1.0f, -90.0f, 60.0f, 75.0f, 1.0f, 60.0f, 1.0f, 0.03f, 0.0331f, false };
|
||||
WP WP::WetCloudyNight = { 60.0f, 0.0f, 50.0f, 10.0f, -1.0f, -90.0f, 60.0f, 0.75f, 0.1f, 60.0f, 1.0f, 0.03f, 0.0331f, false };
|
||||
WP WP::SoftRainNight = { 60.0f, 30.0f, 50.0f, 30.0f, -1.0f, -90.0f, 60.0f, 0.75f, 0.1f, 60.0f, 1.0f, 0.03f, 0.0331f, false };
|
||||
WP WP::MidRainyNight = { 80.0f, 60.0f, 60.0f, 60.0f, -1.0f, -90.0f, 60.0f, 0.75f, 0.1f, 80.0f, 1.0f, 0.03f, 0.0331f, false };
|
||||
WP WP::HardRainNight = { 100.0f, 100.0f, 90.0f, 100.0f, -1.0f, -90.0f, 100.0f, 0.75f, 0.1f, 100.0f, 1.0f, 0.03f, 0.0331f, false };
|
||||
WP WP::DustStorm = { -1.0f, -1.0f, -1.0f, -1.00f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, 1.0f, 0.03f, 0.0331f, true };
|
||||
|
||||
} // namespace rpc
|
||||
} // namespace carla
|
||||
|
|
|
@ -43,6 +43,7 @@ namespace rpc {
|
|||
static WeatherParameters SoftRainNight;
|
||||
static WeatherParameters MidRainyNight;
|
||||
static WeatherParameters HardRainNight;
|
||||
static WeatherParameters DustStorm;
|
||||
|
||||
/// @}
|
||||
|
||||
|
@ -61,7 +62,8 @@ namespace rpc {
|
|||
float in_wetness,
|
||||
float in_scattering_intensity,
|
||||
float in_mie_scattering_scale,
|
||||
float in_rayleigh_scattering_scale)
|
||||
float in_rayleigh_scattering_scale,
|
||||
bool in_dust_storm)
|
||||
: cloudiness(in_cloudiness),
|
||||
precipitation(in_precipitation),
|
||||
precipitation_deposits(in_precipitation_deposits),
|
||||
|
@ -74,7 +76,8 @@ namespace rpc {
|
|||
wetness(in_wetness),
|
||||
scattering_intensity(in_scattering_intensity),
|
||||
mie_scattering_scale(in_mie_scattering_scale),
|
||||
rayleigh_scattering_scale(in_rayleigh_scattering_scale) {}
|
||||
rayleigh_scattering_scale(in_rayleigh_scattering_scale),
|
||||
dust_storm(in_dust_storm) {}
|
||||
|
||||
float cloudiness = 0.0f;
|
||||
float precipitation = 0.0f;
|
||||
|
@ -89,6 +92,7 @@ namespace rpc {
|
|||
float scattering_intensity = 0.0f;
|
||||
float mie_scattering_scale = 0.0f;
|
||||
float rayleigh_scattering_scale = 0.0331f;
|
||||
bool dust_storm = false;
|
||||
|
||||
#ifdef LIBCARLA_INCLUDED_FROM_UE4
|
||||
|
||||
|
@ -105,7 +109,8 @@ namespace rpc {
|
|||
wetness(Weather.Wetness),
|
||||
scattering_intensity(Weather.ScatteringIntensity),
|
||||
mie_scattering_scale(Weather.MieScatteringScale),
|
||||
rayleigh_scattering_scale(Weather.RayleighScatteringScale) {}
|
||||
rayleigh_scattering_scale(Weather.RayleighScatteringScale),
|
||||
dust_storm(Weather.DustStorm) {}
|
||||
|
||||
operator FWeatherParameters() const {
|
||||
FWeatherParameters Weather;
|
||||
|
@ -122,7 +127,7 @@ namespace rpc {
|
|||
Weather.ScatteringIntensity = scattering_intensity;
|
||||
Weather.MieScatteringScale = mie_scattering_scale;
|
||||
Weather.RayleighScatteringScale = rayleigh_scattering_scale;
|
||||
|
||||
Weather.DustStorm = dust_storm;
|
||||
return Weather;
|
||||
}
|
||||
|
||||
|
@ -142,7 +147,8 @@ namespace rpc {
|
|||
wetness != rhs.wetness ||
|
||||
scattering_intensity != rhs.scattering_intensity ||
|
||||
mie_scattering_scale != rhs.mie_scattering_scale ||
|
||||
rayleigh_scattering_scale != rhs.rayleigh_scattering_scale;
|
||||
rayleigh_scattering_scale != rhs.rayleigh_scattering_scale ||
|
||||
dust_storm != rhs.dust_storm;
|
||||
}
|
||||
|
||||
bool operator==(const WeatherParameters &rhs) const {
|
||||
|
@ -162,7 +168,8 @@ namespace rpc {
|
|||
wetness,
|
||||
scattering_intensity,
|
||||
mie_scattering_scale,
|
||||
rayleigh_scattering_scale);
|
||||
rayleigh_scattering_scale,
|
||||
dust_storm);
|
||||
};
|
||||
|
||||
} // namespace rpc
|
||||
|
|
|
@ -25,7 +25,8 @@ namespace rpc {
|
|||
<< ", wetness=" << std::to_string(weather.wetness)
|
||||
<< ", scattering_intensity=" << std::to_string(weather.scattering_intensity)
|
||||
<< ", mie_scattering_scale=" << std::to_string(weather.mie_scattering_scale)
|
||||
<< ", rayleigh_scattering_scale=" << std::to_string(weather.rayleigh_scattering_scale) << ')';
|
||||
<< ", rayleigh_scattering_scale=" << std::to_string(weather.rayleigh_scattering_scale)
|
||||
<< ", dust_storm=" << std::to_string(weather.dust_storm) << ')';
|
||||
return out;
|
||||
}
|
||||
|
||||
|
@ -37,7 +38,7 @@ void export_weather() {
|
|||
namespace cr = carla::rpc;
|
||||
|
||||
auto cls = class_<cr::WeatherParameters>("WeatherParameters")
|
||||
.def(init<float, float, float, float, float, float, float, float, float, float, float, float, float>(
|
||||
.def(init<float, float, float, float, float, float, float, float, float, float, float, float, float, float>(
|
||||
(arg("cloudiness")=0.0f,
|
||||
arg("precipitation")=0.0f,
|
||||
arg("precipitation_deposits")=0.0f,
|
||||
|
@ -50,7 +51,8 @@ void export_weather() {
|
|||
arg("wetness")=0.0f,
|
||||
arg("scattering_intensity")=0.0f,
|
||||
arg("mie_scattering_scale")=0.0f,
|
||||
arg("rayleigh_scattering_scale")=0.0331f)))
|
||||
arg("rayleigh_scattering_scale")=0.0331f,
|
||||
arg("dust_storm")=false)))
|
||||
.def_readwrite("cloudiness", &cr::WeatherParameters::cloudiness)
|
||||
.def_readwrite("precipitation", &cr::WeatherParameters::precipitation)
|
||||
.def_readwrite("precipitation_deposits", &cr::WeatherParameters::precipitation_deposits)
|
||||
|
@ -64,6 +66,7 @@ void export_weather() {
|
|||
.def_readwrite("scattering_intensity", &cr::WeatherParameters::scattering_intensity)
|
||||
.def_readwrite("mie_scattering_scale", &cr::WeatherParameters::mie_scattering_scale)
|
||||
.def_readwrite("rayleigh_scattering_scale", &cr::WeatherParameters::rayleigh_scattering_scale)
|
||||
.def_readwrite("dust_storm", &cr::WeatherParameters::dust_storm)
|
||||
.def("__eq__", &cr::WeatherParameters::operator==)
|
||||
.def("__ne__", &cr::WeatherParameters::operator!=)
|
||||
.def(self_ns::str(self_ns::self))
|
||||
|
@ -91,4 +94,5 @@ void export_weather() {
|
|||
cls.attr("SoftRainNight") = cr::WeatherParameters::SoftRainNight;
|
||||
cls.attr("MidRainyNight") = cr::WeatherParameters::MidRainyNight;
|
||||
cls.attr("HardRainNight") = cr::WeatherParameters::HardRainNight;
|
||||
cls.attr("DustStorm") = cr::WeatherParameters::DustStorm;
|
||||
}
|
||||
|
|
|
@ -51,4 +51,7 @@ struct CARLA_API FWeatherParameters
|
|||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(ClampMin = "0.0", ClampMax = "2.0", UIMin = "0.0", UIMax = "2.0"))
|
||||
float RayleighScatteringScale = 0.0331f;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
bool DustStorm = false;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue