37 double vehiclePoly_PassengerCarBody[] = { .5, 0, 0, 0, 0, .3, 0.08, .44, 0.25, .5, 0.95, .5, 1., .4, 1., -.4, 0.95, -.5, 0.25, -.5, 0.08, -.44, 0, -.3, 0, 0, -10000 };
38 double vehiclePoly_PassengerCarBodyFront[] = { 0.1, 0, 0.025, 0, 0.025, 0.25, 0.27, 0.4, 0.27, -.4, 0.025, -0.25, 0.025, 0, -10000 };
39 double vehiclePoly_PassengerFrontGlass[] = { 0.35, 0, 0.3, 0, 0.3, 0.4, 0.43, 0.3, 0.43, -0.3, 0.3, -0.4, 0.3, 0, -10000 };
40 double vehiclePoly_PassengerSedanRightGlass[] = { 0.36, -.43, 0.34, -.47, 0.77, -.47, 0.67, -.37, 0.45, -.37, 0.34, -.47, -10000 };
41 double vehiclePoly_PassengerSedanLeftGlass[] = { 0.36, .43, 0.34, .47, 0.77, .47, 0.67, .37, 0.45, .37, 0.34, .47, -10000 };
42 double vehiclePoly_PassengerSedanBackGlass[] = { 0.80, 0, 0.70, 0, 0.70, 0.3, 0.83, 0.4, 0.83, -.4, 0.70, -.3, 0.70, 0, -10000 };
43 double vehiclePoly_PassengerHatchbackRightGlass[] = { 0.36, -.43, 0.34, -.47, 0.94, -.47, 0.80, -.37, 0.45, -.37, 0.34, -.47, -10000 };
44 double vehiclePoly_PassengerHatchbackLeftGlass[] = { 0.36, .43, 0.34, .47, 0.94, .47, 0.80, .37, 0.45, .37, 0.34, .47, -10000 };
45 double vehiclePoly_PassengerHatchbackBackGlass[] = { 0.92, 0, 0.80, 0, 0.80, 0.3, 0.95, 0.4, 0.95, -.4, 0.80, -.3, 0.80, 0, -10000 };
46 double vehiclePoly_PassengerWagonRightGlass[] = { 0.36, -.43, 0.34, -.47, 0.94, -.47, 0.87, -.37, 0.45, -.37, 0.34, -.47, -10000 };
47 double vehiclePoly_PassengerWagonLeftGlass[] = { 0.36, .43, 0.34, .47, 0.94, .47, 0.87, .37, 0.45, .37, 0.34, .47, -10000 };
48 double vehiclePoly_PassengerWagonBackGlass[] = { 0.92, 0, 0.90, 0, 0.90, 0.3, 0.95, 0.4, 0.95, -.4, 0.90, -.3, 0.90, 0, -10000 };
50 double vehiclePoly_PassengerVanBody[] = { .5, 0, 0, 0, 0, .4, 0.1, .5, 0.97, .5, 1., .47, 1., -.47, 0.97, -.5, 0.1, -.5, 0, -.4, 0, 0, -10000 };
51 double vehiclePoly_PassengerVanBodyFront[] = { 0.1, 0, 0.025, 0, 0.025, 0.25, 0.13, 0.4, 0.13, -.4, 0.025, -0.25, 0.025, 0, -10000 };
52 double vehiclePoly_PassengerVanFrontGlass[] = { 0.21, 0, 0.16, 0, 0.16, 0.4, 0.29, 0.3, 0.29, -0.3, 0.16, -0.4, 0.16, 0, -10000 };
53 double vehiclePoly_PassengerVanRightGlass[] = { 0.36, -.43, 0.20, -.47, 0.98, -.47, 0.91, -.37, 0.31, -.37, 0.20, -.47, -10000 };
54 double vehiclePoly_PassengerVanLeftGlass[] = { 0.36, .43, 0.20, .47, 0.98, .47, 0.91, .37, 0.31, .37, 0.20, .47, -10000 };
55 double vehiclePoly_PassengerVanBackGlass[] = { 0.95, 0, 0.94, 0, 0.94, 0.3, 0.98, 0.4, 0.98, -.4, 0.94, -.3, 0.94, 0, -10000 };
57 double vehiclePoly_DeliveryMediumRightGlass[] = { 0.21, -.43, 0.20, -.47, 0.38, -.47, 0.38, -.37, 0.31, -.37, 0.20, -.47, -10000 };
58 double vehiclePoly_DeliveryMediumLeftGlass[] = { 0.21, .43, 0.20, .47, 0.38, .47, 0.38, .37, 0.31, .37, 0.20, .47, -10000 };
60 double vehiclePoly_TransportBody[] = { .5, 0, 0, 0, 0, .45, 0.05, .5, 2.25, .5, 2.25, -.5, 0.05, -.5, 0, -.45, 0, 0, -10000 };
61 double vehiclePoly_TransportFrontGlass[] = { 0.1, 0, 0.05, 0, 0.05, 0.45, 0.25, 0.4, 0.25, -.4, 0.05, -0.45, 0.05, 0, -10000 };
62 double vehiclePoly_TransportRightGlass[] = { 0.36, -.47, 0.10, -.48, 1.25, -.48, 1.25, -.4, 0.3, -.4, 0.10, -.48, -10000 };
63 double vehiclePoly_TransportLeftGlass[] = { 0.36, .47, 0.10, .48, 1.25, .48, 1.25, .4, 0.3, .4, 0.10, .48, -10000 };
65 double vehiclePoly_EVehicleBody[] = { .5, 0, 0, 0, 0, .3, 0.08, .44, 0.25, .5, 0.75, .5, .92, .44, 1, .3, 1, -.3, .92, -.44, .75, -.5, .25, -.5, 0.08, -.44, 0, -.3, 0, 0, -1000 };
66 double vehiclePoly_EVehicleFrontGlass[] = { .5, 0, 0.05, .05, 0.05, .25, 0.13, .39, 0.3, .45, 0.70, .45, .87, .39, .95, .25, .95, -.25, .87, -.39, .70, -.45, .3, -.45, 0.13, -.39, 0.05, -.25, 0.05, 0.05, -1000 };
68 double vehiclePoly_EVehicleBackGlass[] = { 0.65, 0, 0.9, 0, 0.9, 0.4, 0.57, 0.3, 0.57, -0.3, 0.9, -0.4, 0.9, 0, -10000 };
70 double vehiclePoly_Ship[] = { 0.25, 0, 0, 0, 0.1, 0.25, 0.2, 0.45, 0.25, 0.5, 0.95, 0.5, 1.0, 0.45, 1.0, -0.45, 0.95, -0.5, 0.25, -0.5, 0.2, -0.45, 0.1, -0.25, 0, 0, -10000 };
71 double vehiclePoly_ShipDeck[] = { 0.5, 0, 0.25, 0.4, 0.95, 0.4, 0.95, -0.4, 0.25, -0.4, 0.25, 0.4, -10000 };
72 double vehiclePoly_ShipSuperStructure[] = { 0.8, 0, 0.5, 0.3, 0.85, 0.3, 0.85, -0.3, 0.5, -0.3, 0.5, 0.3, -10000 };
74 double vehiclePoly_Cyclist[] = { 0.5, 0, 0.25, 0.45, 0.25, 0.5, 0.8, 0.15, 0.8, -0.15, 0.25, -0.5, 0.25, -0.45, -10000 };
88 double vehiclePoly_Rickshaw[] = { 0.5, 0, 0.25, 0.45, 0.25, 0.5, 0.8, 0.15, 0.8, -0.15, 0.25, -0.5, 0.25, -0.45, -10000 };
97 glTranslated(0, 0, offset * .1);
98 glPolygonOffset(0, (GLfloat) - offset);
99 glBegin(GL_TRIANGLE_FAN);
101 while (poses[i] > -999) {
102 glVertex2d(poses[i], poses[i + 1]);
112 glScaled(width, length, 1.);
113 glBegin(GL_TRIANGLE_STRIP);
115 glVertex2d(-.5, .15);
131 glScaled(width, length, 1.);
132 glBegin(GL_TRIANGLES);
149 glRotated(90, 0, 0, 1);
150 glScaled(length, width, 1.);
162 glTranslated(0, 0, .045);
164 glTranslated(0, 0, -.045);
166 glTranslated(0, 0, .04);
169 glTranslated(0, 0, -.04);
179 glTranslated(0.4, 0, .5);
180 glScaled(0.1, 0.2, 1);
187 glTranslated(0.5, 0, .3);
188 glScaled(0.5, 0.05, 1);
193 glTranslated(0.25, 0, .3);
194 glScaled(0.02, 0.5, 1);
231 if (carriageIndex < 1) {
232 glScaled(1. / (length), 1, 1.);
244 glScaled(1. / (length), 1, 1.);
245 glTranslated(0, 0, .04);
246 glBegin(GL_TRIANGLE_FAN);
247 glVertex2d(ml / 2., 0);
250 glVertex2d(0 + .05, -.5);
251 glVertex2d(ml - .05, -.5);
252 glVertex2d(ml, -.45);
254 glVertex2d(ml - .05, .5);
255 glVertex2d(0 + .05, .5);
259 glTranslated(0, 0, -.04);
261 glTranslated(0, 0, .045);
264 glVertex2d(0 + .05, .48);
265 glVertex2d(0 + .05, -.48);
266 glVertex2d(0 + .15, -.48);
267 glVertex2d(0 + .15, .48);
269 glVertex2d(ml - .1, .45);
270 glVertex2d(ml - .1, -.45);
271 glVertex2d(ml - .05, -.45);
272 glVertex2d(ml - .05, .45);
274 glVertex2d(0 + .20, .49);
275 glVertex2d(0 + .20, .45);
276 glVertex2d(ml - .20, .45);
277 glVertex2d(ml - .20, .49);
279 glVertex2d(0 + .20, -.49);
280 glVertex2d(0 + .20, -.45);
281 glVertex2d(ml - .20, -.45);
282 glVertex2d(ml - .20, -.49);
285 glTranslated(0, 0, -.045);
296 glTranslated(0, 0, .048);
301 glVertex2d(.35, -.5);
304 glVertex2d(.3, -.05);
305 glVertex2d(.7, -.05);
311 glVertex2d(.65, -.5);
314 glTranslated(0, 0, -.048);
341 glTranslated(0, 0, 0.1);
343 glTranslated(.4, 0, 0);
345 glTranslated(.4, 0, 0);
368 glTranslated(0.7, 0, 0);
369 glColor3d(.18, .55, .34);
384 glTranslated(0.7, 0, 0);
387 glColor3d(.5, .5, .5);
403 glTranslated(0.7, 0, 0);
404 glColor3d(.5, .5, .5);
415 glTranslated(.5, .5, -0.1);
420 glTranslated(.5, -.5, -0.1);
439 glBegin(GL_TRIANGLE_FAN);
440 glVertex2d(1 / 2., 0);
443 glVertex2d(0 + .05, -.05);
444 glVertex2d(1 - .05, -.05);
447 glVertex2d(1 - .05, .05);
448 glVertex2d(0 + .05, .05);
456 glBegin(GL_TRIANGLE_FAN);
457 glVertex2d(1 / 2., 0);
460 glVertex2d(0 + .05, -.2);
461 glVertex2d(1 - .05, -.2);
464 glVertex2d(1 - .05, .2);
465 glVertex2d(0 + .05, .2);
494 if (carriageIndex < 0) {
501 double l = length - 2.3;
502 if (carriageIndex != 0) {
513 glTranslated(0, 0, .1);
516 glTranslated(0, 0, .1);
623 const double halfWidth = width / 2.0 * exaggeration;
double vehiclePoly_EVehicleBackGlass[]
double vehiclePoly_PassengerVanBackGlass[]
double vehiclePoly_Emergency[]
double vehiclePoly_PassengerVanBodyFront[]
double vehiclePoly_EmergencyLadder[]
double vehiclePoly_PassengerCarBody[]
double vehiclePoly_PassengerWagonLeftGlass[]
double vehiclePoly_EmergencyLadder2[]
double vehiclePoly_EVehicleBody[]
double vehiclePoly_ShipSuperStructure[]
double vehiclePoly_ShipDeck[]
double vehiclePoly_DeliveryMediumRightGlass[]
double vehiclePoly_PassengerSedanBackGlass[]
double vehiclePoly_EmergencyLadder5[]
double vehiclePoly_PassengerWagonRightGlass[]
double vehiclePoly_Emergency2[]
double vehiclePoly_EmergencyLadder4[]
double vehiclePoly_DeliveryMediumLeftGlass[]
double vehiclePoly_PassengerCarBodyFront[]
double vehiclePoly_EmergencyLadder3[]
double vehiclePoly_PassengerHatchbackBackGlass[]
double vehiclePoly_PassengerVanLeftGlass[]
double vehiclePoly_EmergencyLadder6[]
double vehiclePoly_TransportFrontGlass[]
double vehiclePoly_EmergencySign[]
double vehiclePoly_TransportBody[]
double vehiclePoly_EmergencyLadder7[]
double vehiclePoly_Cyclist[]
double vehiclePoly_TransportRightGlass[]
double vehiclePoly_PassengerSedanRightGlass[]
double vehiclePoly_PassengerVanFrontGlass[]
double vehiclePoly_TransportLeftGlass[]
double vehiclePoly_PassengerSedanLeftGlass[]
double vehiclePoly_EVehicleFrontGlass[]
double vehiclePoly_PassengerVanBody[]
double vehiclePoly_Rickshaw[]
double vehiclePoly_PassengerWagonBackGlass[]
double vehiclePoly_PassengerHatchbackRightGlass[]
double vehiclePoly_PassengerVanRightGlass[]
double vehiclePoly_PassengerFrontGlass[]
double vehiclePoly_Ship[]
double vehiclePoly_PassengerHatchbackLeftGlass[]
SUMOVehicleShape
Definition of vehicle classes to differ between different appearences.
@ SVS_BICYCLE
render as a bicycle
@ SVS_FIREBRIGADE
render as a fire brigade
@ SVS_ANT
render as a giant ant
@ SVS_PASSENGER_HATCHBACK
render as a hatchback passenger vehicle ("Fliessheck")
@ SVS_TRUCK_SEMITRAILER
render as a semi-trailer transport vehicle ("Sattelschlepper")
@ SVS_RAIL
render as a rail
@ SVS_EMERGENCY
render as an emergency vehicle
@ SVS_DELIVERY
automated car (with cruise controllers)
@ SVS_MOTORCYCLE
render as a motorcycle
@ SVS_PASSENGER
render as a passenger vehicle
@ SVS_TRUCK
render as a transport vehicle
@ SVS_PASSENGER_SEDAN
render as a sedan passenger vehicle ("Stufenheck")
@ SVS_MOPED
render as a moped
@ SVS_E_VEHICLE
render as a (futuristic) e-vehicle
@ SVS_BUS_FLEXIBLE
render as a flexible city bus
@ SVS_BUS_TROLLEY
render as a trolley bus
@ SVS_RAIL_CARGO
render as a cargo train
@ SVS_BUS_COACH
render as a coach
@ SVS_SHIP
render as a arbitrary ship
@ SVS_RAIL_CAR
render as a (city) rail without locomotive
@ SVS_PASSENGER_WAGON
render as a wagon passenger vehicle ("Combi")
@ SVS_PASSENGER_VAN
render as a van
@ SVS_PEDESTRIAN
render as a pedestrian
@ SVS_POLICE
render as a police car
@ SVS_RICKSHAW
render as a rickshaw
@ SVS_TRUCK_1TRAILER
render as a transport vehicle with one trailer
#define UNUSED_PARAMETER(x)
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
static void drawFilledCircle(double width, int steps=8)
Draws a filled circle around (0,0)
static RGBColor getColor()
gets the gl-color
static void drawBoxLine(const Position &beg, double rot, double visLength, double width, double offset=0)
Draws a thick line.
static void drawAction_drawVehicleAsPoly(const GUIVisualizationSettings &s, const SUMOVehicleShape shape, const double width, const double length, int carriageIndex=-1)
draw vehicle as a polygon
static void drawAction_drawVehicleAsTrianglePlus(const double width, const double length)
draw vehicle as a triangle
static bool drawAction_drawVehicleAsImage(const GUIVisualizationSettings &s, const std::string &file, const GUIGlObject *o, const double width, double length)
try to draw vehicle as raster image and return true if sucessful
static void drawPoly(const double *poses, const double offset)
draw poly
static void drawAction_drawVehicleAsBoxPlus(const double width, const double length)
draw vehicle as a Box
static void drawTexturedBox(int which, double size)
Draws a named texture as a box with the given size.
static int getTextureID(const std::string &filename, const bool mirrorX=false)
return texture id for the given filename (initialize on first use)
Stores the information about how to visualize structures.
GUIVisualizationSizeSettings vehicleSize
A point in 2D or 3D with translation and scaling methods.
static const RGBColor GREY
RGBColor changedBrightness(int change, int toChange=3) const
Returns a new color with altered brightness.
double getExaggeration(const GUIVisualizationSettings &s, const GUIGlObject *o, double factor=20) const
return the drawing size including exaggeration and constantSize values