Skip to content

Commit

Permalink
fix #14342
Browse files Browse the repository at this point in the history
  • Loading branch information
namdre committed Feb 27, 2024
1 parent fbe07f9 commit eb42d44
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/guisim/GUILane.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@

#include <osgview/GUIOSGHeader.h>

#define RENDERING_BUFFER 10

//#define GUILane_DEBUG_DRAW_FOE_INTERSECTIONS

// ===========================================================================
Expand Down Expand Up @@ -763,6 +765,13 @@ GUILane::drawGL(const GUIVisualizationSettings& s) const {
static_cast<const GUIVehicle*>(*v)->drawGL(s);
} // else: this is the shadow during a continuous lane change
}
// draw long partial vehicles (#14342)
for (const MSVehicle* veh : myPartialVehicles) {
if (veh->getLength() > RENDERING_BUFFER) {
// potential double rendering taken into account
static_cast<const GUIVehicle*>(veh)->drawGL(s);
}
}
// draw parking vehicles
for (const MSBaseVehicle* const v : myParkingVehicles) {
dynamic_cast<const GUIBaseVehicle*>(v)->drawGL(s);
Expand Down Expand Up @@ -1050,7 +1059,7 @@ GUILane::getCenteringBoundary() const {
Boundary b;
b.add(myShape[0]);
b.add(myShape[-1]);
b.grow(10);
b.grow(RENDERING_BUFFER);
// ensure that vehicles and persons on the side are drawn even if the edge
// is outside the view
return b;
Expand Down

0 comments on commit eb42d44

Please sign in to comment.