Eclipse 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:
Collaboration diagram for GUIBaseVehicle:

Data Structures

class  GUIBaseVehiclePopupMenu
 

Public Member Functions

virtual void drawAction_drawCarriageClass (const GUIVisualizationSettings &s, bool asImage) const =0
 draws the given guiShape with distinct carriages/modules More...
 
virtual void drawAction_drawLinkItems (const GUIVisualizationSettings &) const
 
virtual void drawAction_drawPersonsAndContainers (const GUIVisualizationSettings &s) const
 
virtual void drawAction_drawVehicleBlinker (double) const
 
virtual void drawAction_drawVehicleBlueLight () const
 
virtual void drawAction_drawVehicleBrakeLight (double length, bool onlyOne=false) const
 
virtual void drawBestLanes () const
 Draws the vehicle's best lanes. More...
 
void drawName (const Position &pos, const double scale, const GUIVisualizationTextSettings &settings, const double angle=0) const
 draw name of item More...
 
virtual void drawRouteHelper (const GUIVisualizationSettings &s, const MSRoute &r, bool future, const RGBColor &col) const =0
 Draws the route. More...
 
virtual double getAngle () const =0
 Returns the vehicle's direction in radians. More...
 
virtual double getColorValue (const GUIVisualizationSettings &s, int activeScheme) const =0
 gets the color value according to the current scheme index More...
 
virtual double getLastLaneChangeOffset () const =0
 Returns the time since the last lane change in seconds. More...
 
double getNaviDegree () const
 return the current angle in navigational degrees More...
 
int getNumContainers () const
 return the number of passengers More...
 
int getNumPassengers () const
 return the number of passengers More...
 
virtual GUIParameterTableWindowgetParameterWindow (GUIMainWindow &app, GUISUMOAbstractView &parent)=0
 Returns an own parameter window. More...
 
virtual Position getPosition (const double 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 onLeftBtnPress (void *)
 notify object about left click More...
 
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...
 
void removedPopupMenu ()
 notify object about popup menu removal More...
 
Boundary getCenteringBoundary () const
 Returns the boundary to which the view shall be centered in order to show the object. More...
 
const std::string getOptionalName () const
 Returns the value for generic parameter 'name' or ''. More...
 
void drawOnPos (const GUIVisualizationSettings &s, const Position &pos, const double 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 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, RGBColor &col)
 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

void buildAdditionalsPopupOptions (GUIMainWindow &app, GUIGLObjectPopupMenu *ret, const std::string &type)
 build basic additional popup options. Used to unify pop-ups menu in netedit and SUMO-GUI More...
 
void buildShapePopupOptions (GUIMainWindow &app, GUIGLObjectPopupMenu *ret, const std::string &type)
 build basic shape popup options. Used to unify pop-ups menu in netedit and SUMO-GUI More...
 
void computeSeats (const Position &front, const Position &back, int maxSeats, double exaggeration, int &requiredSeats) const
 add seats to mySeatPositions and update requiredSeats More...
 
bool drawAction_drawVehicleAsPolyWithCarriagges (const GUIVisualizationSettings &s, bool asImage=false) const
 draw vehicle body and return whether carriages are being drawn More...
 
const PositiongetSeatPosition (int personIndex) const
 returns the seat position for the person with the given index More...
 
const MSVehicleTypegetVType () const
 A shortcut to myVehicle.myType. More...
 
RGBColor setColor (const GUIVisualizationSettings &s) const
 sets the color according to the currente settings 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, double exagerate)
 

Protected Attributes

FXMutex 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 Member Functions

std::string createFullName () const
 create full name More...
 

Private Attributes

std::string myFullName
 full name of GL Object More...
 
GUIGlID myGlID
 The numerical id of the object. More...
 
const GUIGlObjectType myGLObjectType
 The type of the object. More...
 
std::string myMicrosimID
 ID of GL object. More...
 
std::set< GUIParameterTableWindow * > myParamWindows
 Parameter table windows which refer to this object. More...
 
GUIGLObjectPopupMenumyPopup
 current popup (to clean up in destructor). GUIBaseVehicle is not responsible for removal More...
 
MSDevice_VehroutesmyRoutes
 
MSBaseVehiclemyVehicle
 The vehicle to which all calls should be delegated. More...
 

Static Private Attributes

static StringBijection< GUIGlObjectType >::Entry GUIGlObjectTypeNamesInitializer []
 LinkStates (Currently unused) More...
 

Additional visualisations

enum  VisualisationFeatures {
  VO_SHOW_BEST_LANES = 1, VO_SHOW_ROUTE = 2, VO_SHOW_ALL_ROUTES = 4, VO_SHOW_LFLINKITEMS = 8,
  VO_DRAW_OUTSIDE_NETWORK = 16, VO_SHOW_FUTURE_ROUTE = 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, double darken, bool future=false) const
 Chooses the route to draw and draws it, darkening it as given. More...
 

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 61 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_SHOW_LFLINKITEMS 

LFLinkItems.

VO_DRAW_OUTSIDE_NETWORK 

draw vehicle outside the road network

VO_SHOW_FUTURE_ROUTE 

show vehicle's current continued from the current position

Definition at line 287 of file GUIBaseVehicle.h.

Constructor & Destructor Documentation

◆ GUIBaseVehicle()

◆ ~GUIBaseVehicle()

Member Function Documentation

◆ addActiveAddVisualisation()

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

Adds the named visualisation feature to the given view.

Parameters
[in]parentThe view for which the feature shall be enabled
[in]whichThe visualisation feature to enable
See also
GUISUMOAbstractView::addAdditionalGLVisualisation

Definition at line 701 of file GUIBaseVehicle.cpp.

References GUISUMOAbstractView::addAdditionalGLVisualisation(), and myAdditionalVisualizations.

Referenced by GUIViewTraffic::onGamingClick().

◆ addParameterTable()

void GUIGlObject::addParameterTable ( GUIParameterTableWindow w)
inherited

◆ buildAdditionalsPopupOptions()

void GUIGlObject::buildAdditionalsPopupOptions ( GUIMainWindow app,
GUIGLObjectPopupMenu ret,
const std::string &  type 
)
protectedinherited

◆ buildCenterPopupEntry()

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

◆ buildNameCopyPopupEntry()

◆ buildPopupHeader()

void GUIGlObject::buildPopupHeader ( GUIGLObjectPopupMenu ret,
GUIMainWindow app,
bool  addSeparator = true 
)
protectedinherited

◆ buildPositionCopyEntry()

void GUIGlObject::buildPositionCopyEntry ( GUIGLObjectPopupMenu ret,
bool  addSeparator = true 
)
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.

Parameters
[in,filled]ret The popup menu to add the entry to
[in]addSeparatorWhether a separator shall be added, too

Definition at line 266 of file GUIGlObject.cpp.

References GeoConvHelper::getFinal(), MID_COPY_CURSOR_GEOPOSITION, and MID_COPY_CURSOR_POSITION.

Referenced by GUIGlObject::buildAdditionalsPopupOptions(), GUIGlObject::buildShapePopupOptions(), GUIDetectorWrapper::getPopUpMenu(), GUITrafficLightLogicWrapper::getPopUpMenu(), GUIPerson::getPopUpMenu(), GUIContainer::getPopUpMenu(), GUILaneSpeedTrigger::getPopUpMenu(), GUIPolygon::getPopUpMenu(), GUICalibrator::getPopUpMenu(), GUIJunctionWrapper::getPopUpMenu(), GNECrossing::getPopUpMenu(), GUITriggeredRerouter::getPopUpMenu(), GUIContainerStop::getPopUpMenu(), GUIBusStop::getPopUpMenu(), GUIChargingStation::getPopUpMenu(), GNEJunction::getPopUpMenu(), GUIParkingArea::getPopUpMenu(), GUIEdge::getPopUpMenu(), GNEConnection::getPopUpMenu(), GNELane::getPopUpMenu(), GUINet::getPopUpMenu(), GNENet::getPopUpMenu(), GNERide::getPopUpMenu(), GNEPersonTrip::getPopUpMenu(), GNEWalk::getPopUpMenu(), getPopUpMenu(), GNEEdge::getPopUpMenu(), GNERoute::getPopUpMenu(), GUILane::getPopUpMenu(), GNEAdditional::getPopUpMenu(), GNEDemandElement::getPopUpMenu(), GNEPerson::GNESelectedPersonsPopupMenu::GNESelectedPersonsPopupMenu(), and GNEVehicle::GNESelectedVehiclesPopupMenu::GNESelectedVehiclesPopupMenu().

◆ buildSelectionPopupEntry()

◆ buildShapePopupOptions()

void GUIGlObject::buildShapePopupOptions ( GUIMainWindow app,
GUIGLObjectPopupMenu ret,
const std::string &  type 
)
protectedinherited

◆ buildShowManipulatorPopupEntry()

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

Builds an entry which allows to open the manipulator window.

Parameters
[in,filled]ret The popup menu to add the entry to
[in]addSeparatorWhether a separator shall be added, too

Definition at line 278 of file GUIGlObject.cpp.

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

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

◆ buildShowParamsPopupEntry()

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

◆ buildShowTypeParamsPopupEntry()

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

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

Parameters
[in,filled]ret The popup menu to add the entry to
[in]addSeparatorWhether a separator shall be added, too

Definition at line 257 of file GUIGlObject.cpp.

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

Referenced by GUIPerson::getPopUpMenu(), GUIContainer::getPopUpMenu(), and getPopUpMenu().

◆ computeSeats()

void GUIBaseVehicle::computeSeats ( const Position front,
const Position back,
int  maxSeats,
double  exaggeration,
int &  requiredSeats 
) const
protected

◆ createFullName()

std::string GUIGlObject::createFullName ( ) const
privateinherited

◆ drawAction_drawCarriageClass()

virtual void GUIBaseVehicle::drawAction_drawCarriageClass ( const GUIVisualizationSettings s,
bool  asImage 
) const
pure virtual

draws the given guiShape with distinct carriages/modules

Implemented in GUIVehicle, and GUIMEVehicle.

Referenced by drawAction_drawVehicleAsPolyWithCarriagges().

◆ drawAction_drawLinkItems()

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

Reimplemented in GUIVehicle.

Definition at line 134 of file GUIBaseVehicle.h.

Referenced by drawGLAdditional().

◆ drawAction_drawPersonsAndContainers()

◆ drawAction_drawVehicleAsPolyWithCarriagges()

bool GUIBaseVehicle::drawAction_drawVehicleAsPolyWithCarriagges ( const GUIVisualizationSettings s,
bool  asImage = false 
) const
protected

draw vehicle body and return whether carriages are being drawn

Definition at line 783 of file GUIBaseVehicle.cpp.

References drawAction_drawCarriageClass(), GUIBaseVehicleHelper::drawAction_drawVehicleAsImage(), GUIBaseVehicleHelper::drawAction_drawVehicleAsPoly(), and getVType().

Referenced by drawOnPos().

◆ drawAction_drawVehicleBlinker()

virtual void GUIBaseVehicle::drawAction_drawVehicleBlinker ( double  ) const
inlinevirtual

Reimplemented in GUIVehicle.

Definition at line 129 of file GUIBaseVehicle.h.

Referenced by drawOnPos().

◆ drawAction_drawVehicleBlueLight()

virtual void GUIBaseVehicle::drawAction_drawVehicleBlueLight ( ) const
inlinevirtual

Reimplemented in GUIVehicle.

Definition at line 138 of file GUIBaseVehicle.h.

Referenced by drawOnPos().

◆ drawAction_drawVehicleBrakeLight()

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

Reimplemented in GUIVehicle.

Definition at line 130 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 137 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 535 of file GUIBaseVehicle.cpp.

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

Referenced by 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 541 of file GUIBaseVehicle.cpp.

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

◆ drawLinkItem()

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

◆ drawName()

◆ drawOnPos()

void GUIBaseVehicle::drawOnPos ( const GUIVisualizationSettings s,
const Position pos,
const double  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 339 of file GUIBaseVehicle.cpp.

References GUIVisualizationSettings::angle, computeSeats(), drawAction_drawPersonsAndContainers(), GUIBaseVehicleHelper::drawAction_drawVehicleAsBoxPlus(), drawAction_drawVehicleAsPolyWithCarriagges(), GUIBaseVehicleHelper::drawAction_drawVehicleAsTrianglePlus(), drawAction_drawVehicleBlinker(), drawAction_drawVehicleBlueLight(), drawAction_drawVehicleBrakeLight(), GUIVisualizationSettings::drawBrakeGap, GUIVisualizationSettings::drawLaneChangePreference, GUIVisualizationSettings::drawMinGap, GUIGlObject::drawName(), GLHelper::drawOutlineCircle(), GLHelper::drawTextSettings(), GUIPropertySchemeStorage< T >::getActive(), getColorValue(), MSVehicleType::getContainerCapacity(), MSBaseVehicle::getDevice(), GUIVisualizationSizeSettings::getExaggeration(), GUIGlObject::getGlID(), MSVehicleType::getLength(), MSVehicleType::getMinGap(), getNumContainers(), getNumPassengers(), Parameterised::getParameter(), MSBaseVehicle::getParameter(), MSVehicleType::getPersonCapacity(), MSDevice_BTreceiver::getRange(), SUMOTrafficObject::getSpeed(), GUIGlObject::getType(), StringTokenizer::getVector(), getVType(), MSGlobals::gUseMesoSim, SUMOVehicleParameter::line, M_PI, MAX2(), MIN2(), mySeatPositions, myVehicle, StringTokenizer::NEWLINE, RAD2DEG, GUIVisualizationSettings::scale, GUIVisualizationTextSettings::scaledSize(), setColor(), GUIVisualizationTextSettings::show, GUIVisualizationSettings::showBlinker, GUIVisualizationSettings::showBTRange, SVS_ANT, SVS_BICYCLE, SVS_EMERGENCY, SVS_MOPED, SVS_MOTORCYCLE, SVS_PEDESTRIAN, SVS_RAIL, SVS_RAIL_CAR, SVS_RAIL_CARGO, SVS_SHIP, toString(), GUIVisualizationSettings::vehicleColorer, GUIVisualizationSettings::vehicleName, GUIVisualizationSettings::vehicleQuality, GUIVisualizationSettings::vehicleSize, GUIVisualizationSettings::vehicleText, GUIVisualizationSettings::vehicleTextParam, GUIVisualizationSettings::vehicleValue, Position::x(), and Position::y().

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

◆ drawRoute()

void GUIBaseVehicle::drawRoute ( const GUIVisualizationSettings s,
int  routeNo,
double  darken,
bool  future = false 
) 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 721 of file GUIBaseVehicle.cpp.

References RGBColor::changedBrightness(), drawRouteHelper(), MSBaseVehicle::getRoute(), MSDevice_Vehroutes::getRoute(), myRoutes, myVehicle, GLHelper::setColor(), and setColor().

Referenced by drawGLAdditional().

◆ drawRouteHelper()

virtual void GUIBaseVehicle::drawRouteHelper ( const GUIVisualizationSettings s,
const MSRoute r,
bool  future,
const RGBColor col 
) const
pure virtual

Draws the route.

Parameters
[in]rThe route to draw

Implemented in GUIMEVehicle, and GUIVehicle.

Referenced by drawRoute().

◆ getAngle()

virtual double 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 324 of file GUIBaseVehicle.cpp.

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

◆ getColorValue()

virtual double GUIBaseVehicle::getColorValue ( const GUIVisualizationSettings s,
int  activeScheme 
) const
pure virtual

gets the color value according to the current scheme index

Reimplemented from GUIGlObject.

Implemented in GUIVehicle, and GUIMEVehicle.

Referenced by drawOnPos(), 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 149 of file GUIGlObject.cpp.

References GUIGlObject::myGlID.

Referenced by GUIMessageWindow::appendMsg(), GUIGlObject::buildSelectionPopupEntry(), drawAction_drawPersonsAndContainers(), GNEEdge::drawEdgeName(), GNEEdge::drawGeometryPoints(), GNEBusStop::drawGL(), GNEContainerStop::drawGL(), GNEChargingStation::drawGL(), GNEParkingArea::drawGL(), GNEVaporizer::drawGL(), GNERouteProbe::drawGL(), GNEDetectorE1::drawGL(), GNEDetectorE3::drawGL(), GNEDetectorEntryExit::drawGL(), GNEInternalLane::drawGL(), GNEParkingSpace::drawGL(), GNEVariableSpeedSign::drawGL(), GNEDetectorE1Instant::drawGL(), GNERerouter::drawGL(), GNEAccess::drawGL(), GUILaneSpeedTrigger::drawGL(), GUIPerson::drawGL(), GUIPolygon::drawGL(), GNECrossing::drawGL(), GUIContainer::drawGL(), GUICalibrator::drawGL(), GNEJunction::drawGL(), GUIPointOfInterest::drawGL(), GUIJunctionWrapper::drawGL(), GNECalibrator::drawGL(), GNEDetectorE2::drawGL(), GUIChargingStation::drawGL(), GNETAZ::drawGL(), GUIContainerStop::drawGL(), GUIBusStop::drawGL(), GNEConnection::drawGL(), GUIParkingArea::drawGL(), GUIEdge::drawGL(), GNELane::drawGL(), GNEStop::drawGL(), GUITriggeredRerouter::GUITriggeredRerouterEdge::drawGL(), GUILane::drawGL(), GNEPerson::drawGL(), GNEVehicle::drawGL(), GUIPerson::drawGLAdditional(), GUIContainer::drawGLAdditional(), drawGLAdditional(), GUILane::drawLinkRule(), drawOnPos(), GNELane::drawPartialE2DetectorPlan(), GNEEdge::drawPartialPersonPlan(), GNEEdge::drawPartialRoute(), GNEEdge::drawRerouterSymbol(), GNELane::drawVSSSymbol(), GUIMEVehicle::getColorValue(), GUIVehicle::getColorValue(), GUIJunctionWrapper::getColorValue(), GUIEdge::getColorValue(), GUIContainer::getColorValue(), GUIPerson::getColorValue(), GNEPoly::getGlID(), GNEPOI::getGlID(), GUISUMOAbstractView::getGUIGlObjectsAtPosition(), GUIEdge::getIDs(), GUISUMOAbstractView::getObjectAtPosition(), GUISUMOAbstractView::getObjectsAtPosition(), GUIPerson::getPopUpMenu(), GUIContainer::getPopUpMenu(), getPopUpMenu(), GUIEdge::getScaleValue(), GUILane::isLaneOrEdgeSelected(), GUIGlChildWindow::isSelected(), GUISelectedStorage::isSelected(), GUISUMOViewParent::isSelected(), GUIVehicle::isSelected(), GUIPerson::isSelected(), GUIEdge::isSelected(), GUILane::isSelected(), GUISelectedStorage::loadIDs(), GNEViewNet::mergeJunctions(), GUIViewTraffic::onCmdAddRerouter(), GUIGLObjectPopupMenu::onCmdAddSelected(), GUIGLObjectPopupMenu::onCmdCenter(), GUIViewTraffic::onCmdCloseEdge(), GUIViewTraffic::onCmdCloseLane(), GUIApplicationWindow::onCmdEditChosen(), GNESelectorFrame::SelectionOperation::onCmdLoad(), GUIGLObjectPopupMenu::onCmdRemoveSelected(), GUIViewTraffic::onCmdShowReachability(), GUIContainer::GUIContainerPopupMenu::onCmdStartTrack(), GUIPerson::GUIPersonPopupMenu::onCmdStartTrack(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdStartTrack(), GUIViewTraffic::onGamingClick(), GUIDialog_GLObjChooser::refreshList(), GLObjectValuePassConnector< std::pair< SUMOTime, MSPhaseDefinition > >::removeObject(), GNENetElement::selectAttributeCarrier(), GNEVehicleType::selectAttributeCarrier(), GNEStop::selectAttributeCarrier(), GNERide::selectAttributeCarrier(), GNEPersonTrip::selectAttributeCarrier(), GNEWalk::selectAttributeCarrier(), GNERoute::selectAttributeCarrier(), GNEPerson::selectAttributeCarrier(), GNEAdditional::selectAttributeCarrier(), GNEVehicle::selectAttributeCarrier(), GUIVehicle::selectBlockingFoes(), GUIPointOfInterest::setColor(), GUIPolygon::setColor(), GUIMessageWindow::setCursorPos(), GNENetElement::unselectAttributeCarrier(), GNEVehicleType::unselectAttributeCarrier(), GNEStop::unselectAttributeCarrier(), GNERide::unselectAttributeCarrier(), GNEPersonTrip::unselectAttributeCarrier(), GNEWalk::unselectAttributeCarrier(), GNERoute::unselectAttributeCarrier(), GNEPerson::unselectAttributeCarrier(), GNEAdditional::unselectAttributeCarrier(), GNEVehicle::unselectAttributeCarrier(), ~GUIBaseVehicle(), GUIGlObject::~GUIGlObject(), and GUIPerson::~GUIPerson().

◆ getLastLaneChangeOffset()

virtual double 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.

◆ getMicrosimID()

◆ getNaviDegree()

double GUIBaseVehicle::getNaviDegree ( ) const
inline

return the current angle in navigational degrees

Definition at line 85 of file GUIBaseVehicle.h.

References getAngle(), and GeomHelper::naviDegree().

Referenced by GUIVehicle::getParameterWindow(), and GUIMEVehicle::getParameterWindow().

◆ getNumContainers()

int GUIBaseVehicle::getNumContainers ( ) const

return the number of passengers

Definition at line 808 of file GUIBaseVehicle.cpp.

References MSBaseVehicle::getContainerDevice(), myVehicle, and MSDevice_Transportable::size().

Referenced by GUIVehicle::drawAction_drawCarriageClass(), and drawOnPos().

◆ getNumPassengers()

int GUIBaseVehicle::getNumPassengers ( ) const

return the number of passengers

Definition at line 799 of file GUIBaseVehicle.cpp.

References MSBaseVehicle::getPersonDevice(), myVehicle, and MSDevice_Transportable::size().

Referenced by GUIVehicle::drawAction_drawCarriageClass(), and drawOnPos().

◆ getOptionalName()

const std::string GUIBaseVehicle::getOptionalName ( ) const
virtual

Returns the value for generic parameter 'name' or ''.

Reimplemented from GUIGlObject.

Definition at line 333 of file GUIBaseVehicle.cpp.

References Parameterised::getParameter(), MSBaseVehicle::getParameter(), and myVehicle.

◆ 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 GUIMEVehicle, and GUIVehicle.

◆ getParentName()

◆ getPopUpMenu()

◆ getPosition()

virtual Position GUIBaseVehicle::getPosition ( const double  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 736 of file GUIBaseVehicle.cpp.

References MIN2(), and mySeatPositions.

Referenced by drawAction_drawPersonsAndContainers().

◆ getStopInfo()

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

retrieve information about the current stop state

Implemented in GUIVehicle, and GUIMEVehicle.

◆ getType()

GUIGlObjectType GUIGlObject::getType ( ) const
inherited

Returns the type of the object as coded in GUIGlObjectType.

See also
GUIGlObjectType

Definition at line 180 of file GUIGlObject.cpp.

References GUIGlObject::myGLObjectType.

Referenced by GUIGlObject::buildSelectionPopupEntry(), GUIVehicle::drawAction_drawCarriageClass(), GUIVehicle::drawAction_drawLinkItems(), drawAction_drawPersonsAndContainers(), GUIPerson::drawAction_drawWalkingareaPath(), GNECalibrator::drawCalibratorSymbol(), GNEContainerStop::drawGL(), GNEBusStop::drawGL(), GNEChargingStation::drawGL(), GNEParkingArea::drawGL(), GNEVaporizer::drawGL(), GNERouteProbe::drawGL(), GNEDetectorE1::drawGL(), GNEDetectorE3::drawGL(), GNEDetectorEntryExit::drawGL(), GNEParkingSpace::drawGL(), GNEVariableSpeedSign::drawGL(), GNEDetectorE1Instant::drawGL(), GNEAccess::drawGL(), GNERerouter::drawGL(), GUILaneSpeedTrigger::drawGL(), GUIPerson::drawGL(), GNECrossing::drawGL(), GUIContainer::drawGL(), GUICalibrator::drawGL(), GNEJunction::drawGL(), GUIJunctionWrapper::drawGL(), GNEDetectorE2::drawGL(), GUIChargingStation::drawGL(), GUIContainerStop::drawGL(), GUIBusStop::drawGL(), GNEConnection::drawGL(), GUIParkingArea::drawGL(), GNELane::drawGL(), GNEStop::drawGL(), GNEPoly::drawGL(), GNEPOI::drawGL(), GUITriggeredRerouter::GUITriggeredRerouterEdge::drawGL(), GUILane::drawGL(), GNEPerson::drawGL(), GNEVehicle::drawGL(), GUIPerson::drawGLAdditional(), drawGLAdditional(), drawOnPos(), GNELane::drawPartialE2DetectorPlan(), GNEEdge::drawPartialPersonPlan(), GNEEdge::drawPartialRoute(), GNEEdge::drawPartialTripFromTo(), GNEEdge::drawRerouterSymbol(), GNEJunction::drawTLSIcon(), GNELane::drawVSSSymbol(), GNEJunction::getAttribute(), GNEViewNet::getAttributeCarriersInBoundary(), GUIJunctionWrapper::getColorValue(), GUIEdge::getColorValue(), GNEViewNet::getConnectionAtPopupPosition(), GNEViewNet::getCrossingAtPopupPosition(), GNEViewNet::getEdgeAtPopupPosition(), GNEViewNet::getJunctionAtPopupPosition(), GNEViewNet::getLaneAtPopupPosition(), GUISUMOAbstractView::getObjectAtPosition(), GUISUMOAbstractView::getObjectsAtPosition(), GUIEdge::getScaleValue(), GUIGlChildWindow::isSelected(), GUISelectedStorage::isSelected(), GUISUMOViewParent::isSelected(), GUISelectedStorage::loadIDs(), GNEViewNet::mergeJunctions(), GUIGLObjectPopupMenu::onCmdCopyEdgeName(), GNESelectorFrame::SelectionOperation::onCmdLoad(), GNESelectorFrame::SelectionOperation::onCmdSave(), GUISUMOViewParent::onCmdSpeedFactor(), GUISUMOAbstractView::onLeftBtnPress(), GUISUMOViewParent::onUpdSpeedFactor(), GNENetElement::selectAttributeCarrier(), GNERide::selectAttributeCarrier(), GNEPersonTrip::selectAttributeCarrier(), GNEWalk::selectAttributeCarrier(), GNERoute::selectAttributeCarrier(), GNEPerson::selectAttributeCarrier(), GNEVehicle::selectAttributeCarrier(), LayeredRTree::selectLayer(), GNEJunction::setAttribute(), GUISUMOAbstractView::showToolTipFor(), GUISelectedStorage::toggleSelection(), GNENetElement::unselectAttributeCarrier(), GNERide::unselectAttributeCarrier(), GNEPersonTrip::unselectAttributeCarrier(), GNEWalk::unselectAttributeCarrier(), GNERoute::unselectAttributeCarrier(), GNEPerson::unselectAttributeCarrier(), and GNEVehicle::unselectAttributeCarrier().

◆ 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 GUIMEVehicle, and GUIVehicle.

◆ getVType()

const MSVehicleType& GUIBaseVehicle::getVType ( ) const
inlineprotected

◆ 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 695 of file GUIBaseVehicle.cpp.

References myAdditionalVisualizations.

Referenced by drawGLAdditional(), and getPopUpMenu().

◆ onLeftBtnPress()

virtual void GUIGlObject::onLeftBtnPress ( void *  )
inlinevirtualinherited

notify object about left click

Reimplemented in GUITriggeredRerouter::GUITriggeredRerouterEdge.

Definition at line 165 of file GUIGlObject.h.

Referenced by GUISUMOAbstractView::onLeftBtnPress().

◆ removeActiveAddVisualisation()

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

Adds the named visualisation feature to the given view.

Parameters
[in]parentThe view for which the feature shall be enabled
[in]whichThe visualisation feature to enable
See also
GUISUMOAbstractView::removeAdditionalGLVisualisation

Reimplemented from GUIGlObject.

Definition at line 711 of file GUIBaseVehicle.cpp.

References myAdditionalVisualizations, and GUISUMOAbstractView::removeAdditionalGLVisualisation().

Referenced by GUIViewTraffic::onGamingRightClick().

◆ removedPopupMenu()

void GUIBaseVehicle::removedPopupMenu ( )
virtual

notify object about popup menu removal

Reimplemented from GUIGlObject.

Definition at line 319 of file GUIBaseVehicle.cpp.

References myPopup.

◆ 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 293 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 GUIMEVehicle, and GUIVehicle.

◆ setColor()

◆ setFunctionalColor()

◆ setMicrosimID()

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

Field Documentation

◆ GUIGlObjectTypeNamesInitializer

StringBijection< GUIGlObjectType >::Entry GUIGlObject::GUIGlObjectTypeNamesInitializer
staticprivateinherited

LinkStates (Currently unused)

vector for TypeNames Initializer

Definition at line 277 of file GUIGlObject.h.

◆ INVALID_ID

◆ myAdditionalVisualizations

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

◆ myFullName

std::string GUIGlObject::myFullName
privateinherited

full name of GL Object

Definition at line 260 of file GUIGlObject.h.

Referenced by GUIGlObject::getFullName(), GUIGlObject::GUIGlObject(), and GUIGlObject::setMicrosimID().

◆ myGlID

GUIGlID GUIGlObject::myGlID
privateinherited

The numerical id of the object.

Definition at line 251 of file GUIGlObject.h.

Referenced by GUIGlObject::getGlID(), and GUIGlObject::GUIGlObject().

◆ myGLObjectType

const GUIGlObjectType GUIGlObject::myGLObjectType
privateinherited

The type of the object.

Definition at line 254 of file GUIGlObject.h.

Referenced by GUIGlObject::createFullName(), GUIGlObject::getType(), and GUIGlObject::GUIGlObject().

◆ myLock

FXMutex GUIBaseVehicle::myLock
mutableprotected

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

Definition at line 342 of file GUIBaseVehicle.h.

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

◆ myMicrosimID

std::string GUIGlObject::myMicrosimID
privateinherited

ID of GL object.

Definition at line 257 of file GUIGlObject.h.

Referenced by GUIGlObject::getMicrosimID(), and GUIGlObject::setMicrosimID().

◆ myParamWindows

std::set<GUIParameterTableWindow*> GUIGlObject::myParamWindows
privateinherited

Parameter table windows which refer to this object.

Definition at line 263 of file GUIGlObject.h.

Referenced by GUIGlObject::addParameterTable(), GUIGlObject::removeParameterTable(), and GUIGlObject::~GUIGlObject().

◆ myPopup

GUIGLObjectPopupMenu* GUIBaseVehicle::myPopup
private

current popup (to clean up in destructor). GUIBaseVehicle is not responsible for removal

Definition at line 354 of file GUIBaseVehicle.h.

Referenced by getPopUpMenu(), removedPopupMenu(), and ~GUIBaseVehicle().

◆ myRoutes

MSDevice_Vehroutes* GUIBaseVehicle::myRoutes
private

Definition at line 351 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 345 of file GUIBaseVehicle.h.

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

◆ myVehicle

◆ TypeNames

StringBijection< GUIGlObjectType > GUIGlObject::TypeNames
staticinherited

associates object types with strings

Definition at line 68 of file GUIGlObject.h.

Referenced by GUIGlObject::createFullName(), and GNESelectorFrame::SelectionOperation::onCmdSave().


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