![]() |
SUMO - Simulation of Urban MObility
|
A MSVehicle extended by some values for usage within the gui. More...
#include <GUIBaseVehicle.h>
Data Structures | |
class | GUIBaseVehiclePopupMenu |
Public Member Functions | |
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 More... | |
virtual void | drawAction_drawLinkItems (const GUIVisualizationSettings &) const |
virtual void | drawAction_drawPersonsAndContainers (const GUIVisualizationSettings &) const |
virtual void | drawAction_drawVehicleBlinker (SUMOReal) const |
virtual void | drawAction_drawVehicleBlueLight () const |
virtual void | drawAction_drawVehicleBrakeLight (SUMOReal) const |
virtual void | drawBestLanes () const |
Draws the vehicle's best lanes. More... | |
void | drawName (const Position &pos, const SUMOReal scale, const GUIVisualizationTextSettings &settings, const SUMOReal angle=0) const |
virtual void | drawRouteHelper (const MSRoute &r, SUMOReal exaggeration) const =0 |
Draws the route. More... | |
virtual SUMOReal | getAngle () const =0 |
Returns the vehicle's direction in radians. More... | |
virtual SUMOReal | getColorValue (size_t activeScheme) const =0 |
gets the color value according to the current scheme index More... | |
virtual SUMOReal | getLastLaneChangeOffset () const =0 |
Returns the time since the last lane change in seconds. More... | |
virtual GUIParameterTableWindow * | getParameterWindow (GUIMainWindow &app, GUISUMOAbstractView &parent)=0 |
Returns an own parameter window. More... | |
virtual Position | getPosition (const SUMOReal offset=0) const =0 |
Return current position (x/y, cartesian) More... | |
virtual std::string | getStopInfo () const =0 |
retrieve information about the current stop state More... | |
virtual GUIParameterTableWindow * | getTypeParameterWindow (GUIMainWindow &app, GUISUMOAbstractView &parent)=0 |
Returns an own type parameter window. More... | |
GUIBaseVehicle (MSBaseVehicle &vehicle) | |
virtual void | selectBlockingFoes () const =0 |
adds the blocking foes to the current selection More... | |
~GUIBaseVehicle () | |
destructor More... | |
inherited from GUIGlObject | |
GUIGLObjectPopupMenu * | getPopUpMenu (GUIMainWindow &app, GUISUMOAbstractView &parent) |
Returns an own popup-menu. More... | |
Boundary | getCenteringBoundary () const |
Returns the boundary to which the view shall be centered in order to show the object. More... | |
void | drawGL (const GUIVisualizationSettings &s) const |
Draws the object. More... | |
virtual void | drawGLAdditional (GUISUMOAbstractView *const parent, const GUIVisualizationSettings &s) const |
Draws additionally triggered visualisations. More... | |
Atomar getter methods | |
const std::string & | getFullName () const |
Returns the full name appearing in the tool tip. More... | |
virtual const std::string & | getParentName () const |
Returns the name of the parent object (if any) More... | |
GUIGlID | getGlID () const |
Returns the numerical id of the object. More... | |
interfaces to be implemented by derived classes | |
const std::string & | getMicrosimID () const |
Returns the id of the object as known to microsim. More... | |
virtual void | setMicrosimID (const std::string &newID) |
Changes the microsimID of the object (happens in NETEDIT) More... | |
GUIGlObjectType | getType () const |
Returns the type of the object as coded in GUIGlObjectType. More... | |
Parameter table window I/O | |
void | addParameterTable (GUIParameterTableWindow *w) |
Lets this object know a parameter window showing the object's values was opened. More... | |
void | removeParameterTable (GUIParameterTableWindow *w) |
Lets this object know a parameter window showing the object's values was closed. More... | |
Static Public Member Functions | |
static bool | setFunctionalColor (size_t activeScheme, const MSBaseVehicle *veh) |
sets the color according to the current scheme index and some vehicle function More... | |
Static Public Attributes | |
static StringBijection< GUIGlObjectType > | TypeNames |
associates object types with strings More... | |
Protected Member Functions | |
const Position & | getSeatPosition (size_t personIndex) const |
returns the seat position for the person with the given index More... | |
void | setColor (const GUIVisualizationSettings &s) const |
sets the color according to the currente settings More... | |
void | setPrefix (const std::string &prefix) |
helper methods for building popup-menus | |
void | buildPopupHeader (GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true) |
Builds the header. More... | |
void | buildCenterPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true) |
Builds an entry which allows to center to the object. More... | |
void | buildNameCopyPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true) |
Builds entries which allow to copy the name / typed name into the clipboard. More... | |
void | buildSelectionPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true) |
Builds an entry which allows to (de)select the object. More... | |
void | buildShowParamsPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true) |
Builds an entry which allows to open the parameter window. More... | |
void | buildShowTypeParamsPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true) |
Builds an entry which allows to open the type parameter window. More... | |
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. More... | |
void | buildShowManipulatorPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true) |
Builds an entry which allows to open the manipulator window. More... | |
Static Protected Member Functions | |
static void | drawLinkItem (const Position &pos, SUMOTime arrivalTime, SUMOTime leaveTime, SUMOReal exagerate) |
Protected Attributes | |
SUMOReal | myCarriageLength |
Variable to set with the length of the last drawn carriage or the vehicle length. More... | |
MFXMutex | myLock |
The mutex used to avoid concurrent updates of the vehicle buffer. More... | |
PositionVector | mySeatPositions |
positions of seats in the vehicle (updated at every drawing step) More... | |
Private Attributes | |
MSDevice_Vehroutes * | myRoutes |
MSBaseVehicle & | myVehicle |
The vehicle to which all calls should be delegated. More... | |
const MSVehicleType & | myVType |
A shortcut to myVehicle.myType. More... | |
Additional visualisations | |
enum | VisualisationFeatures { VO_SHOW_BEST_LANES = 1, VO_SHOW_ROUTE = 2, VO_SHOW_ALL_ROUTES = 4, VO_TRACKED = 8, VO_SHOW_LFLINKITEMS = 16 } |
Additional visualisation feature ids. More... | |
std::map< GUISUMOAbstractView *, int > | myAdditionalVisualizations |
Enabled visualisations, per view. More... | |
bool | hasActiveAddVisualisation (GUISUMOAbstractView *const parent, int which) const |
Returns whether the named feature is enabled in the given view. More... | |
void | addActiveAddVisualisation (GUISUMOAbstractView *const parent, int which) |
Adds the named visualisation feature to the given view. More... | |
void | removeActiveAddVisualisation (GUISUMOAbstractView *const parent, int which) |
Adds the named visualisation feature to the given view. More... | |
void | drawRoute (const GUIVisualizationSettings &s, int routeNo, SUMOReal darken) const |
Chooses the route to draw and draws it, darkening it as given. More... | |
drawing helper methods | |
void | drawAction_drawVehicleAsBoxPlus () const |
void | drawAction_drawVehicleAsTrianglePlus () const |
void | drawAction_drawVehicleAsPoly (const GUIVisualizationSettings &s) const |
bool | drawAction_drawVehicleAsImage (const GUIVisualizationSettings &s, SUMOReal length=-1) const |
static void | drawPoly (double *poses, SUMOReal offset) |
A MSVehicle extended by some values for usage within the gui.
A visualisable MSVehicle. Extended by the possibility to retrieve names of all available vehicles (static) and the possibility to retrieve the color of the vehicle which is available in different forms allowing an easier recognition of done actions such as lane changing.
Definition at line 68 of file GUIBaseVehicle.h.
Additional visualisation feature ids.
Definition at line 272 of file GUIBaseVehicle.h.
GUIBaseVehicle::GUIBaseVehicle | ( | MSBaseVehicle & | vehicle | ) |
Definition at line 257 of file GUIBaseVehicle.cpp.
References MSDevice_Vehroutes::buildVehicleDevices(), MSBaseVehicle::myDevices, MSBaseVehicle::myMoveReminders, myRoutes, mySeatPositions, and myVehicle.
GUIBaseVehicle::~GUIBaseVehicle | ( | ) |
destructor
Definition at line 268 of file GUIBaseVehicle.cpp.
References MFXMutex::lock(), myAdditionalVisualizations, myLock, myRoutes, GLObjectValuePassConnector< T >::removeObject(), and MFXMutex::unlock().
void GUIBaseVehicle::addActiveAddVisualisation | ( | GUISUMOAbstractView *const | parent, |
int | which | ||
) |
Adds the named visualisation feature to the given view.
[in] | parent | The view for which the feature shall be enabled |
[in] | which | The visualisation feature to enable |
Definition at line 1113 of file GUIBaseVehicle.cpp.
References GUISUMOAbstractView::addAdditionalGLVisualisation(), and myAdditionalVisualizations.
Referenced by drawAction_drawVehicleBlueLight(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdShowAllRoutes(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdShowBestLanes(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdShowCurrentRoute(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdShowLFLinkItems(), and GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdStartTrack().
|
inherited |
Lets this object know a parameter window showing the object's values was opened.
[in] | w | The opened parameter window |
Definition at line 198 of file GUIGlObject.cpp.
References GUIGlObject::myParamWindows.
|
protectedinherited |
Builds an entry which allows to center to the object.
Definition at line 127 of file GUIGlObject.cpp.
References GUIIconSubSys::getIcon(), ICON_RECENTERVIEW, and MID_CENTER.
Referenced by GUIDetectorWrapper::getPopUpMenu(), GUITrafficLightLogicWrapper::getPopUpMenu(), GUIContainer::getPopUpMenu(), GUIPolygon::getPopUpMenu(), GUIPerson::getPopUpMenu(), GUILaneSpeedTrigger::getPopUpMenu(), GUICalibrator::getPopUpMenu(), GUIPointOfInterest::getPopUpMenu(), GNELane::getPopUpMenu(), GNEJunction::getPopUpMenu(), GUIJunctionWrapper::getPopUpMenu(), GNEEdge::getPopUpMenu(), GUITriggeredRerouter::getPopUpMenu(), GUIContainerStop::getPopUpMenu(), GUIBusStop::getPopUpMenu(), GUIChargingStation::getPopUpMenu(), GNENet::getPopUpMenu(), GUIEdge::getPopUpMenu(), GUINet::getPopUpMenu(), getPopUpMenu(), and GUILane::getPopUpMenu().
|
protectedinherited |
Builds entries which allow to copy the name / typed name into the clipboard.
Definition at line 136 of file GUIGlObject.cpp.
References MID_COPY_NAME, and MID_COPY_TYPED_NAME.
Referenced by GUIDetectorWrapper::getPopUpMenu(), GUITrafficLightLogicWrapper::getPopUpMenu(), GUIContainer::getPopUpMenu(), GUIPolygon::getPopUpMenu(), GUIPerson::getPopUpMenu(), GUILaneSpeedTrigger::getPopUpMenu(), GUICalibrator::getPopUpMenu(), GUIPointOfInterest::getPopUpMenu(), GNELane::getPopUpMenu(), GNEJunction::getPopUpMenu(), GUIJunctionWrapper::getPopUpMenu(), GNEEdge::getPopUpMenu(), GUITriggeredRerouter::getPopUpMenu(), GUIContainerStop::getPopUpMenu(), GUIBusStop::getPopUpMenu(), GUIChargingStation::getPopUpMenu(), GUIEdge::getPopUpMenu(), getPopUpMenu(), and GUILane::getPopUpMenu().
|
protectedinherited |
Builds the header.
Definition at line 117 of file GUIGlObject.cpp.
References GUIMainWindow::getBoldFont(), and GUIGlObject::getFullName().
Referenced by GUIDetectorWrapper::getPopUpMenu(), GUITrafficLightLogicWrapper::getPopUpMenu(), GNECrossing::getPopUpMenu(), GNEInternalLane::getPopUpMenu(), GUIContainer::getPopUpMenu(), GUIPolygon::getPopUpMenu(), GUIPerson::getPopUpMenu(), GUILaneSpeedTrigger::getPopUpMenu(), GUICalibrator::getPopUpMenu(), GUIPointOfInterest::getPopUpMenu(), GNELane::getPopUpMenu(), GNEJunction::getPopUpMenu(), GUIJunctionWrapper::getPopUpMenu(), GNEEdge::getPopUpMenu(), GUITriggeredRerouter::getPopUpMenu(), GUIContainerStop::getPopUpMenu(), GUIBusStop::getPopUpMenu(), GUIChargingStation::getPopUpMenu(), GNENet::getPopUpMenu(), GUIEdge::getPopUpMenu(), GUINet::getPopUpMenu(), getPopUpMenu(), and GUILane::getPopUpMenu().
|
protectedinherited |
Builds an entry which allows to copy the cursor position if geo projection is used, also builds an entry for copying the geo-position.
Definition at line 177 of file GUIGlObject.cpp.
References GeoConvHelper::getFinal(), MID_COPY_CURSOR_GEOPOSITION, and MID_COPY_CURSOR_POSITION.
Referenced by GUIDetectorWrapper::getPopUpMenu(), GUITrafficLightLogicWrapper::getPopUpMenu(), GUIContainer::getPopUpMenu(), GUIPolygon::getPopUpMenu(), GUIPerson::getPopUpMenu(), GUILaneSpeedTrigger::getPopUpMenu(), GUICalibrator::getPopUpMenu(), GUIPointOfInterest::getPopUpMenu(), GNELane::getPopUpMenu(), GNEJunction::getPopUpMenu(), GUIJunctionWrapper::getPopUpMenu(), GNEEdge::getPopUpMenu(), GUITriggeredRerouter::getPopUpMenu(), GUIContainerStop::getPopUpMenu(), GUIBusStop::getPopUpMenu(), GUIChargingStation::getPopUpMenu(), GNENet::getPopUpMenu(), GUIEdge::getPopUpMenu(), GUINet::getPopUpMenu(), getPopUpMenu(), and GUILane::getPopUpMenu().
|
protectedinherited |
Builds an entry which allows to (de)select the object.
Definition at line 146 of file GUIGlObject.cpp.
References GUIGlObject::getGlID(), GUIIconSubSys::getIcon(), GUIGlObject::getType(), gSelected, ICON_FLAG_MINUS, ICON_FLAG_PLUS, GUISelectedStorage::isSelected(), MID_ADDSELECT, and MID_REMOVESELECT.
Referenced by GUIDetectorWrapper::getPopUpMenu(), GUITrafficLightLogicWrapper::getPopUpMenu(), GUIContainer::getPopUpMenu(), GUIPolygon::getPopUpMenu(), GUIPerson::getPopUpMenu(), GUILaneSpeedTrigger::getPopUpMenu(), GUICalibrator::getPopUpMenu(), GUIPointOfInterest::getPopUpMenu(), GNELane::getPopUpMenu(), GNEJunction::getPopUpMenu(), GUIJunctionWrapper::getPopUpMenu(), GNEEdge::getPopUpMenu(), GUITriggeredRerouter::getPopUpMenu(), GUIContainerStop::getPopUpMenu(), GUIBusStop::getPopUpMenu(), GUIChargingStation::getPopUpMenu(), GUIEdge::getPopUpMenu(), getPopUpMenu(), and GUILane::getPopUpMenu().
|
protectedinherited |
Builds an entry which allows to open the manipulator window.
Definition at line 189 of file GUIGlObject.cpp.
References GUIIconSubSys::getIcon(), ICON_MANIP, and MID_MANIP.
Referenced by GUILaneSpeedTrigger::getPopUpMenu(), and GUITriggeredRerouter::getPopUpMenu().
|
protectedinherited |
Builds an entry which allows to open the parameter window.
Definition at line 159 of file GUIGlObject.cpp.
References GUIIconSubSys::getIcon(), ICON_APP_TABLE, and MID_SHOWPARS.
Referenced by GUIDetectorWrapper::getPopUpMenu(), GUIContainer::getPopUpMenu(), GUIPerson::getPopUpMenu(), GUILaneSpeedTrigger::getPopUpMenu(), GUICalibrator::getPopUpMenu(), GUIContainerStop::getPopUpMenu(), GUIBusStop::getPopUpMenu(), GUIChargingStation::getPopUpMenu(), GUIEdge::getPopUpMenu(), GUINet::getPopUpMenu(), getPopUpMenu(), and GUILane::getPopUpMenu().
|
protectedinherited |
Builds an entry which allows to open the type parameter window.
Definition at line 168 of file GUIGlObject.cpp.
References GUIIconSubSys::getIcon(), ICON_APP_TABLE, and MID_SHOWTYPEPARS.
Referenced by getPopUpMenu().
|
pure virtual |
draws the given guiShape if it has distinc carriages/modules and eturns true if so
Implemented in GUIVehicle, and GUIMEVehicle.
Referenced by drawAction_drawVehicleAsPoly(), and drawGL().
|
inlinevirtual |
Reimplemented in GUIVehicle.
Definition at line 133 of file GUIBaseVehicle.h.
Referenced by drawGLAdditional().
|
inlinevirtual |
Reimplemented in GUIVehicle.
Definition at line 134 of file GUIBaseVehicle.h.
Referenced by drawGL().
|
protected |
Definition at line 336 of file GUIBaseVehicle.cpp.
References MSVehicleType::getLength(), MSVehicleType::getWidth(), and myVType.
Referenced by GUIMEVehicle::drawAction_drawCarriageClass(), drawAction_drawVehicleAsTrianglePlus(), and drawGL().
|
protected |
Definition at line 806 of file GUIBaseVehicle.cpp.
References GUITexturesHelper::drawTexturedBox(), GUIVisualizationSizeSettings::getExaggeration(), MSVehicleType::getImgFile(), MSVehicleType::getLength(), GUITexturesHelper::getTextureID(), MSVehicleType::getWidth(), myVType, SUMOReal, and GUIVisualizationSettings::vehicleSize.
Referenced by GUIVehicle::drawAction_drawRailCarriages(), and drawGL().
|
protected |
Definition at line 385 of file GUIBaseVehicle.cpp.
References RGBColor::changedBrightness(), drawAction_drawCarriageClass(), GLHelper::drawBoxLine(), GLHelper::drawFilledCircle(), drawPoly(), GLHelper::getColor(), MSVehicleType::getGuiShape(), MSVehicleType::getLength(), MSVehicleType::getWidth(), RGBColor::GREY, myVType, GLHelper::setColor(), SUMOReal, SVS_ANT, SVS_BICYCLE, SVS_BUS, SVS_BUS_COACH, SVS_BUS_FLEXIBLE, SVS_BUS_TROLLEY, SVS_DELIVERY, SVS_E_VEHICLE, SVS_EMERGENCY, SVS_MOPED, SVS_MOTORCYCLE, SVS_PASSENGER, SVS_PASSENGER_HATCHBACK, SVS_PASSENGER_SEDAN, SVS_PASSENGER_VAN, SVS_PASSENGER_WAGON, SVS_PEDESTRIAN, SVS_RAIL, SVS_RAIL_CAR, SVS_RAIL_CARGO, SVS_SHIP, SVS_TRUCK, SVS_TRUCK_1TRAILER, SVS_TRUCK_SEMITRAILER, SVS_UNKNOWN, and vehiclePoly_PassengerCarBody.
Referenced by drawGL().
|
protected |
Definition at line 351 of file GUIBaseVehicle.cpp.
References drawAction_drawVehicleAsBoxPlus(), MSVehicleType::getLength(), MSVehicleType::getWidth(), myVType, and SUMOReal.
Referenced by drawGL().
|
inlinevirtual |
Reimplemented in GUIVehicle.
Definition at line 131 of file GUIBaseVehicle.h.
Referenced by drawGL().
|
inlinevirtual |
Reimplemented in GUIVehicle.
Definition at line 137 of file GUIBaseVehicle.h.
References addActiveAddVisualisation(), drawGL(), drawGLAdditional(), getCenteringBoundary(), getPopUpMenu(), hasActiveAddVisualisation(), and removeActiveAddVisualisation().
Referenced by drawGL().
|
inlinevirtual |
Reimplemented in GUIVehicle.
Definition at line 132 of file GUIBaseVehicle.h.
Referenced by drawGL().
|
inlinevirtual |
Draws the vehicle's best lanes.
Reimplemented in GUIVehicle.
Definition at line 136 of file GUIBaseVehicle.h.
Referenced by drawGLAdditional().
|
virtual |
Draws the object.
[in] | s | The settings for the current view (may influence drawing) |
Implements GUIGlObject.
Definition at line 825 of file GUIBaseVehicle.cpp.
References GUIVisualizationTextSettings::color, drawAction_drawCarriageClass(), drawAction_drawPersonsAndContainers(), drawAction_drawVehicleAsBoxPlus(), drawAction_drawVehicleAsImage(), drawAction_drawVehicleAsPoly(), drawAction_drawVehicleAsTrianglePlus(), drawAction_drawVehicleBlinker(), drawAction_drawVehicleBlueLight(), drawAction_drawVehicleBrakeLight(), GUIVisualizationSettings::drawLaneChangePreference, GUIVisualizationSettings::drawMinGap, GUIGlObject::drawName(), GLHelper::drawOutlineCircle(), GLHelper::drawText(), MSLane::geometryPositionAtOffset(), getAngle(), MSBaseVehicle::getDevice(), GUIVisualizationSizeSettings::getExaggeration(), GUIGlObject::getGlID(), MSVehicleType::getGuiShape(), SUMOVehicle::getLane(), MSVehicleType::getLength(), MSVehicleType::getMinGap(), MSBaseVehicle::getParameter(), getPosition(), SUMOVehicle::getPositionOnLane(), MSDevice_BTreceiver::getRange(), GUIGlObject::getType(), GLO_MAX, SUMOVehicleParameter::line, MIN2(), myCarriageLength, mySeatPositions, myVehicle, myVType, GUIVisualizationSettings::personName, PI, RAD2DEG, GUIVisualizationSettings::scale, setColor(), GUIVisualizationTextSettings::show, GUIVisualizationSettings::showBlinker, GUIVisualizationSettings::showBTRange, GUIVisualizationTextSettings::size, SUMOReal, SVS_ANT, SVS_BICYCLE, SVS_EMERGENCY, SVS_PEDESTRIAN, SVS_RAIL, SVS_RAIL_CARGO, SVS_SHIP, GUIVisualizationSettings::vehicleName, GUIVisualizationSettings::vehicleQuality, GUIVisualizationSettings::vehicleSize, Position::x(), and Position::y().
Referenced by drawAction_drawVehicleBlueLight(), GUILane::drawGL(), and GUIEdge::drawMesoVehicles().
|
virtual |
Draws additionally triggered visualisations.
[in] | parent | The view |
[in] | s | The settings for the current view (may influence drawing) |
Reimplemented from GUIGlObject.
Definition at line 978 of file GUIBaseVehicle.cpp.
References drawAction_drawLinkItems(), drawBestLanes(), drawRoute(), GUIGlObject::getGlID(), MSBaseVehicle::getNumberReroutes(), GUIGlObject::getType(), hasActiveAddVisualisation(), myVehicle, SUMOReal, VO_SHOW_ALL_ROUTES, VO_SHOW_BEST_LANES, VO_SHOW_LFLINKITEMS, and VO_SHOW_ROUTE.
Referenced by drawAction_drawVehicleBlueLight().
|
staticprotected |
Definition at line 1008 of file GUIBaseVehicle.cpp.
References GLHelper::drawFilledCircle(), GLHelper::drawText(), RGBColor::GREEN, STEPS2TIME, toString(), Position::x(), and Position::y().
Referenced by GUIVehicle::drawAction_drawLinkItems().
|
inherited |
Definition at line 225 of file GUIGlObject.cpp.
References GUIVisualizationTextSettings::color, GLHelper::drawText(), GUIGlObject::getMicrosimID(), GLO_MAX, GUIVisualizationTextSettings::show, and GUIVisualizationTextSettings::size.
Referenced by GUIMEInductLoop::MyWrapper::drawGL(), GUIContainer::drawGL(), GUIPerson::drawGL(), GUIPolygon::drawGL(), GUIInstantInductLoop::MyWrapper::drawGL(), GUILaneSpeedTrigger::drawGL(), GUICalibrator::drawGL(), GUIPointOfInterest::drawGL(), GNEJunction::drawGL(), GUIJunctionWrapper::drawGL(), GNEEdge::drawGL(), GUIE3Collector::MyWrapper::drawGL(), GUI_E2_ZS_Collector::MyWrapper::drawGL(), GUIContainerStop::drawGL(), GUIBusStop::drawGL(), GUIChargingStation::drawGL(), GUIEdge::drawGL(), drawGL(), and GUIInductLoop::MyWrapper::drawGL().
|
staticprotected |
Definition at line 369 of file GUIBaseVehicle.cpp.
Referenced by drawAction_drawVehicleAsPoly().
void GUIBaseVehicle::drawRoute | ( | const GUIVisualizationSettings & | s, |
int | routeNo, | ||
SUMOReal | darken | ||
) | const |
Chooses the route to draw and draws it, darkening it as given.
[in] | s | The visualisation settings, needed to determine the vehicle's color |
[in] | routeNo | The route to show (0: the current, >0: prior) |
[in] | darken | The amount to darken the route by |
Definition at line 1130 of file GUIBaseVehicle.cpp.
References drawRouteHelper(), GUIVisualizationSizeSettings::getExaggeration(), MSBaseVehicle::getRoute(), MSDevice_Vehroutes::getRoute(), myRoutes, myVehicle, setColor(), SUMOReal, and GUIVisualizationSettings::vehicleSize.
Referenced by drawGLAdditional().
|
pure virtual |
Draws the route.
[in] | r | The route to draw |
Implemented in GUIMEVehicle, and GUIVehicle.
Referenced by drawRoute().
|
pure virtual |
Returns the vehicle's direction in radians.
Implemented in GUIMEVehicle, and GUIVehicle.
Referenced by drawGL().
|
virtual |
Returns the boundary to which the view shall be centered in order to show the object.
Implements GUIGlObject.
Definition at line 327 of file GUIBaseVehicle.cpp.
References Boundary::add(), MSVehicleType::getLength(), getPosition(), MSBaseVehicle::getVehicleType(), Boundary::grow(), and myVehicle.
Referenced by drawAction_drawVehicleBlueLight().
|
pure virtual |
gets the color value according to the current scheme index
Implemented in GUIVehicle, and GUIMEVehicle.
Referenced by setColor().
|
inlineinherited |
Returns the full name appearing in the tool tip.
Definition at line 108 of file GUIGlObject.h.
Referenced by GUIGlObject::buildPopupHeader(), GUIGlObject_AbstractAdd::GUIGlObject_AbstractAdd(), GUIGLObjectPopupMenu::onCmdCopyTypedName(), GUIParam_PopupMenuInterface::onCmdOpenTracker(), GUILaneSpeedTrigger::openManipulator(), GUICalibrator::openManipulator(), GUITriggeredRerouter::openManipulator(), GUIDialog_GLChosenEditor::rebuildList(), GUIGlObject_AbstractAdd::remove(), GUISelectedStorage::save(), and GUISUMOAbstractView::showToolTipFor().
|
inlineinherited |
Returns the numerical id of the object.
Definition at line 123 of file GUIGlObject.h.
Referenced by GNENet::addReversedEdge(), GUIMessageWindow::appendMsg(), GUIGlObject::buildSelectionPopupEntry(), GUINet::createTLWrapper(), GNENet::deleteEdge(), GNENet::deleteJunction(), GNENet::deleteLane(), GUIMEInductLoop::MyWrapper::drawGL(), GNEInternalLane::drawGL(), GNECrossing::drawGL(), GUIContainer::drawGL(), GUIPerson::drawGL(), GUIPolygon::drawGL(), GUIInstantInductLoop::MyWrapper::drawGL(), GUILaneSpeedTrigger::drawGL(), GUICalibrator::drawGL(), GUIPointOfInterest::drawGL(), GNEJunction::drawGL(), GUIJunctionWrapper::drawGL(), GNEEdge::drawGL(), GUIE3Collector::MyWrapper::drawGL(), GNELane::drawGL(), GUI_E2_ZS_Collector::MyWrapper::drawGL(), GUIContainerStop::drawGL(), GUIBusStop::drawGL(), GUIChargingStation::drawGL(), GNEPoly::drawGL(), GUIEdge::drawGL(), drawGL(), GUIInductLoop::MyWrapper::drawGL(), GUITriggeredRerouter::GUITriggeredRerouterEdge::drawGL(), GUILane::drawGL(), GUIContainer::drawGLAdditional(), GUIPerson::drawGLAdditional(), drawGLAdditional(), GUILane::drawLinkRule(), GUIMEVehicle::getColorValue(), GUIVehicle::getColorValue(), GUIJunctionWrapper::getColorValue(), GUIEdge::getColorValue(), GUIContainer::getColorValue(), GNELane::getColorValue(), GUIPerson::getColorValue(), GUILane::getColorValue(), GNEJunction::getColorValue(), GUIEdge::getIDs(), GNEEdge::getLaneGlIDs(), GUISUMOAbstractView::getObjectAtPosition(), GUISUMOAbstractView::getObjectsAtPosition(), GUIPerson::getPopUpMenu(), GNELane::getPopUpMenu(), getPopUpMenu(), GUIEdge::getScaleValue(), GUILane::getScaleValue(), GUIDialog_GLObjChooser::GUIDialog_GLObjChooser(), GNESelector::handleIDs(), GNETLSEditor::handleMultiChange(), GUIGlChildWindow::isSelected(), GNEViewParent::isSelected(), GUISUMOViewParent::isSelected(), GUISelectedStorage::loadIDs(), GNEViewNet::mergeJunctions(), GUIViewTraffic::onCmdAddRerouter(), GUIGLObjectPopupMenu::onCmdAddSelected(), GUIGLObjectPopupMenu::onCmdCenter(), GUIViewTraffic::onCmdCloseEdge(), GUIViewTraffic::onCmdCloseLane(), GNEViewNet::onCmdDuplicateLane(), GUIApplicationWindow::onCmdEditChosen(), GUIGLObjectPopupMenu::onCmdRemoveSelected(), GNEConnector::onCmdSelectDeadStarts(), GNEConnector::onCmdSelectPass(), GUIPerson::GUIPersonPopupMenu::onCmdStartTrack(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdStartTrack(), GNEViewNet::onCmdStraightenEdges(), GNEViewNet::onLeftBtnPress(), GUISUMOAbstractView::removeAdditionalGLVisualisation(), GLObjectValuePassConnector< std::pair< SUMOTime, MSPhaseDefinition > >::removeObject(), GUIVehicle::selectBlockingFoes(), GNEJunction::setColor(), GUIMessageWindow::setCursorPos(), and GUIGlObject::~GUIGlObject().
|
pure virtual |
Returns the time since the last lane change in seconds.
Implemented in GUIVehicle, and GUIMEVehicle.
|
inlineinherited |
Returns the id of the object as known to microsim.
Definition at line 167 of file GUIGlObject.h.
Referenced by GNETLSEditor::controlsEdge(), GUIGlObject::createFullName(), GNENet::deleteSingleEdge(), GNENet::deleteSingleJunction(), GUIGlObject::drawName(), GNEPOI::getAttribute(), GNECrossing::getAttribute(), GNELane::getAttribute(), GNEPoly::getAttribute(), GNEJunction::getAttribute(), GNEEdge::getAttribute(), GNELane::getParentName(), GUIDialog_GLObjChooser::GUIDialog_GLObjChooser(), GNEConnector::handleLaneClick(), GNETLSEditor::handleMultiChange(), GNEEdge::isValid(), GNEViewNet::mergeJunctions(), GNEPoly::moveGeometry(), GNEEdge::moveGeometry(), GUIGLObjectPopupMenu::onCmdAddSelected(), GUIGLObjectPopupMenu::onCmdCopyName(), GNEViewNet::onCmdNodeShape(), GNEViewNet::onLeftBtnPress(), GNEInspector::onUpdCopyTemplate(), GNENet::registerEdge(), GNENet::registerJunction(), GNENet::remapEdge(), GNEEdge::removeConnection(), GNENet::replaceJunctionByGeometry(), GNENet::retrieveAttributeCarriers(), GNEEdge::setAttribute(), GNENet::splitEdge(), and GNEConnector::updateDescription().
|
pure virtual |
Returns an own parameter window.
[in] | app | The application needed to build the parameter window |
[in] | parent | The parent window needed to build the parameter window |
Implements GUIGlObject.
Implemented in GUIVehicle, and GUIMEVehicle.
|
inlinevirtualinherited |
Returns the name of the parent object (if any)
Reimplemented in GUILane, and GNELane.
Definition at line 115 of file GUIGlObject.h.
References StringUtils::emptyString.
Referenced by GUIGLObjectPopupMenu::onCmdCopyEdgeName().
|
virtual |
Returns an own popup-menu.
[in] | app | The application needed to build the popup-menu |
[in] | parent | The parent window needed to build the popup-menu |
Implements GUIGlObject.
Definition at line 280 of file GUIBaseVehicle.cpp.
References GUIGlObject::buildCenterPopupEntry(), GUIGlObject::buildNameCopyPopupEntry(), GUIGlObject::buildPopupHeader(), GUIGlObject::buildPositionCopyEntry(), GUIGlObject::buildSelectionPopupEntry(), GUIGlObject::buildShowParamsPopupEntry(), GUIGlObject::buildShowTypeParamsPopupEntry(), GUIGlObject::getGlID(), GUISUMOAbstractView::getTrackedID(), hasActiveAddVisualisation(), MID_HIDE_ALLROUTES, MID_HIDE_BEST_LANES, MID_HIDE_CURRENTROUTE, MID_HIDE_LFLINKITEMS, MID_SHOW_ALLROUTES, MID_SHOW_BEST_LANES, MID_SHOW_CURRENTROUTE, MID_SHOW_FOES, MID_SHOW_LFLINKITEMS, MID_START_TRACK, MID_STOP_TRACK, myAdditionalVisualizations, VO_SHOW_ALL_ROUTES, VO_SHOW_BEST_LANES, VO_SHOW_LFLINKITEMS, and VO_SHOW_ROUTE.
Referenced by drawAction_drawVehicleBlueLight().
Return current position (x/y, cartesian)
If the vehicle's myLane is 0, Position::INVALID.
[in] | offset | optional offset in longitudinal direction |
Implemented in GUIMEVehicle, and GUIVehicle.
Referenced by drawGL(), and getCenteringBoundary().
|
protected |
returns the seat position for the person with the given index
if there are not enough seats in the vehicle people have to squeeze onto the last seat
Definition at line 1165 of file GUIBaseVehicle.cpp.
References MIN2(), and mySeatPositions.
Referenced by GUIVehicle::drawAction_drawPersonsAndContainers().
|
pure virtual |
retrieve information about the current stop state
Implemented in GUIVehicle, and GUIMEVehicle.
|
inlineinherited |
Returns the type of the object as coded in GUIGlObjectType.
Definition at line 180 of file GUIGlObject.h.
Referenced by GUIGlObject::buildSelectionPopupEntry(), GUIVehicle::drawAction_drawRailCarriages(), GUIPerson::drawAction_drawWalkingareaPath(), GUIMEInductLoop::MyWrapper::drawGL(), GUIContainer::drawGL(), GUIPerson::drawGL(), GUIInstantInductLoop::MyWrapper::drawGL(), GUILaneSpeedTrigger::drawGL(), GUICalibrator::drawGL(), GNEJunction::drawGL(), GUIJunctionWrapper::drawGL(), GUIE3Collector::MyWrapper::drawGL(), GNELane::drawGL(), GUI_E2_ZS_Collector::MyWrapper::drawGL(), GUIContainerStop::drawGL(), GUIBusStop::drawGL(), GUIChargingStation::drawGL(), drawGL(), GUIInductLoop::MyWrapper::drawGL(), GUITriggeredRerouter::GUITriggeredRerouterEdge::drawGL(), GUILane::drawGL(), GUIPerson::drawGLAdditional(), drawGLAdditional(), GUIJunctionWrapper::getColorValue(), GUIEdge::getColorValue(), GNELane::getColorValue(), GUILane::getColorValue(), GNEJunction::getColorValue(), GNEViewNet::getEdgeAtCursorPosition(), GNEViewNet::getEdgesAtCursorPosition(), GNEViewNet::getJunctionAtCursorPosition(), GNEViewNet::getLaneAtCurserPosition(), GUISUMOAbstractView::getObjectAtPosition(), GUISUMOAbstractView::getObjectsAtPosition(), GUIEdge::getScaleValue(), GUILane::getScaleValue(), GNESelector::handleIDs(), GUIGlChildWindow::isSelected(), GNEViewParent::isSelected(), GUISUMOViewParent::isSelected(), GUISelectedStorage::loadIDs(), GNEViewNet::mergeJunctions(), GUITrafficLightLogicWrapper::GUITrafficLightLogicWrapperPopupMenu::onCmdBegin2TrackPhases(), GNEConnector::onCmdClearSelectedConnections(), GUIGLObjectPopupMenu::onCmdCopyEdgeName(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdHideAllRoutes(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdHideBestLanes(), GUIPerson::GUIPersonPopupMenu::onCmdHideCurrentRoute(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdHideCurrentRoute(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdHideLFLinkItems(), GUIPerson::GUIPersonPopupMenu::onCmdHideWalkingareaPath(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdShowAllRoutes(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdShowBestLanes(), GUIPerson::GUIPersonPopupMenu::onCmdShowCurrentRoute(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdShowCurrentRoute(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdShowFoes(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdShowLFLinkItems(), GUITrafficLightLogicWrapper::GUITrafficLightLogicWrapperPopupMenu::onCmdShowPhases(), GUIPerson::GUIPersonPopupMenu::onCmdShowWalkingareaPath(), GUIPerson::GUIPersonPopupMenu::onCmdStartTrack(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdStartTrack(), GUIPerson::GUIPersonPopupMenu::onCmdStopTrack(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdStopTrack(), GUITrafficLightLogicWrapper::GUITrafficLightLogicWrapperPopupMenu::onCmdSwitchTLS2Off(), GUITrafficLightLogicWrapper::GUITrafficLightLogicWrapperPopupMenu::onCmdSwitchTLSLogic(), GNEViewNet::onLeftBtnPress(), LayeredRTree::selectLayer(), GNEJunction::setColor(), and GUISelectedStorage::toggleSelection().
|
pure virtual |
Returns an own type parameter window.
[in] | app | The application needed to build the parameter window |
[in] | parent | The parent window needed to build the parameter window |
Reimplemented from GUIGlObject.
Implemented in GUIVehicle, and GUIMEVehicle.
bool GUIBaseVehicle::hasActiveAddVisualisation | ( | GUISUMOAbstractView *const | parent, |
int | which | ||
) | const |
Returns whether the named feature is enabled in the given view.
[in] | parent | The view for which the feature may be enabled |
[in] | which | The visualisation feature |
Definition at line 1107 of file GUIBaseVehicle.cpp.
References myAdditionalVisualizations.
Referenced by drawAction_drawVehicleBlueLight(), drawGLAdditional(), and getPopUpMenu().
void GUIBaseVehicle::removeActiveAddVisualisation | ( | GUISUMOAbstractView *const | parent, |
int | which | ||
) |
Adds the named visualisation feature to the given view.
[in] | parent | The view for which the feature shall be enabled |
[in] | which | The visualisation feature to enable |
Definition at line 1123 of file GUIBaseVehicle.cpp.
References myAdditionalVisualizations, and GUISUMOAbstractView::removeAdditionalGLVisualisation().
Referenced by drawAction_drawVehicleBlueLight(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdHideAllRoutes(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdHideBestLanes(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdHideCurrentRoute(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdHideLFLinkItems(), and GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdStopTrack().
|
inherited |
Lets this object know a parameter window showing the object's values was closed.
[in] | w | The closed parameter window |
Definition at line 204 of file GUIGlObject.cpp.
References GUIGlObject::myParamWindows.
Referenced by GUIParameterTableWindow::~GUIParameterTableWindow().
|
pure virtual |
adds the blocking foes to the current selection
Implemented in GUIVehicle, and GUIMEVehicle.
Referenced by GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdShowFoes().
|
protected |
sets the color according to the currente settings
Definition at line 1018 of file GUIBaseVehicle.cpp.
References GUIPropertySchemeStorage< T >::getActive(), GUIPropertyScheme< T >::getColor(), getColorValue(), GUIPropertySchemeStorage< T >::getScheme(), myVehicle, GLHelper::setColor(), setFunctionalColor(), and GUIVisualizationSettings::vehicleColorer.
Referenced by drawGL(), and drawRoute().
|
static |
sets the color according to the current scheme index and some vehicle function
Definition at line 1027 of file GUIBaseVehicle.cpp.
References SUMOVehicleParameter::color, RGBColor::DEFAULT_COLOR, Position::distanceTo(), RGBColor::fromHSV(), Boundary::getCenter(), MSRoute::getColor(), MSVehicleType::getColor(), MSRoute::getEdges(), MSNet::getInstance(), MSBaseVehicle::getParameter(), MSBaseVehicle::getRoute(), MSBaseVehicle::getVehicleType(), PI, GLHelper::setColor(), SUMOReal, VEHPARS_COLOR_SET, VTYPEPARS_COLOR_SET, MSVehicleType::wasSet(), SUMOVehicleParameter::wasSet(), Position::x(), Boundary::xmax(), Boundary::xmin(), Position::y(), Boundary::ymax(), and Boundary::ymin().
Referenced by setColor().
|
virtualinherited |
Changes the microsimID of the object (happens in NETEDIT)
Reimplemented in GNEEdge.
Definition at line 110 of file GUIGlObject.cpp.
References GUIGlObject::createFullName(), GUIGlObject::myFullName, and GUIGlObject::myMicrosimID.
Referenced by GNENet::renameJunction(), GNELane::setIndex(), and GNEEdge::setMicrosimID().
|
protectedinherited |
Definition at line 213 of file GUIGlObject.cpp.
References GUIGlObject::createFullName(), GUIGlObject::myFullName, and GUIGlObject::myPrefix.
std::map<GUISUMOAbstractView*, int> GUIBaseVehicle::myAdditionalVisualizations |
Enabled visualisations, per view.
Definition at line 286 of file GUIBaseVehicle.h.
Referenced by addActiveAddVisualisation(), getPopUpMenu(), hasActiveAddVisualisation(), removeActiveAddVisualisation(), and ~GUIBaseVehicle().
|
mutableprotected |
Variable to set with the length of the last drawn carriage or the vehicle length.
Definition at line 331 of file GUIBaseVehicle.h.
Referenced by drawGL().
|
mutableprotected |
The mutex used to avoid concurrent updates of the vehicle buffer.
Definition at line 328 of file GUIBaseVehicle.h.
Referenced by GUIVehicle::drawBestLanes(), and ~GUIBaseVehicle().
|
private |
Definition at line 343 of file GUIBaseVehicle.h.
Referenced by drawRoute(), GUIBaseVehicle(), and ~GUIBaseVehicle().
|
mutableprotected |
positions of seats in the vehicle (updated at every drawing step)
Definition at line 334 of file GUIBaseVehicle.h.
Referenced by GUIVehicle::computeSeats(), GUIVehicle::drawAction_drawRailCarriages(), drawGL(), getSeatPosition(), and GUIBaseVehicle().
|
private |
The vehicle to which all calls should be delegated.
Definition at line 338 of file GUIBaseVehicle.h.
Referenced by drawGL(), drawGLAdditional(), drawRoute(), getCenteringBoundary(), GUIBaseVehicle(), and setColor().
|
private |
A shortcut to myVehicle.myType.
Definition at line 341 of file GUIBaseVehicle.h.
Referenced by drawAction_drawVehicleAsBoxPlus(), drawAction_drawVehicleAsImage(), drawAction_drawVehicleAsPoly(), drawAction_drawVehicleAsTrianglePlus(), and drawGL().
|
staticinherited |
associates object types with strings
Definition at line 100 of file GUIGlObject.h.