From 69eedb92ad744a921e62ab54d48e6942733c03b3 Mon Sep 17 00:00:00 2001 From: namdre Date: Thu, 22 Mar 2018 18:29:19 +0100 Subject: [PATCH] better scaling for long vehicles. refs #3907 --- src/guisim/GUIBaseVehicle.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/guisim/GUIBaseVehicle.cpp b/src/guisim/GUIBaseVehicle.cpp index a34c881415d0..57c8fb90cd03 100644 --- a/src/guisim/GUIBaseVehicle.cpp +++ b/src/guisim/GUIBaseVehicle.cpp @@ -898,6 +898,10 @@ GUIBaseVehicle::drawOnPos(const GUIVisualizationSettings& s, const Position& pos // scale const double upscale = s.vehicleSize.getExaggeration(s); double upscaleLength = upscale; + if (upscale > 1 && length > 5) { + // reduce the length/width ratio because this is not usefull at high zoom + upscaleLength *= (5 + sqrt(length - 5)) / length; + } glScaled(upscale, upscaleLength, 1); /* MSLCM_DK2004 &m2 = static_cast(veh->getLaneChangeModel());