90 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 };
91 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 };
92 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 };
93 double vehiclePoly_PassengerSedanRightGlass[] = { 0.36, -.43, 0.34, -.47, 0.77, -.47, 0.67, -.37, 0.45, -.37, 0.34, -.47, -10000 };
94 double vehiclePoly_PassengerSedanLeftGlass[] = { 0.36, .43, 0.34, .47, 0.77, .47, 0.67, .37, 0.45, .37, 0.34, .47, -10000 };
95 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 };
96 double vehiclePoly_PassengerHatchbackRightGlass[] = { 0.36, -.43, 0.34, -.47, 0.94, -.47, 0.80, -.37, 0.45, -.37, 0.34, -.47, -10000 };
97 double vehiclePoly_PassengerHatchbackLeftGlass[] = { 0.36, .43, 0.34, .47, 0.94, .47, 0.80, .37, 0.45, .37, 0.34, .47, -10000 };
98 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 };
99 double vehiclePoly_PassengerWagonRightGlass[] = { 0.36, -.43, 0.34, -.47, 0.94, -.47, 0.87, -.37, 0.45, -.37, 0.34, -.47, -10000 };
100 double vehiclePoly_PassengerWagonLeftGlass[] = { 0.36, .43, 0.34, .47, 0.94, .47, 0.87, .37, 0.45, .37, 0.34, .47, -10000 };
101 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 };
103 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 };
104 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 };
105 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 };
106 double vehiclePoly_PassengerVanRightGlass[] = { 0.36, -.43, 0.20, -.47, 0.98, -.47, 0.91, -.37, 0.31, -.37, 0.20, -.47, -10000 };
107 double vehiclePoly_PassengerVanLeftGlass[] = { 0.36, .43, 0.20, .47, 0.98, .47, 0.91, .37, 0.31, .37, 0.20, .47, -10000 };
108 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 };
110 double vehiclePoly_DeliveryMediumRightGlass[] = { 0.21, -.43, 0.20, -.47, 0.38, -.47, 0.38, -.37, 0.31, -.37, 0.20, -.47, -10000 };
111 double vehiclePoly_DeliveryMediumLeftGlass[] = { 0.21, .43, 0.20, .47, 0.38, .47, 0.38, .37, 0.31, .37, 0.20, .47, -10000 };
113 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 };
114 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 };
115 double vehiclePoly_TransportRightGlass[] = { 0.36, -.47, 0.10, -.48, 1.25, -.48, 1.25, -.4, 0.3, -.4, 0.10, -.48, -10000 };
116 double vehiclePoly_TransportLeftGlass[] = { 0.36, .47, 0.10, .48, 1.25, .48, 1.25, .4, 0.3, .4, 0.10, .48, -10000 };
118 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 };
119 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 };
121 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 };
123 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 };
124 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 };
125 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 };
127 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 };
141 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 };
151 GUIGlObject& o, std::map<GUISUMOAbstractView*, int>& additionalVisualizations)
152 :
GUIGLObjectPopupMenu(app, parent, o), myVehiclesAdditionalVisualizations(additionalVisualizations) {
269 if (i->first->getTrackedID() ==
getGlID()) {
270 i->first->stopTrack();
272 while (i->first->removeAdditionalGLVisualisation(
this));
308 new FXMenuSeparator(ret);
310 new FXMenuCommand(ret,
"Start Tracking",
nullptr, ret,
MID_START_TRACK);
312 new FXMenuCommand(ret,
"Stop Tracking",
nullptr, ret,
MID_STOP_TRACK);
314 new FXMenuCommand(ret,
"Select Foes",
nullptr, ret,
MID_SHOW_FOES);
316 new FXMenuSeparator(ret);
338 glBegin(GL_TRIANGLE_STRIP);
340 glVertex2d(-.5, .15);
357 glScaled(
getVType().getWidth(), length, 1.);
358 glBegin(GL_TRIANGLES);
370 glTranslated(0, 0, offset * .1);
371 glPolygonOffset(0, (GLfloat) - offset);
372 glBegin(GL_TRIANGLE_FAN);
374 while (poses[i] > -999) {
375 glVertex2d(poses[i], poses[i + 1]);
392 glRotated(90, 0, 0, 1);
393 glScaled(length, width, 1.);
395 bool drawCarriages =
false;
402 drawPoly(vehiclePoly_PassengerCarBodyFront, 4.5);
404 drawPoly(vehiclePoly_PassengerFrontGlass, 4.5);
407 glTranslated(0, 0, .045);
409 glTranslated(0, 0, -.045);
411 glTranslated(0, 0, .04);
414 glTranslated(0, 0, -.04);
424 glTranslated(0.4, 0, .5);
425 glScaled(0.1, 0.2, 1);
432 glTranslated(0.5, 0, .3);
433 glScaled(0.5, 0.05, 1);
438 glTranslated(0.25, 0, .3);
439 glScaled(0.02, 0.5, 1);
450 drawPoly(vehiclePoly_PassengerCarBodyFront, 4.5);
452 drawPoly(vehiclePoly_PassengerFrontGlass, 4.5);
455 drawPoly(vehiclePoly_PassengerVanBody, 4);
457 drawPoly(vehiclePoly_PassengerVanBodyFront, 4.5);
459 drawPoly(vehiclePoly_PassengerVanFrontGlass, 4.5);
460 drawPoly(vehiclePoly_PassengerVanRightGlass, 4.5);
461 drawPoly(vehiclePoly_PassengerVanLeftGlass, 4.5);
462 drawPoly(vehiclePoly_PassengerVanBackGlass, 4.5);
465 drawPoly(vehiclePoly_PassengerVanBody, 4);
467 drawPoly(vehiclePoly_PassengerVanBodyFront, 4.5);
469 drawPoly(vehiclePoly_PassengerVanFrontGlass, 4.5);
470 drawPoly(vehiclePoly_DeliveryMediumRightGlass, 4.5);
471 drawPoly(vehiclePoly_DeliveryMediumLeftGlass, 4.5);
476 glScaled(1. / (length), 1, 1.);
477 drawPoly(vehiclePoly_TransportBody, 4);
479 drawPoly(vehiclePoly_TransportFrontGlass, 4.5);
480 drawPoly(vehiclePoly_TransportRightGlass, 4.5);
481 drawPoly(vehiclePoly_TransportLeftGlass, 4.5);
487 glScaled(1. / (length), 1, 1.);
488 glTranslated(0, 0, .04);
489 glBegin(GL_TRIANGLE_FAN);
490 glVertex2d(ml / 2., 0);
493 glVertex2d(0 + .05, -.5);
494 glVertex2d(ml - .05, -.5);
495 glVertex2d(ml, -.45);
497 glVertex2d(ml - .05, .5);
498 glVertex2d(0 + .05, .5);
502 glTranslated(0, 0, -.04);
504 glTranslated(0, 0, .045);
507 glVertex2d(0 + .05, .48);
508 glVertex2d(0 + .05, -.48);
509 glVertex2d(0 + .15, -.48);
510 glVertex2d(0 + .15, .48);
512 glVertex2d(ml - .1, .45);
513 glVertex2d(ml - .1, -.45);
514 glVertex2d(ml - .05, -.45);
515 glVertex2d(ml - .05, .45);
517 glVertex2d(0 + .20, .49);
518 glVertex2d(0 + .20, .45);
519 glVertex2d(ml - .20, .45);
520 glVertex2d(ml - .20, .49);
522 glVertex2d(0 + .20, -.49);
523 glVertex2d(0 + .20, -.45);
524 glVertex2d(ml - .20, -.45);
525 glVertex2d(ml - .20, -.49);
528 glTranslated(0, 0, -.045);
536 drawCarriages =
true;
539 drawPoly(vehiclePoly_EVehicleBody, 4);
541 drawPoly(vehiclePoly_EVehicleFrontGlass, 4.5);
542 glTranslated(0, 0, .048);
547 glVertex2d(.35, -.5);
550 glVertex2d(.3, -.05);
551 glVertex2d(.7, -.05);
557 glVertex2d(.65, -.5);
560 glTranslated(0, 0, -.048);
587 glTranslated(0, 0, 0.1);
589 glTranslated(.4, 0, 0);
591 glTranslated(.4, 0, 0);
602 drawPoly(vehiclePoly_ShipSuperStructure, 6);
606 drawPoly(vehiclePoly_PassengerVanBody, 4);
608 drawPoly(vehiclePoly_PassengerVanBodyFront, 4.5);
610 drawPoly(vehiclePoly_PassengerVanFrontGlass, 4.5);
611 drawPoly(vehiclePoly_DeliveryMediumRightGlass, 4.5);
612 drawPoly(vehiclePoly_DeliveryMediumLeftGlass, 4.5);
614 glTranslated(0.7, 0, 0);
615 glColor3d(.18, .55, .34);
616 drawPoly(vehiclePoly_EmergencySign, 4.5);
619 drawPoly(vehiclePoly_Emergency2, 5);
622 drawPoly(vehiclePoly_PassengerVanBody, 4);
624 drawPoly(vehiclePoly_PassengerVanBodyFront, 4.5);
626 drawPoly(vehiclePoly_PassengerVanFrontGlass, 4.5);
627 drawPoly(vehiclePoly_DeliveryMediumRightGlass, 4.5);
628 drawPoly(vehiclePoly_DeliveryMediumLeftGlass, 4.5);
630 glTranslated(0.7, 0, 0);
632 drawPoly(vehiclePoly_EmergencySign, 4.5);
633 glColor3d(.5, .5, .5);
634 drawPoly(vehiclePoly_EmergencyLadder, 5);
635 drawPoly(vehiclePoly_EmergencyLadder2, 5);
636 drawPoly(vehiclePoly_EmergencyLadder3, 5);
637 drawPoly(vehiclePoly_EmergencyLadder4, 5);
638 drawPoly(vehiclePoly_EmergencyLadder5, 5);
639 drawPoly(vehiclePoly_EmergencyLadder6, 5);
640 drawPoly(vehiclePoly_EmergencyLadder7, 5);
645 drawPoly(vehiclePoly_PassengerCarBodyFront, 4.5);
647 drawPoly(vehiclePoly_PassengerFrontGlass, 4.5);
649 glTranslated(0.7, 0, 0);
650 glColor3d(.5, .5, .5);
651 drawPoly(vehiclePoly_EmergencySign, 4.5);
654 drawPoly(vehiclePoly_Emergency2, 5);
661 glTranslated(.5, .5, -0.1);
666 glTranslated(.5, -.5, -0.1);
673 drawPoly(vehiclePoly_PassengerCarBodyFront, 4.5);
675 drawPoly(vehiclePoly_PassengerFrontGlass, 4.5);
685 glBegin(GL_TRIANGLE_FAN);
686 glVertex2d(1 / 2., 0);
689 glVertex2d(0 + .05, -.05);
690 glVertex2d(1 - .05, -.05);
693 glVertex2d(1 - .05, .05);
694 glVertex2d(0 + .05, .05);
702 glBegin(GL_TRIANGLE_FAN);
703 glVertex2d(1 / 2., 0);
706 glVertex2d(0 + .05, -.2);
707 glVertex2d(1 - .05, -.2);
710 glVertex2d(1 - .05, .2);
711 glVertex2d(0 + .05, .2);
718 drawPoly(vehiclePoly_PassengerSedanRightGlass, 4.5);
719 drawPoly(vehiclePoly_PassengerSedanLeftGlass, 4.5);
720 drawPoly(vehiclePoly_PassengerSedanBackGlass, 4.5);
723 drawPoly(vehiclePoly_PassengerHatchbackRightGlass, 4.5);
724 drawPoly(vehiclePoly_PassengerHatchbackLeftGlass, 4.5);
725 drawPoly(vehiclePoly_PassengerHatchbackBackGlass, 4.5);
728 drawPoly(vehiclePoly_PassengerWagonRightGlass, 4.5);
729 drawPoly(vehiclePoly_PassengerWagonLeftGlass, 4.5);
730 drawPoly(vehiclePoly_PassengerWagonBackGlass, 4.5);
745 double l = length - 2.3;
753 glTranslated(0, 0, .1);
756 glTranslated(0, 0, .1);
779 drawPoly(vehiclePoly_PassengerSedanRightGlass, 4.5);
780 drawPoly(vehiclePoly_PassengerSedanLeftGlass, 4.5);
781 drawPoly(vehiclePoly_PassengerSedanBackGlass, 4.5);
854 return drawCarriages;
882 const double degAngle =
RAD2DEG(angle +
M_PI / 2.);
891 glRotated(degAngle, 0, 0, 1);
896 double upscaleLength = upscale;
897 if (upscale > 1 && length > 5) {
899 upscaleLength =
MAX2(1.0, upscaleLength * (5 + sqrt(length - 5)) / length);
901 glScaled(upscale, upscaleLength, 1);
913 bool drawCarriages =
false;
925 glTranslated(0, 0, .1);
944 glColor3d(0., 1., 0.);
947 glVertex2d(0., minGap);
948 glVertex2d(-.5, minGap);
949 glVertex2d(.5, minGap);
954 glColor3d(1., 0., 0.);
959 glTranslated(0, 0, .1);
976 if (!drawCarriages) {
1030 glTranslated(0,
MIN2(length / 2,
double(5)), -
getType());
1031 glScaled(1 / upscale, 1 / upscaleLength, 1);
1032 glRotated(-degAngle, 0, 0, 1);
1063 glTranslated(0, 0,
getType() - .1);
1073 for (
int i = noReroutePlus1 - 1; i >= 0; i--) {
1074 double darken = double(0.4) / double(noReroutePlus1) * double(i);
1091 glTranslated(pos.
x(), pos.
y(), -.1);
1095 glTranslated(-pos.
x(), -pos.
y(), .1);
1110 switch (activeScheme) {
1166 double hue = 180. + atan2(center.
x() - p.
x(), center.
y() - p.
y()) * 180. /
M_PI;
1175 double hue = 180. + atan2(center.
x() - p.
x(), center.
y() - p.
y()) * 180. /
M_PI;
1184 double hue = 180. + atan2(pb.
x() - pe.
x(), pb.
y() - pe.
y()) * 180. /
M_PI;
1187 double sat = pb.
distanceTo(pe) / minp.distanceTo(maxp);
1192 std::hash<const MSBaseVehicle*> ptr_hash;
1193 const double hue = (double)(ptr_hash(veh) % 360);
1194 const double sat = ((ptr_hash(veh) / 360) % 67) / 100.0 + 0.33;
1231 glGetDoublev(GL_CURRENT_COLOR, colors);
1232 colors[0] -= darken;
1233 if (colors[0] < 0) {
1236 colors[1] -= darken;
1237 if (colors[1] < 0) {
1240 colors[2] -= darken;
1241 if (colors[2] < 0) {
1244 colors[3] -= darken;
1245 if (colors[3] < 0) {
1255 if (route !=
nullptr) {
1272 int personIndex = 0;
1273 for (std::vector<MSTransportable*>::const_iterator i = ps.begin(); i != ps.end(); ++i) {
1275 assert(person != 0);
1282 int containerIndex = 0;
1283 for (std::vector<MSTransportable*>::const_iterator i = cs.begin(); i != cs.end(); ++i) {
1285 assert(container != 0);
1290 #ifdef DRAW_BOUNDING_BOX 1293 glTranslated(0, 0,
getType());
1295 boundingBox.push_back(boundingBox.front());
1297 glColor3d(0, .8, 0);
1299 glColor3d(0.5, .8, 0);
std::vector< MSVehicleDevice * > myDevices
The devices this vehicle has.
static void drawTexturedBox(int which, double size)
Draws a named texture as a box with the given size.
std::map< GUISUMOAbstractView *, int > myAdditionalVisualizations
Enabled visualisations, per view.
const std::vector< MSTransportable * > & getTransportables() const
Returns the list of transportables using this vehicle.
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
static const RGBColor BLUE
double ymin() const
Returns minimum y-coordinate.
double vehiclePoly_PassengerVanBody[]
SUMOVehicleShape getGuiShape() const
Get this vehicle type's shape.
double vehiclePoly_Emergency2[]
double xmax() const
Returns maximum x-coordinate.
RGBColor color
The vehicle's color, TraCI may change this.
double scale
information about a lane's width (temporary, used for a single view)
virtual void drawAction_drawVehicleBlueLight() const
RGBColor changedBrightness(int change, int toChange=3) const
Returns a new color with altered brightness.
double vehiclePoly_PassengerVanRightGlass[]
double vehiclePoly_EmergencyLadder4[]
MoveReminderCont myMoveReminders
Currently relevant move reminders.
const ConstMSEdgeVector & getEdges() const
bool showBlinker
Information whether vehicle blinkers shall be drawn.
double vehiclePoly_Rickshaw[]
void buildNameCopyPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds entries which allow to copy the name / typed name into the clipboard.
double vehiclePoly_PassengerWagonLeftGlass[]
GUIVisualizationTextSettings personName
double vehiclePoly_EVehicleFrontGlass[]
double vehiclePoly_PassengerSedanRightGlass[]
const MSVehicleType & getVType() const
A shortcut to myVehicle.myType.
MFXMutex myLock
The mutex used to avoid concurrent updates of the vehicle buffer.
static RGBColor fromHSV(double h, double s, double v)
Converts the given hsv-triplet to rgb.
static const RGBColor WHITE
double vehiclePoly_PassengerVanFrontGlass[]
void drawAction_drawVehicleAsBoxPlus() const
double vehiclePoly_TransportLeftGlass[]
bool showBTRange
Information whether the communication range shall be drawn.
Stores the information about how to visualize structures.
render as a transport vehicle
render as a flexible city bus
double y() const
Returns the y-position.
Hide all vehicle's routes.
const SUMOVehicleParameter & getParameter() const
Returns the vehicle's parameter (including departure definition)
void setColor(const GUIVisualizationSettings &s) const
sets the color according to the currente settings
bool drawLaneChangePreference
Information whether the lane change preference shall be drawn.
show vehicle's best lanes
static void drawTextSettings(const GUIVisualizationTextSettings &settings, const std::string &text, const Position &pos, const double scale, const double angle=0, const double layer=2048)
virtual void drawAction_drawPersonsAndContainers(const GUIVisualizationSettings &s) const
MSDevice_Vehroutes * myRoutes
GUIVisualizationTextSettings vehicleName
double x() const
Returns the x-position.
double vehiclePoly_EVehicleBody[]
std::string getImgFile() const
Get this vehicle type's raster model file name.
virtual MSLane * getLane() const =0
Returns the lane the vehicle is on.
virtual void drawAction_drawLinkItems(const GUIVisualizationSettings &) const
double vehiclePoly_PassengerFrontGlass[]
static double getRange()
Returns the configured range.
const RGBColor & getColor() const
Returns the color.
void buildCenterPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to center to the object.
static void drawText(const std::string &text, const Position &pos, const double layer, const double size, const RGBColor &col=RGBColor::BLACK, const double angle=0, int align=0, double width=-1)
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
render as a delivery vehicle
double vehiclePoly_Emergency[]
const MSRoute & getRoute() const
Returns the current route.
double vehiclePoly_PassengerHatchbackLeftGlass[]
double vehiclePoly_PassengerVanBackGlass[]
double vehiclePoly_EmergencyLadder3[]
render as a sedan passenger vehicle ("Stufenheck")
bool addAdditionalGLVisualisation(const GUIGlObject *const which)
Adds an object to call its additional visualisation method.
static void drawLinkItem(const Position &pos, SUMOTime arrivalTime, SUMOTime leaveTime, double exagerate)
double vehiclePoly_PassengerSedanBackGlass[]
void buildShowParamsPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to open the parameter window.
The base class for microscopic and mesoscopic vehicles.
virtual void drawRouteHelper(const GUIVisualizationSettings &s, const MSRoute &r) const =0
Draws the route.
double vehiclePoly_PassengerVanLeftGlass[]
virtual void stopTrack()
stop track
static void drawFilledCircle(double width, int steps=8)
Draws a filled circle around (0,0)
virtual void selectBlockingFoes() const =0
adds the blocking foes to the current selection
void buildPositionCopyEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to copy the cursor position if geo projection is used, also builds an entry for copying the geo-position.
void buildShowTypeParamsPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to open the type parameter window.
int getNumberReroutes() const
Returns the number of new routes this vehicle got.
A class that stores a 2D geometrical boundary.
bool removeAdditionalGLVisualisation(const GUIGlObject *const which)
Removes an object from the list of objects that show additional things.
Hide vehicle's best lanes.
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
Start to track a vehicle.
static MSDevice_Vehroutes * buildVehicleDevices(SUMOVehicle &v, std::vector< MSVehicleDevice *> &into, int maxRoutes=std::numeric_limits< int >::max())
Build devices for the given vehicle, if needed.
bool wasSet(int what) const
Returns whether the given parameter was set.
PositionVector mySeatPositions
positions of seats in the vehicle (updated at every drawing step)
GUIColorer vehicleColorer
The vehicle colorer.
double vehiclePoly_ShipDeck[]
double vehiclePoly_PassengerCarBody[]
virtual GUIGlID getTrackedID() const
get tracked id
virtual void startTrack(int)
star track
static const RGBColor GREEN
GUIVisualizationTextSettings vehicleValue
static const RGBColor GREY
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
bool drawAction_drawVehicleAsPoly(const GUIVisualizationSettings &s) const
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
render as a hatchback passenger vehicle ("Fliessheck")
Show vehicle's best lanes.
double vehiclePoly_PassengerWagonRightGlass[]
A point in 2D or 3D with translation and scaling methods.
double vehiclePoly_ShipSuperStructure[]
void drawOnPos(const GUIVisualizationSettings &s, const Position &pos, const double angle) const
Draws the object on the specified position with the specified angle.
double scaledSize(double scale, double constFactor=0.1) const
bool drawMinGap
Information whether the minimum gap shall be drawn.
static const RGBColor DEFAULT_COLOR
The default color (for vehicle types and vehicles)
double vehiclePoly_EmergencyLadder6[]
double vehiclePoly_EmergencyLadder[]
double vehiclePoly_Ship[]
static int getTextureID(const std::string &filename, const bool mirrorX=false)
return texture id for the given filename (initialize on first use)
MSDevice_Transportable * myPersonDevice
The passengers this vehicle may have.
virtual double getColorValue(int activeScheme) const =0
gets the color value according to the current scheme index
void drawAction_drawVehicleAsTrianglePlus() const
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
void setPositionInVehicle(const Position &pos)
render as a (city) rail without locomotive
double xmin() const
Returns minimum x-coordinate.
static void drawOutlineCircle(double width, double iwidth, int steps=8)
Draws an unfilled circle around (0,0)
void drawName(const Position &pos, const double scale, const GUIVisualizationTextSettings &settings, const double angle=0) const
draw name of item
A MSVehicle extended by some values for usage within the gui.
Boundary & grow(double by)
extends the boundary by the given amount
double getMinGap() const
Get the free space in front of vehicles of this class.
double vehiclePoly_PassengerHatchbackRightGlass[]
double angle
The current view rotation angle.
virtual Position getPosition(const double offset=0) const =0
Return current position (x/y, cartesian)
const T getColor(const double value) const
static void drawLine(const Position &beg, double rot, double visLength)
Draws a thin line.
render as a passenger vehicle
Show vehicle's current route.
double vehiclePoly_TransportBody[]
const int VEHPARS_COLOR_SET
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
std::string line
The vehicle's line (mainly for public transport)
const RGBColor & getColor() const
Returns this type's color.
void setPositionInVehicle(const Position &pos)
double vehiclePoly_PassengerSedanLeftGlass[]
void drawRoute(const GUIVisualizationSettings &s, int routeNo, double darken) const
Chooses the route to draw and draws it, darkening it as given.
void unlock()
release mutex lock
double vehiclePoly_PassengerHatchbackBackGlass[]
GUIBaseVehicle(MSBaseVehicle &vehicle)
double getWidth() const
Get the width which vehicles of this class shall have when being drawn.
double vehiclePoly_PassengerCarBodyFront[]
static const RGBColor RED
named colors
~GUIBaseVehicle()
destructor
Show all vehicle's routes.
void removeActiveAddVisualisation(GUISUMOAbstractView *const parent, int which)
Adds the named visualisation feature to the given view.
SUMOVehicleShape
Definition of vehicle classes to differ between different appearences.
const MSVehicleType & getVehicleType() const
Returns the vehicle's type definition.
render as a arbitrary ship
A MSNet extended by some values for usage within the gui.
virtual bool isOnRoad() const
Returns the information whether the vehicle is on a road (is simulated)
const Position & getSeatPosition(int personIndex) const
returns the seat position for the person with the given index
double vehiclePoly_EmergencyLadder5[]
double vehiclePoly_EVehicleBackGlass[]
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
double vehiclePoly_EmergencySign[]
MSVehicleDevice * getDevice(const std::type_info &type) const
Returns a device of the given type if it exists or 0.
virtual bool drawAction_drawCarriageClass(const GUIVisualizationSettings &s, SUMOVehicleShape guiShape, bool asImage) const =0
draws the given guiShape if it has distinc carriages/modules and eturns true if so ...
show all vehicle's routes
virtual double getAngle() const =0
Returns the vehicle's direction in radians.
void buildSelectionPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to (de)select the object.
virtual Position getPosition(const double offset=0) const =0
Return current position (x/y, cartesian)
double getLength() const
Get vehicle's length [m].
double vehiclePoly_TransportFrontGlass[]
double vehiclePoly_PassengerWagonBackGlass[]
bool wasSet(int what) const
Returns whether the given parameter was set.
render as an emergency vehicle
GUIGlID getGlID() const
Returns the numerical id of the object.
Position getCenter() const
Returns the center of the boundary.
render as a (futuristic) e-vehicle
double vehiclePoly_DeliveryMediumRightGlass[]
double distanceTo(const Position &p2) const
returns the euclidean distance in 3 dimension
GUIVisualizationSizeSettings vehicleSize
MSDevice_Transportable * myContainerDevice
The containers this vehicle may have.
virtual void drawBestLanes() const
Draws the vehicle's best lanes.
const MSRoute * getRoute(int index) const
Called on route retrieval.
static void drawPoly(double *poses, double offset)
int vehicleQuality
The quality of vehicle drawing.
static void drawBoxLine(const Position &beg, double rot, double visLength, double width, double offset=0)
Draws a thick line.
double vehiclePoly_TransportRightGlass[]
MSBaseVehicle & myVehicle
The vehicle to which all calls should be delegated.
void add(double x, double y, double z=0)
Makes the boundary include the given coordinate.
FXDEFMAP(GUIBaseVehicle::GUIBaseVehiclePopupMenu) GUIBaseVehiclePopupMenuMap[]
double ymax() const
Returns maximum y-coordinate.
double getExaggeration(const GUIVisualizationSettings &s, const GUIGlObject *o, double factor=20) const
return the drawing size including exaggeration and constantSize values
render as a transport vehicle with one trailer
render as a wagon passenger vehicle ("Combi")
static bool setFunctionalColor(int activeScheme, const MSBaseVehicle *veh)
sets the color according to the current scheme index and some vehicle function
double vehiclePoly_Cyclist[]
void addActiveAddVisualisation(GUISUMOAbstractView *const parent, int which)
Adds the named visualisation feature to the given view.
virtual void drawAction_drawVehicleBrakeLight(double length, bool onlyOne=false) const
double vehiclePoly_EmergencyLadder7[]
show vehicle's current route
const int VTYPEPARS_COLOR_SET
bool drawAction_drawVehicleAsImage(const GUIVisualizationSettings &s, double length=-1) const
render as a semi-trailer transport vehicle ("Sattelschlepper")
virtual void drawGLAdditional(GUISUMOAbstractView *const parent, const GUIVisualizationSettings &s) const
Draws additionally triggered visualisations.
double vehiclePoly_PassengerVanBodyFront[]
double vehiclePoly_DeliveryMediumLeftGlass[]
Hide vehicle's current route.
void buildPopupHeader(GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true)
Builds the header.
bool hasActiveAddVisualisation(GUISUMOAbstractView *const parent, int which) const
Returns whether the named feature is enabled in the given view.
double vehiclePoly_EmergencyLadder2[]
virtual void drawAction_drawVehicleBlinker(double) const
static RGBColor getColor()
gets the gl-color