SUMO - Simulation of Urban MObility
|
#include <config.h>
#include <GL/gl.h>
#include <cmath>
#include <vector>
#include <string>
#include <foreign/polyfonts/polyfonts.h>
#include <utils/common/StringUtils.h>
#include <utils/common/SUMOVehicleParameter.h>
#include <utils/gui/windows/GUISUMOAbstractView.h>
#include <utils/gui/windows/GUIAppEnum.h>
#include <utils/gui/div/GUIParameterTableWindow.h>
#include <utils/gui/div/GUIGlobalSelection.h>
#include <utils/gui/div/GLHelper.h>
#include <utils/gui/div/GLObjectValuePassConnector.h>
#include <microsim/MSVehicle.h>
#include <microsim/logging/CastingFunctionBinding.h>
#include <microsim/logging/FunctionBinding.h>
#include <microsim/MSVehicleControl.h>
#include <microsim/MSAbstractLaneChangeModel.h>
#include <microsim/devices/MSDevice_Vehroutes.h>
#include <gui/GUIApplicationWindow.h>
#include <gui/GUIGlobals.h>
#include "GUIVehicle.h"
#include "GUINet.h"
#include "GUIEdge.h"
Go to the source code of this file.
Defines | |
#define | BLINKER_POS_BACK .5 |
#define | BLINKER_POS_FRONT .5 |
Functions | |
void | drawAction_drawBlinker (const GUIVehicle &veh, double dir) |
void | drawAction_drawVehicleAsBoxPlus (const GUIVehicle &veh) |
void | drawAction_drawVehicleAsPoly (const GUIVehicle &veh) |
void | drawAction_drawVehicleAsTrianglePlus (const GUIVehicle &veh) |
void | drawAction_drawVehicleBlinker (const GUIVehicle &veh) |
void | drawAction_drawVehicleBrakeLight (const GUIVehicle &veh) |
void | drawPoly (double *poses, SUMOReal offset) |
FXDEFMAP (GUIVehicle::GUIVehiclePopupMenu) GUIVehiclePopupMenuMap[] | |
Variables | |
double | vehiclePoly_DeliveryMediumLeftGlass [] = { 0.21, .43, 0.20, .47, 0.38, .47, 0.38, .37, 0.31, .37, 0.20, .47, -10000 } |
double | vehiclePoly_DeliveryMediumRightGlass [] = { 0.21, -.43, 0.20, -.47, 0.38, -.47, 0.38, -.37, 0.31, -.37, 0.20, -.47, -10000 } |
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 } |
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 } |
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 } |
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 } |
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 } |
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 } |
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 } |
double | vehiclePoly_PassengerHatchbackLeftGlass [] = { 0.36, .43, 0.34, .47, 0.94, .47, 0.80, .37, 0.45, .37, 0.34, .47, -10000 } |
double | vehiclePoly_PassengerHatchbackRightGlass [] = { 0.36, -.43, 0.34, -.47, 0.94, -.47, 0.80, -.37, 0.45, -.37, 0.34, -.47, -10000 } |
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 } |
double | vehiclePoly_PassengerSedanLeftGlass [] = { 0.36, .43, 0.34, .47, 0.77, .47, 0.67, .37, 0.45, .37, 0.34, .47, -10000 } |
double | vehiclePoly_PassengerSedanRightGlass [] = { 0.36, -.43, 0.34, -.47, 0.77, -.47, 0.67, -.37, 0.45, -.37, 0.34, -.47, -10000 } |
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 } |
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 } |
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 } |
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 } |
double | vehiclePoly_PassengerVanLeftGlass [] = { 0.36, .43, 0.20, .47, 0.98, .47, 0.91, .37, 0.31, .37, 0.20, .47, -10000 } |
double | vehiclePoly_PassengerVanRightGlass [] = { 0.36, -.43, 0.20, -.47, 0.98, -.47, 0.91, -.37, 0.31, -.37, 0.20, -.47, -10000 } |
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 } |
double | vehiclePoly_PassengerWagonLeftGlass [] = { 0.36, .43, 0.34, .47, 0.94, .47, 0.87, .37, 0.45, .37, 0.34, .47, -10000 } |
double | vehiclePoly_PassengerWagonRightGlass [] = { 0.36, -.43, 0.34, -.47, 0.94, -.47, 0.87, -.37, 0.45, -.37, 0.34, -.47, -10000 } |
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 } |
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 } |
double | vehiclePoly_TransportLeftGlass [] = { 0.36, .47, 0.10, .48, 1.25, .48, 1.25, .4, 0.3, .4, 0.10, .48, -10000 } |
double | vehiclePoly_TransportRightGlass [] = { 0.36, -.47, 0.10, -.48, 1.25, -.48, 1.25, -.4, 0.3, -.4, 0.10, -.48, -10000 } |
Definition in file GUIVehicle.cpp.
#define BLINKER_POS_BACK .5 |
Definition at line 807 of file GUIVehicle.cpp.
Referenced by drawAction_drawBlinker().
#define BLINKER_POS_FRONT .5 |
Definition at line 806 of file GUIVehicle.cpp.
Referenced by drawAction_drawBlinker().
void drawAction_drawBlinker | ( | const GUIVehicle & | veh, |
double | dir | ||
) | [inline] |
Definition at line 810 of file GUIVehicle.cpp.
References BLINKER_POS_BACK, BLINKER_POS_FRONT, GLHelper::drawFilledCircle(), MSVehicleType::getLength(), and MSBaseVehicle::getVehicleType().
Referenced by drawAction_drawVehicleBlinker().
void drawAction_drawVehicleAsBoxPlus | ( | const GUIVehicle & | veh | ) | [inline] |
Definition at line 356 of file GUIVehicle.cpp.
References MSVehicleType::getLength(), MSBaseVehicle::getVehicleType(), and MSVehicleType::getWidth().
Referenced by drawAction_drawVehicleAsTrianglePlus(), and GUIVehicle::drawGL().
void drawAction_drawVehicleAsPoly | ( | const GUIVehicle & | veh | ) | [inline] |
Definition at line 405 of file GUIVehicle.cpp.
References RGBColor::changedBrightness(), GLHelper::drawBoxLine(), GLHelper::drawFilledCircle(), drawPoly(), GLHelper::getColor(), MSVehicleType::getGuiShape(), MSVehicleType::getLength(), MSBaseVehicle::getVehicleType(), MSVehicleType::getWidth(), GLHelper::setColor(), SUMOReal, SVS_ANT, SVS_BICYCLE, SVS_BUS, SVS_BUS_CITY, SVS_BUS_CITY_FLEXIBLE, SVS_BUS_OVERLAND, SVS_BUS_TROLLEY, SVS_DELIVERY, SVS_E_VEHICLE, SVS_MOTORCYCLE, SVS_PASSENGER, SVS_PASSENGER_HATCHBACK, SVS_PASSENGER_SEDAN, SVS_PASSENGER_VAN, SVS_PASSENGER_WAGON, SVS_PEDESTRIAN, SVS_RAIL, SVS_RAIL_CARGO, SVS_RAIL_CITY, SVS_RAIL_FAST, SVS_RAIL_LIGHT, SVS_RAIL_SLOW, SVS_TRANSPORT, SVS_TRANSPORT_1TRAILER, SVS_TRANSPORT_SEMITRAILER, SVS_UNKNOWN, and vehiclePoly_PassengerCarBody.
Referenced by GUIVehicle::drawGL().
void drawAction_drawVehicleAsTrianglePlus | ( | const GUIVehicle & | veh | ) | [inline] |
Definition at line 371 of file GUIVehicle.cpp.
References drawAction_drawVehicleAsBoxPlus(), MSVehicleType::getLength(), MSBaseVehicle::getVehicleType(), MSVehicleType::getWidth(), and SUMOReal.
Referenced by GUIVehicle::drawGL().
void drawAction_drawVehicleBlinker | ( | const GUIVehicle & | veh | ) | [inline] |
Definition at line 824 of file GUIVehicle.cpp.
References drawAction_drawBlinker(), MSBaseVehicle::getVehicleType(), MSVehicleType::getWidth(), MAX2(), MSVehicle::signalSet(), MSVehicle::VEH_SIGNAL_BLINKER_EMERGENCY, MSVehicle::VEH_SIGNAL_BLINKER_LEFT, and MSVehicle::VEH_SIGNAL_BLINKER_RIGHT.
Referenced by GUIVehicle::drawGL().
void drawAction_drawVehicleBrakeLight | ( | const GUIVehicle & | veh | ) | [inline] |
Definition at line 843 of file GUIVehicle.cpp.
References GLHelper::drawFilledCircle(), MSVehicleType::getLength(), MSBaseVehicle::getVehicleType(), MSVehicleType::getWidth(), MSVehicle::signalSet(), and MSVehicle::VEH_SIGNAL_BRAKELIGHT.
Referenced by GUIVehicle::drawGL().
Definition at line 389 of file GUIVehicle.cpp.
Referenced by drawAction_drawVehicleAsPoly().
double vehiclePoly_DeliveryMediumLeftGlass[] = { 0.21, .43, 0.20, .47, 0.38, .47, 0.38, .37, 0.31, .37, 0.20, .47, -10000 } |
Definition at line 117 of file GUIVehicle.cpp.
double vehiclePoly_DeliveryMediumRightGlass[] = { 0.21, -.43, 0.20, -.47, 0.38, -.47, 0.38, -.37, 0.31, -.37, 0.20, -.47, -10000 } |
Definition at line 116 of file GUIVehicle.cpp.
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 } |
Definition at line 127 of file GUIVehicle.cpp.
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 } |
Definition at line 124 of file GUIVehicle.cpp.
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 } |
Definition at line 125 of file GUIVehicle.cpp.
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 } |
Definition at line 96 of file GUIVehicle.cpp.
Referenced by drawAction_drawVehicleAsPoly().
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 } |
Definition at line 97 of file GUIVehicle.cpp.
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 } |
Definition at line 98 of file GUIVehicle.cpp.
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 } |
Definition at line 104 of file GUIVehicle.cpp.
double vehiclePoly_PassengerHatchbackLeftGlass[] = { 0.36, .43, 0.34, .47, 0.94, .47, 0.80, .37, 0.45, .37, 0.34, .47, -10000 } |
Definition at line 103 of file GUIVehicle.cpp.
double vehiclePoly_PassengerHatchbackRightGlass[] = { 0.36, -.43, 0.34, -.47, 0.94, -.47, 0.80, -.37, 0.45, -.37, 0.34, -.47, -10000 } |
Definition at line 102 of file GUIVehicle.cpp.
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 } |
Definition at line 101 of file GUIVehicle.cpp.
double vehiclePoly_PassengerSedanLeftGlass[] = { 0.36, .43, 0.34, .47, 0.77, .47, 0.67, .37, 0.45, .37, 0.34, .47, -10000 } |
Definition at line 100 of file GUIVehicle.cpp.
double vehiclePoly_PassengerSedanRightGlass[] = { 0.36, -.43, 0.34, -.47, 0.77, -.47, 0.67, -.37, 0.45, -.37, 0.34, -.47, -10000 } |
Definition at line 99 of file GUIVehicle.cpp.
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 } |
Definition at line 114 of file GUIVehicle.cpp.
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 } |
Definition at line 109 of file GUIVehicle.cpp.
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 } |
Definition at line 110 of file GUIVehicle.cpp.
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 } |
Definition at line 111 of file GUIVehicle.cpp.
double vehiclePoly_PassengerVanLeftGlass[] = { 0.36, .43, 0.20, .47, 0.98, .47, 0.91, .37, 0.31, .37, 0.20, .47, -10000 } |
Definition at line 113 of file GUIVehicle.cpp.
double vehiclePoly_PassengerVanRightGlass[] = { 0.36, -.43, 0.20, -.47, 0.98, -.47, 0.91, -.37, 0.31, -.37, 0.20, -.47, -10000 } |
Definition at line 112 of file GUIVehicle.cpp.
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 } |
Definition at line 107 of file GUIVehicle.cpp.
double vehiclePoly_PassengerWagonLeftGlass[] = { 0.36, .43, 0.34, .47, 0.94, .47, 0.87, .37, 0.45, .37, 0.34, .47, -10000 } |
Definition at line 106 of file GUIVehicle.cpp.
double vehiclePoly_PassengerWagonRightGlass[] = { 0.36, -.43, 0.34, -.47, 0.94, -.47, 0.87, -.37, 0.45, -.37, 0.34, -.47, -10000 } |
Definition at line 105 of file GUIVehicle.cpp.
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 } |
Definition at line 119 of file GUIVehicle.cpp.
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 } |
Definition at line 120 of file GUIVehicle.cpp.
double vehiclePoly_TransportLeftGlass[] = { 0.36, .47, 0.10, .48, 1.25, .48, 1.25, .4, 0.3, .4, 0.10, .48, -10000 } |
Definition at line 122 of file GUIVehicle.cpp.
double vehiclePoly_TransportRightGlass[] = { 0.36, -.47, 0.10, -.48, 1.25, -.48, 1.25, -.4, 0.3, -.4, 0.10, -.48, -10000 } |
Definition at line 121 of file GUIVehicle.cpp.