Added weather parameter fog_fallow to PythonAPI

This commit is contained in:
Marc Garcia Puig 2020-06-03 17:55:05 +02:00
parent 7484c60949
commit 07fe7a7153
3 changed files with 9 additions and 0 deletions

View File

@ -69,6 +69,7 @@ namespace rpc {
float sun_altitude_angle = 0.0f;
float fog_density = 0.0f;
float fog_distance = 0.0f;
float fog_falloff = 0.0f;
float wetness = 0.0f;
#ifdef LIBCARLA_INCLUDED_FROM_UE4
@ -82,6 +83,7 @@ namespace rpc {
sun_altitude_angle(Weather.SunAltitudeAngle),
fog_density(Weather.FogDensity),
fog_distance(Weather.FogDistance),
fog_falloff(Weather.FogFalloff),
wetness(Weather.Wetness) {}
operator FWeatherParameters() const {
@ -94,6 +96,7 @@ namespace rpc {
Weather.SunAltitudeAngle = sun_altitude_angle;
Weather.FogDensity = fog_density;
Weather.FogDistance = fog_distance;
Weather.FogFalloff = fog_falloff;
Weather.Wetness = wetness;
return Weather;
}
@ -110,6 +113,7 @@ namespace rpc {
sun_altitude_angle != rhs.sun_altitude_angle ||
fog_density != rhs.fog_density ||
fog_distance != rhs.fog_distance ||
fog_falloff != rhs.fog_falloff ||
wetness != rhs.wetness;
}
@ -126,6 +130,7 @@ namespace rpc {
sun_altitude_angle,
fog_density,
fog_distance,
fog_falloff,
wetness);
};

View File

@ -38,6 +38,7 @@ void export_weather() {
arg("sun_altitude_angle")=0.0f,
arg("fog_density")=0.0f,
arg("fog_distance")=0.0f,
arg("fog_falloff")=0.2f,
arg("wetness")=0.0f)))
.def_readwrite("cloudiness", &cr::WeatherParameters::cloudiness)
.def_readwrite("precipitation", &cr::WeatherParameters::precipitation)

View File

@ -37,6 +37,9 @@ struct CARLA_API FWeatherParameters
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(ClampMin = "0.0", UIMin = "0.0", UIMax = "1000.0"))
float FogDistance = 0.0f;
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(ClampMin = "0.0", UIMin = "0.0", UIMax = "10.0"))
float FogFalloff = 0.2f;
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(ClampMin = "0.0", ClampMax = "100.0", UIMin = "0.0", UIMax = "100.0"))
float Wetness = 0.0f;
};