Skip to content

Commit

Permalink
better scaling for long vehicles. refs #3907
Browse files Browse the repository at this point in the history
  • Loading branch information
namdre committed Mar 22, 2018
1 parent 1f2d467 commit 69eedb9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/guisim/GUIBaseVehicle.cpp
Expand Up @@ -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<MSLCM_DK2004&>(veh->getLaneChangeModel());
Expand Down

0 comments on commit 69eedb9

Please sign in to comment.