SUMO - Simulation of Urban MObility
GUIBaseVehicle Class Referenceabstract

A MSVehicle extended by some values for usage within the gui. More...

#include <GUIBaseVehicle.h>

Inheritance diagram for GUIBaseVehicle:
Inheritance graph
Collaboration diagram for GUIBaseVehicle:
Collaboration graph

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 length, bool onlyOne=false) 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
 draw name of item More...
 
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 (int 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...
 
SUMOReal getNaviDegree () const
 return the current angle in navigational degrees More...
 
virtual GUIParameterTableWindowgetParameterWindow (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 GUIParameterTableWindowgetTypeParameterWindow (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
GUIGLObjectPopupMenugetPopUpMenu (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 drawOnPos (const GUIVisualizationSettings &s, const Position &pos, const SUMOReal angle) const
 Draws the object on the specified position with the specified angle. 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

Returns the full name appearing in the tool tip

Returns
This object's typed id
const std::string & getFullName () const
 
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
virtual 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. More...
 
GUIGlObjectType getType () const
 Returns the type of the object as coded in GUIGlObjectType. More...
 
Parameter table window I/O

Lets this object know a parameter window showing the object's values was opened

Parameters
[in]wThe opened parameter window
void addParameterTable (GUIParameterTableWindow *w)
 
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 (int activeScheme, const MSBaseVehicle *veh)
 sets the color according to the current scheme index and some vehicle function More...
 

Static Public Attributes

static const GUIGlID INVALID_ID = 0
 
static StringBijection< GUIGlObjectTypeTypeNames
 associates object types with strings More...
 

Protected Member Functions

const PositiongetSeatPosition (int 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)
 usually names are prefixed by a type-specific string. this method can be used to change the default More...
 
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_VehroutesmyRoutes
 
MSBaseVehiclemyVehicle
 The vehicle to which all calls should be delegated. More...
 
const MSVehicleTypemyVType
 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, VO_DRAW_OUTSIDE_NETWORK = 32
}
 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)
 

Detailed Description

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 69 of file GUIBaseVehicle.h.

Member Enumeration Documentation

§ VisualisationFeatures

Additional visualisation feature ids.

Enumerator
VO_SHOW_BEST_LANES 

show vehicle's best lanes

VO_SHOW_ROUTE 

show vehicle's current route

VO_SHOW_ALL_ROUTES 

show all vehicle's routes

VO_TRACKED 

track vehicle

VO_SHOW_LFLINKITEMS 

LFLinkItems.

VO_DRAW_OUTSIDE_NETWORK 

draw vehicle outside the road network

Definition at line 288 of file GUIBaseVehicle.h.

Constructor & Destructor Documentation

§ GUIBaseVehicle()

§ ~GUIBaseVehicle()

GUIBaseVehicle::~GUIBaseVehicle ( )

Member Function Documentation

§ addActiveAddVisualisation()

void GUIBaseVehicle::addActiveAddVisualisation ( GUISUMOAbstractView *const  parent,
int  which 
)

§ addParameterTable()

void GUIGlObject::addParameterTable ( GUIParameterTableWindow w)
inherited

Definition at line 260 of file GUIGlObject.cpp.

References GUIGlObject::myParamWindows.

§ buildCenterPopupEntry()

§ buildNameCopyPopupEntry()

§ buildPopupHeader()

§ buildPositionCopyEntry()

§ buildSelectionPopupEntry()

§ buildShowManipulatorPopupEntry()

void GUIGlObject::buildShowManipulatorPopupEntry ( GUIGLObjectPopupMenu ret,
bool  addSeparator = true 
)
protectedinherited

Builds an entry which allows to open the manipulator window.

Parameters

Definition at line 251 of file GUIGlObject.cpp.

References GUIIconSubSys::getIcon(), ICON_MANIP, and MID_MANIP.

Referenced by GUILaneSpeedTrigger::getPopUpMenu(), and GUITriggeredRerouter::getPopUpMenu().

§ buildShowParamsPopupEntry()

§ buildShowTypeParamsPopupEntry()

void GUIGlObject::buildShowTypeParamsPopupEntry ( GUIGLObjectPopupMenu ret,
bool  addSeparator = true 
)
protectedinherited

Builds an entry which allows to open the type parameter window.

Parameters

Definition at line 230 of file GUIGlObject.cpp.

References GUIIconSubSys::getIcon(), ICON_APP_TABLE, and MID_SHOWTYPEPARS.

Referenced by getPopUpMenu().

§ drawAction_drawCarriageClass()

virtual bool GUIBaseVehicle::drawAction_drawCarriageClass ( const GUIVisualizationSettings s,
SUMOVehicleShape  guiShape,
bool  asImage 
) const
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(), drawOnPos(), and getNaviDegree().

§ drawAction_drawLinkItems()

virtual void GUIBaseVehicle::drawAction_drawLinkItems ( const GUIVisualizationSettings ) const
inlinevirtual

Reimplemented in GUIVehicle.

Definition at line 142 of file GUIBaseVehicle.h.

Referenced by drawGLAdditional().

§ drawAction_drawPersonsAndContainers()

virtual void GUIBaseVehicle::drawAction_drawPersonsAndContainers ( const GUIVisualizationSettings ) const
inlinevirtual

Reimplemented in GUIVehicle.

Definition at line 143 of file GUIBaseVehicle.h.

Referenced by drawOnPos().

§ drawAction_drawVehicleAsBoxPlus()

void GUIBaseVehicle::drawAction_drawVehicleAsBoxPlus ( ) const
protected

§ drawAction_drawVehicleAsImage()

§ drawAction_drawVehicleAsPoly()

§ drawAction_drawVehicleAsTrianglePlus()

void GUIBaseVehicle::drawAction_drawVehicleAsTrianglePlus ( ) const
protected

§ drawAction_drawVehicleBlinker()

virtual void GUIBaseVehicle::drawAction_drawVehicleBlinker ( SUMOReal  ) const
inlinevirtual

Reimplemented in GUIVehicle.

Definition at line 137 of file GUIBaseVehicle.h.

Referenced by drawOnPos().

§ drawAction_drawVehicleBlueLight()

virtual void GUIBaseVehicle::drawAction_drawVehicleBlueLight ( ) const
inlinevirtual

§ drawAction_drawVehicleBrakeLight()

virtual void GUIBaseVehicle::drawAction_drawVehicleBrakeLight ( SUMOReal  length,
bool  onlyOne = false 
) const
inlinevirtual

Reimplemented in GUIVehicle.

Definition at line 138 of file GUIBaseVehicle.h.

References UNUSED_PARAMETER.

Referenced by drawOnPos().

§ drawBestLanes()

virtual void GUIBaseVehicle::drawBestLanes ( ) const
inlinevirtual

Draws the vehicle's best lanes.

Reimplemented in GUIVehicle.

Definition at line 145 of file GUIBaseVehicle.h.

Referenced by drawGLAdditional().

§ drawGL()

void GUIBaseVehicle::drawGL ( const GUIVisualizationSettings s) const
virtual

Draws the object.

Parameters
[in]sThe settings for the current view (may influence drawing)
See also
GUIGlObject::drawGL

Implements GUIGlObject.

Definition at line 982 of file GUIBaseVehicle.cpp.

References drawOnPos(), getAngle(), and getPosition().

Referenced by drawAction_drawVehicleBlueLight(), GUILane::drawGL(), and drawGLAdditional().

§ drawGLAdditional()

void GUIBaseVehicle::drawGLAdditional ( GUISUMOAbstractView *const  parent,
const GUIVisualizationSettings s 
) const
virtual

Draws additionally triggered visualisations.

Parameters
[in]parentThe view
[in]sThe settings for the current view (may influence drawing)

Reimplemented from GUIGlObject.

Definition at line 988 of file GUIBaseVehicle.cpp.

References drawAction_drawLinkItems(), drawBestLanes(), drawGL(), drawRoute(), GUIGlObject::getGlID(), MSBaseVehicle::getNumberReroutes(), GUIGlObject::getType(), hasActiveAddVisualisation(), MSBaseVehicle::isOnRoad(), myVehicle, SUMOReal, VO_SHOW_ALL_ROUTES, VO_SHOW_BEST_LANES, VO_SHOW_LFLINKITEMS, and VO_SHOW_ROUTE.

Referenced by drawAction_drawVehicleBlueLight().

§ drawLinkItem()

void GUIBaseVehicle::drawLinkItem ( const Position pos,
SUMOTime  arrivalTime,
SUMOTime  leaveTime,
SUMOReal  exagerate 
)
staticprotected

§ drawName()

§ drawOnPos()

void GUIBaseVehicle::drawOnPos ( const GUIVisualizationSettings s,
const Position pos,
const SUMOReal  angle 
) const

Draws the object on the specified position with the specified angle.

Parameters
[in]sThe settings for the current view (may influence drawing)
[in]posThe position to draw the vehicle on
[in]angleThe drawing angle of the vehicle

Definition at line 824 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(), MSBaseVehicle::getDevice(), GUIVisualizationSizeSettings::getExaggeration(), GUIGlObject::getGlID(), MSVehicleType::getGuiShape(), SUMOVehicle::getLane(), MSVehicleType::getLength(), MSVehicleType::getMinGap(), MSBaseVehicle::getParameter(), 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_MOPED, SVS_MOTORCYCLE, SVS_PEDESTRIAN, SVS_RAIL, SVS_RAIL_CARGO, SVS_SHIP, GUIVisualizationSettings::vehicleName, GUIVisualizationSettings::vehicleQuality, GUIVisualizationSettings::vehicleSize, Position::x(), and Position::y().

Referenced by drawAction_drawVehicleBlueLight(), drawGL(), and GUIEdge::drawMesoVehicles().

§ drawPoly()

void GUIBaseVehicle::drawPoly ( double *  poses,
SUMOReal  offset 
)
staticprotected

Definition at line 368 of file GUIBaseVehicle.cpp.

Referenced by drawAction_drawVehicleAsPoly().

§ drawRoute()

void GUIBaseVehicle::drawRoute ( const GUIVisualizationSettings s,
int  routeNo,
SUMOReal  darken 
) const

Chooses the route to draw and draws it, darkening it as given.

Parameters
[in]sThe visualisation settings, needed to determine the vehicle's color
[in]routeNoThe route to show (0: the current, >0: prior)
[in]darkenThe amount to darken the route by

Definition at line 1143 of file GUIBaseVehicle.cpp.

References drawRouteHelper(), GUIVisualizationSizeSettings::getExaggeration(), MSBaseVehicle::getRoute(), MSDevice_Vehroutes::getRoute(), myRoutes, myVehicle, setColor(), SUMOReal, and GUIVisualizationSettings::vehicleSize.

Referenced by drawGLAdditional().

§ drawRouteHelper()

virtual void GUIBaseVehicle::drawRouteHelper ( const MSRoute r,
SUMOReal  exaggeration 
) const
pure virtual

Draws the route.

Parameters
[in]rThe route to draw

Implemented in GUIMEVehicle, and GUIVehicle.

Referenced by drawRoute(), and getNaviDegree().

§ getAngle()

virtual SUMOReal GUIBaseVehicle::getAngle ( ) const
pure virtual

Returns the vehicle's direction in radians.

Returns
The vehicle's current angle

Implemented in GUIMEVehicle, and GUIVehicle.

Referenced by drawGL(), and getNaviDegree().

§ getCenteringBoundary()

Boundary GUIBaseVehicle::getCenteringBoundary ( ) const
virtual

Returns the boundary to which the view shall be centered in order to show the object.

Returns
The boundary the object is within
See also
GUIGlObject::getCenteringBoundary

Implements GUIGlObject.

Definition at line 326 of file GUIBaseVehicle.cpp.

References Boundary::add(), MSVehicleType::getLength(), getPosition(), MSBaseVehicle::getVehicleType(), Boundary::grow(), and myVehicle.

Referenced by drawAction_drawVehicleBlueLight().

§ getColorValue()

virtual SUMOReal GUIBaseVehicle::getColorValue ( int  activeScheme) const
pure virtual

gets the color value according to the current scheme index

Implemented in GUIVehicle, and GUIMEVehicle.

Referenced by getNaviDegree(), and setColor().

§ getFullName()

§ getGlID()

GUIGlID GUIGlObject::getGlID ( ) const
inherited

Returns the numerical id of the object.

Returns
This object's gl-id

Definition at line 125 of file GUIGlObject.cpp.

References GUIGlObject::myGlID.

Referenced by GNENet::addReversedEdge(), GUIMessageWindow::appendMsg(), GUIGlObject::buildSelectionPopupEntry(), GUINet::createTLWrapper(), GNENet::deleteConnection(), GNENet::deleteEdge(), GNENet::deleteJunction(), GNENet::deleteLane(), GNENet::deleteSingleEdge(), GNENet::deleteSingleJunction(), GUIVehicle::drawAction_drawPersonsAndContainers(), GNEDetectorExit::drawGL(), GNEDetectorEntry::drawGL(), GNEDetectorE1::drawGL(), GNEDetectorE2::drawGL(), GNEContainerStop::drawGL(), GNEBusStop::drawGL(), GNEDetectorE3::drawGL(), GNEInternalLane::drawGL(), GNECrossing::drawGL(), GNEJunction::drawGL(), GUIMEInductLoop::MyWrapper::drawGL(), GUIContainer::drawGL(), GNEVaporizer::drawGL(), GNEVariableSpeedSignal::drawGL(), GUIPerson::drawGL(), GUIPolygon::drawGL(), GUIInstantInductLoop::MyWrapper::drawGL(), GUILaneSpeedTrigger::drawGL(), GUICalibrator::drawGL(), GUIPointOfInterest::drawGL(), GNERouteProbe::drawGL(), GUIJunctionWrapper::drawGL(), GNEChargingStation::drawGL(), GNEEdge::drawGL(), GNELane::drawGL(), GUIE3Collector::MyWrapper::drawGL(), GUIChargingStation::drawGL(), GUIContainerStop::drawGL(), GNEPoly::drawGL(), GNEConnection::drawGL(), GUIBusStop::drawGL(), GNECalibrator::drawGL(), GUIEdge::drawGL(), GUI_E2_ZS_Collector::MyWrapper::drawGL(), GUIInductLoop::MyWrapper::drawGL(), GUITriggeredRerouter::GUITriggeredRerouterEdge::drawGL(), GUILane::drawGL(), GNERerouter::drawGL(), GUIContainer::drawGLAdditional(), GUIPerson::drawGLAdditional(), drawGLAdditional(), GUILane::drawLinkRule(), drawOnPos(), GUIMEVehicle::getColorValue(), GUIVehicle::getColorValue(), GUIJunctionWrapper::getColorValue(), GUIEdge::getColorValue(), GUIContainer::getColorValue(), GUIPerson::getColorValue(), GNEJunction::getColorValue(), GNELane::getColorValue(), GUILane::getColorValue(), GUIEdge::getIDs(), GNEEdge::getLaneGlIDs(), GUISUMOAbstractView::getObjectAtPosition(), GUISUMOAbstractView::getObjectsAtPosition(), GUIPerson::getPopUpMenu(), GNELane::getPopUpMenu(), getPopUpMenu(), GUIEdge::getScaleValue(), GUILane::getScaleValue(), GNECalibrator::GNECalibrator(), GNERouteProbe::GNERouteProbe(), GNEVaporizer::GNEVaporizer(), GUIDialog_GLObjChooser::GUIDialog_GLObjChooser(), GNESelectorFrame::handleIDs(), GNETLSEditorFrame::handleMultiChange(), GNEAdditional::isAdditionalSelected(), GUIGlChildWindow::isSelected(), GUISUMOViewParent::isSelected(), GNEViewParent::isSelected(), GUISelectedStorage::loadIDs(), GNEViewNet::mergeJunctions(), GUIViewTraffic::onCmdAddRerouter(), GUIGLObjectPopupMenu::onCmdAddSelected(), GUIGLObjectPopupMenu::onCmdCenter(), GUIViewTraffic::onCmdCloseEdge(), GUIViewTraffic::onCmdCloseLane(), GNEViewNet::onCmdDuplicateLane(), GUIApplicationWindow::onCmdEditChosen(), GUIGLObjectPopupMenu::onCmdRemoveSelected(), GNEViewNet::onCmdRevertRestriction(), GNEConnectorFrame::onCmdSelectDeadStarts(), GNEConnectorFrame::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().

§ getLastLaneChangeOffset()

virtual SUMOReal GUIBaseVehicle::getLastLaneChangeOffset ( ) const
pure virtual

Returns the time since the last lane change in seconds.

See also
MSVehicle::myLastLaneChangeOffset
Returns
The time since the last lane change in seconds

Implemented in GUIVehicle, and GUIMEVehicle.

Referenced by getNaviDegree().

§ getMicrosimID()

const std::string & GUIGlObject::getMicrosimID ( ) const
virtualinherited

Returns the id of the object as known to microsim.

Definition at line 139 of file GUIGlObject.cpp.

References GUIGlObject::myMicrosimID.

Referenced by GNEAdditional::changeEdge(), GNEAdditional::changeLane(), GNETLSEditorFrame::controlsEdge(), GUIGlObject::createFullName(), GNENet::deleteSingleEdge(), GNENet::deleteSingleJunction(), GUIGlObject::drawName(), GNEAdditional::getAdditionalID(), GNEPOI::getAttribute(), GNECrossing::getAttribute(), GNEConnection::getAttribute(), GNEJunction::getAttribute(), GNEPoly::getAttribute(), GNEEdge::getAttribute(), GNELane::getAttribute(), GNELane::getParentName(), GNENetElement::getParentName(), GNEDetectorE3::getParentName(), GNEVariableSpeedSignal::getParentName(), GNEVaporizer::getParentName(), GNEStoppingPlace::getParentName(), GNERouteProbe::getParentName(), GNEDetector::getParentName(), GNECalibrator::getParentName(), GNEAdditional::getParentName(), GNERerouter::getParentName(), GNEAdditional::getPopUpMenu(), GUIDialog_GLObjChooser::GUIDialog_GLObjChooser(), GNEConnectorFrame::handleLaneClick(), GNETLSEditorFrame::handleMultiChange(), GNEEdge::isValid(), GNEViewNet::mergeJunctions(), GNEPoly::moveGeometry(), GNEEdge::moveGeometry(), GUIGLObjectPopupMenu::onCmdAddSelected(), GUIGLObjectPopupMenu::onCmdCopyName(), GNEViewNet::onCmdNodeShape(), GNEViewNet::onLeftBtnPress(), GNEInspectorFrame::onUpdCopyTemplate(), GNENet::registerEdge(), GNENet::registerJunction(), GNENet::remapEdge(), GNEEdge::removeConnection(), GNENet::replaceJunctionByGeometry(), GNENet::retrieveAttributeCarriers(), GNEAdditional::setAdditionalID(), GNEEdge::setAttribute(), GNENet::splitEdge(), and GNEConnectorFrame::updateDescription().

§ getNaviDegree()

§ getParameterWindow()

virtual GUIParameterTableWindow* GUIBaseVehicle::getParameterWindow ( GUIMainWindow app,
GUISUMOAbstractView parent 
)
pure virtual

Returns an own parameter window.

Parameters
[in]appThe application needed to build the parameter window
[in]parentThe parent window needed to build the parameter window
Returns
The built parameter window
See also
GUIGlObject::getParameterWindow

Implements GUIGlObject.

Implemented in GUIVehicle, and GUIMEVehicle.

Referenced by getNaviDegree().

§ getParentName()

const std::string & GUIGlObject::getParentName ( ) const
virtualinherited

Returns the name of the parent object (if any)

Returns
This object's parent id

Reimplemented in GNERerouter, GNEAdditional, GNEAdditionalSet, GNECalibrator, GNEDetector, GNERouteProbe, GNEStoppingPlace, GNEVaporizer, GNEVariableSpeedSignal, GUILane, GNEDetectorE3, GNELane, and GNENetElement.

Definition at line 119 of file GUIGlObject.cpp.

References StringUtils::emptyString.

Referenced by GUIGLObjectPopupMenu::onCmdCopyEdgeName().

§ getPopUpMenu()

§ getPosition()

virtual Position GUIBaseVehicle::getPosition ( const SUMOReal  offset = 0) const
pure virtual

Return current position (x/y, cartesian)

If the vehicle's myLane is 0, Position::INVALID.

Parameters
[in]offsetoptional offset in longitudinal direction
Returns
The current position (in cartesian coordinates)
See also
myLane

Implemented in GUIMEVehicle, and GUIVehicle.

Referenced by drawGL(), and getCenteringBoundary().

§ getSeatPosition()

const Position & GUIBaseVehicle::getSeatPosition ( int  personIndex) const
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 1178 of file GUIBaseVehicle.cpp.

References MIN2(), and mySeatPositions.

Referenced by GUIVehicle::drawAction_drawPersonsAndContainers().

§ getStopInfo()

virtual std::string GUIBaseVehicle::getStopInfo ( ) const
pure virtual

retrieve information about the current stop state

Implemented in GUIVehicle, and GUIMEVehicle.

Referenced by getNaviDegree().

§ getType()

GUIGlObjectType GUIGlObject::getType ( ) const
inherited

Returns the type of the object as coded in GUIGlObjectType.

See also
GUIGlObjectType

Definition at line 152 of file GUIGlObject.cpp.

References GUIGlObject::myGLObjectType.

Referenced by GUIGlObject::buildSelectionPopupEntry(), GUIVehicle::drawAction_drawPersonsAndContainers(), GUIVehicle::drawAction_drawRailCarriages(), GUIPerson::drawAction_drawWalkingareaPath(), GNEAdditionalSet::drawConnections(), GNEDetector::drawDetectorIcon(), GNEDetectorExit::drawGL(), GNEDetectorEntry::drawGL(), GNEDetectorE1::drawGL(), GNEDetectorE2::drawGL(), GNEContainerStop::drawGL(), GNEBusStop::drawGL(), GNEDetectorE3::drawGL(), GNEJunction::drawGL(), GUIMEInductLoop::MyWrapper::drawGL(), GUIContainer::drawGL(), GUIPerson::drawGL(), GNEVaporizer::drawGL(), GNEVariableSpeedSignal::drawGL(), GUIInstantInductLoop::MyWrapper::drawGL(), GUILaneSpeedTrigger::drawGL(), GUICalibrator::drawGL(), GNERouteProbe::drawGL(), GUIJunctionWrapper::drawGL(), GNEChargingStation::drawGL(), GNEEdge::drawGL(), GNELane::drawGL(), GUIE3Collector::MyWrapper::drawGL(), GUIChargingStation::drawGL(), GUIContainerStop::drawGL(), GNEConnection::drawGL(), GNECalibrator::drawGL(), GUIBusStop::drawGL(), GUI_E2_ZS_Collector::MyWrapper::drawGL(), GUIInductLoop::MyWrapper::drawGL(), GUITriggeredRerouter::GUITriggeredRerouterEdge::drawGL(), GUILane::drawGL(), GNERerouter::drawGL(), GUIPerson::drawGLAdditional(), drawGLAdditional(), GNEAdditional::drawLockIcon(), drawOnPos(), GNEDetectorEntry::getAttribute(), GNEDetectorExit::getAttribute(), GNEDetectorE1::getAttribute(), GNEDetectorE2::getAttribute(), GNEContainerStop::getAttribute(), GNEBusStop::getAttribute(), GNEDetectorE3::getAttribute(), GNEVariableSpeedSignal::getAttribute(), GNEVaporizer::getAttribute(), GNERouteProbe::getAttribute(), GNEChargingStation::getAttribute(), GNECalibrator::getAttribute(), GNEJunction::getAttribute(), GNERerouter::getAttribute(), GUIJunctionWrapper::getColorValue(), GUIEdge::getColorValue(), GNEJunction::getColorValue(), GNELane::getColorValue(), GUILane::getColorValue(), GNEViewNet::getEdgeAtCursorPosition(), GNEViewNet::getEdgesAtCursorPosition(), GNEViewNet::getJunctionAtCursorPosition(), GNEViewNet::getLaneAtCurserPosition(), GUISUMOAbstractView::getObjectAtPosition(), GUISUMOAbstractView::getObjectsAtPosition(), GUIEdge::getScaleValue(), GUILane::getScaleValue(), GNESelectorFrame::handleIDs(), GNEAdditional::isAdditionalSelected(), GUIGlChildWindow::isSelected(), GUISUMOViewParent::isSelected(), GNEViewParent::isSelected(), GNEDetectorExit::isValid(), GNEDetectorEntry::isValid(), GNEDetectorE1::isValid(), GNEDetectorE2::isValid(), GNEBusStop::isValid(), GNEContainerStop::isValid(), GNEDetectorE3::isValid(), GNEVariableSpeedSignal::isValid(), GNEVaporizer::isValid(), GNERouteProbe::isValid(), GNEChargingStation::isValid(), GNECalibrator::isValid(), GNERerouter::isValid(), GUISelectedStorage::loadIDs(), GNEViewNet::mergeJunctions(), GUITrafficLightLogicWrapper::GUITrafficLightLogicWrapperPopupMenu::onCmdBegin2TrackPhases(), GNEConnectorFrame::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::onDoubleClicked(), GNEViewNet::onLeftBtnPress(), LayeredRTree::selectLayer(), GNEDetectorEntry::setAttribute(), GNEDetectorExit::setAttribute(), GNEDetectorE1::setAttribute(), GNEDetectorE2::setAttribute(), GNEContainerStop::setAttribute(), GNEBusStop::setAttribute(), GNEDetectorE3::setAttribute(), GNEVaporizer::setAttribute(), GNEVariableSpeedSignal::setAttribute(), GNERouteProbe::setAttribute(), GNEChargingStation::setAttribute(), GNECalibrator::setAttribute(), GNERerouter::setAttribute(), GNEJunction::setColor(), and GUISelectedStorage::toggleSelection().

§ getTypeParameterWindow()

virtual GUIParameterTableWindow* GUIBaseVehicle::getTypeParameterWindow ( GUIMainWindow app,
GUISUMOAbstractView parent 
)
pure virtual

Returns an own type parameter window.

Parameters
[in]appThe application needed to build the parameter window
[in]parentThe parent window needed to build the parameter window
Returns
The built parameter window

Reimplemented from GUIGlObject.

Implemented in GUIVehicle, and GUIMEVehicle.

Referenced by getNaviDegree().

§ hasActiveAddVisualisation()

bool GUIBaseVehicle::hasActiveAddVisualisation ( GUISUMOAbstractView *const  parent,
int  which 
) const

Returns whether the named feature is enabled in the given view.

Parameters
[in]parentThe view for which the feature may be enabled
[in]whichThe visualisation feature
Returns
see comment

Definition at line 1120 of file GUIBaseVehicle.cpp.

References myAdditionalVisualizations.

Referenced by drawAction_drawVehicleBlueLight(), drawGLAdditional(), and getPopUpMenu().

§ removeActiveAddVisualisation()

void GUIBaseVehicle::removeActiveAddVisualisation ( GUISUMOAbstractView *const  parent,
int  which 
)

§ removeParameterTable()

void GUIGlObject::removeParameterTable ( GUIParameterTableWindow w)
inherited

Lets this object know a parameter window showing the object's values was closed.

Parameters
[in]wThe closed parameter window

Definition at line 266 of file GUIGlObject.cpp.

References GUIGlObject::myParamWindows.

Referenced by GUIParameterTableWindow::~GUIParameterTableWindow().

§ selectBlockingFoes()

virtual void GUIBaseVehicle::selectBlockingFoes ( ) const
pure virtual

adds the blocking foes to the current selection

Implemented in GUIVehicle, and GUIMEVehicle.

Referenced by getNaviDegree(), and GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdShowFoes().

§ setColor()

void GUIBaseVehicle::setColor ( const GUIVisualizationSettings s) const
protected

§ setFunctionalColor()

§ setMicrosimID()

void GUIGlObject::setMicrosimID ( const std::string &  newID)
virtualinherited

Changes the microsimID of the object.

Note
happens in NETEDIT

Reimplemented in GNEEdge.

Definition at line 145 of file GUIGlObject.cpp.

References GUIGlObject::createFullName(), GUIGlObject::myFullName, and GUIGlObject::myMicrosimID.

Referenced by GNENet::renameJunction(), GNEAdditional::setAdditionalID(), GNELane::setIndex(), and GNEEdge::setMicrosimID().

§ setPrefix()

void GUIGlObject::setPrefix ( const std::string &  prefix)
protectedinherited

usually names are prefixed by a type-specific string. this method can be used to change the default

Definition at line 275 of file GUIGlObject.cpp.

References GUIGlObject::createFullName(), GUIGlObject::myFullName, and GUIGlObject::myPrefix.

Field Documentation

§ INVALID_ID

const GUIGlID GUIGlObject::INVALID_ID = 0
staticinherited

§ myAdditionalVisualizations

std::map<GUISUMOAbstractView*, int> GUIBaseVehicle::myAdditionalVisualizations

§ myCarriageLength

SUMOReal GUIBaseVehicle::myCarriageLength
mutableprotected

Variable to set with the length of the last drawn carriage or the vehicle length.

Definition at line 349 of file GUIBaseVehicle.h.

Referenced by drawOnPos().

§ myLock

MFXMutex GUIBaseVehicle::myLock
mutableprotected

The mutex used to avoid concurrent updates of the vehicle buffer.

Definition at line 346 of file GUIBaseVehicle.h.

Referenced by GUIVehicle::drawBestLanes(), and ~GUIBaseVehicle().

§ myRoutes

MSDevice_Vehroutes* GUIBaseVehicle::myRoutes
private

Definition at line 361 of file GUIBaseVehicle.h.

Referenced by drawRoute(), GUIBaseVehicle(), and ~GUIBaseVehicle().

§ mySeatPositions

PositionVector GUIBaseVehicle::mySeatPositions
mutableprotected

positions of seats in the vehicle (updated at every drawing step)

Definition at line 352 of file GUIBaseVehicle.h.

Referenced by GUIVehicle::computeSeats(), GUIVehicle::drawAction_drawRailCarriages(), drawOnPos(), getSeatPosition(), and GUIBaseVehicle().

§ myVehicle

MSBaseVehicle& GUIBaseVehicle::myVehicle
private

The vehicle to which all calls should be delegated.

Definition at line 356 of file GUIBaseVehicle.h.

Referenced by drawGLAdditional(), drawOnPos(), drawRoute(), getCenteringBoundary(), GUIBaseVehicle(), and setColor().

§ myVType

const MSVehicleType& GUIBaseVehicle::myVType
private

§ TypeNames

StringBijection< GUIGlObjectType > GUIGlObject::TypeNames
staticinherited

associates object types with strings

Definition at line 76 of file GUIGlObject.h.


The documentation for this class was generated from the following files: