76 typedef std::vector<Seat>
Seats;
362 void computeSeats(
const Position& front,
const Position& back,
double seatOffset,
int maxSeats,
double exaggeration,
int& requiredSeats,
Seats& into,
double extraOffset = 0)
const;
std::shared_ptr< const MSRoute > ConstMSRoutePtr
A class that stores a 2D geometrical boundary.
A MSVehicle extended by some values for usage within the gui.
const Seat & getContainerPosition(int containerIndex) const
static bool setFunctionalColor(int activeScheme, const MSBaseVehicle *veh, RGBColor &col)
sets the color according to the current scheme index and some vehicle function
virtual void drawAction_drawLinkItems(const GUIVisualizationSettings &) const
const Seat & getSeatPosition(int personIndex) const
returns the seat position for the person with the given index
RGBColor setColor(const GUIVisualizationSettings &s) const
sets the color according to the current settings
int getNumContainers() const
return the number of passengers
void drawOnPos(const GUIVisualizationSettings &s, const Position &pos, const double angle) const
Draws the object on the specified position with the specified angle.
double getExaggeration(const GUIVisualizationSettings &s) const override
return exaggeration associated with this GLObject
GUIGLObjectPopupMenu * myPopup
current popup (to clean up in destructor). GUIBaseVehicle is not responsible for removal
virtual double getLastLaneChangeOffset() const =0
Returns the time since the last lane change in seconds.
void drawParkingInfo(const GUIVisualizationSettings &s) const
MSDevice_Vehroutes * myRoutes
virtual void drawAction_drawPersonsAndContainers(const GUIVisualizationSettings &s) const
virtual void drawAction_drawCarriageClass(const GUIVisualizationSettings &s, double scaledLength, bool asImage) const =0
draws the given guiShape with distinct carriages/modules
void removedPopupMenu() override
notify object about popup menu removal
bool hasActiveAddVisualisation(GUISUMOAbstractView *const parent, int which) const
Returns whether the named feature is enabled in the given view.
virtual void drawRouteHelper(const GUIVisualizationSettings &s, ConstMSRoutePtr r, bool future, bool noLoop, const RGBColor &col) const =0
Draws the route.
void drawRoute(const GUIVisualizationSettings &s, int routeNo, double darken, bool future=false, bool noLoop=false) const
Chooses the route to draw and draws it, darkening it as given.
virtual Position getVisualPosition(bool s2, const double offset=0) const =0
Return current position taking into account secondary shape.
std::vector< Seat > Seats
MSBaseVehicle & myVehicle
The vehicle to which all calls should be delegated.
virtual void drawAction_drawVehicleBlinker(double) const
virtual Boundary getCenteringBoundary() const override
Returns the boundary to which the view shall be centered in order to show the object.
void drawGL(const GUIVisualizationSettings &s) const override
Draws the object.
const std::string getOptionalName() const override
Returns the value for generic parameter 'name' or ''.
virtual void drawGLAdditional(GUISUMOAbstractView *const parent, const GUIVisualizationSettings &s) const override
Draws additionally triggered visualisations.
void addActiveAddVisualisation(GUISUMOAbstractView *const parent, int which)
Adds the named visualisation feature to the given view.
static void drawLinkItem(const Position &pos, SUMOTime arrivalTime, SUMOTime leaveTime, double exagerate)
double getScaleValue(const GUIVisualizationSettings &s, int activeScheme) const
gets the size multiplier value according to the current scheme index
virtual void drawBestLanes() const
Draws the vehicle's best lanes.
void drawChargingInfo(const GUIVisualizationSettings &s) const
VisualisationFeatures
Additional visualisation feature ids.
@ VO_SHOW_LFLINKITEMS
LFLinkItems.
@ VO_SHOW_ALL_ROUTES
show all vehicle's routes
@ VO_TRACK
track the vehicle (only needed for cleaning up)
@ VO_SHOW_ROUTE_NOLOOP
show vehicle's routes without loops
@ VO_DRAW_OUTSIDE_NETWORK
draw vehicle outside the road network
@ VO_SHOW_FUTURE_ROUTE
show vehicle's current continued from the current position
@ VO_SHOW_ROUTE
show vehicle's current route
@ VO_SHOW_BEST_LANES
show vehicle's best lanes
virtual std::string getStopInfo() const =0
retrieve information about the current stop state
Seats myContainerPositions
void removeActiveAddVisualisation(GUISUMOAbstractView *const parent, int which) override
Adds the named visualisation feature to the given view.
virtual double getAngle() const =0
Returns the vehicle's direction in radians.
bool drawReversed(const GUIVisualizationSettings &s) const
whether to reverse trains in their reversed state
FXMutex myLock
The mutex used to avoid concurrent updates of the vehicle buffer.
double getNaviDegree() const
return the current angle in navigational degrees
virtual void drawAction_drawVehicleBrakeLight(double length, bool onlyOne=false) const
void computeSeats(const Position &front, const Position &back, double seatOffset, int maxSeats, double exaggeration, int &requiredSeats, Seats &into, double extraOffset=0) const
add seats to mySeatPositions and update requiredSeats
int getNumPassengers() const
return the number of passengers
bool drawAction_drawVehicleAsPolyWithCarriagges(const GUIVisualizationSettings &s, double scaledLength, bool asImage=false) const
draw vehicle body and return whether carriages are being drawn
virtual Position getPosition(const double offset=0) const =0
Return current position (x/y, cartesian)
~GUIBaseVehicle()
destructor
virtual void drawAction_drawVehicleBlueLight() const
std::map< GUISUMOAbstractView *, int > myAdditionalVisualizations
Enabled visualisations, per view.
virtual void selectBlockingFoes() const =0
adds the blocking foes to the current selection
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent) override
Returns an own popup-menu.
void drawStopLabels(const GUIVisualizationSettings &s, bool noLoop, const RGBColor &col) const
Seats mySeatPositions
positions of seats in the vehicle (updated at every drawing step)
const MSBaseVehicle & getVehicle()
std::string getDeviceDescription()
lists equipped device (types) for the current vehicle
virtual double getVisualAngle(bool s2) const =0
Returns the vehicle's direction in radians taking into account secondary shape.
const MSVehicleType & getVType() const
A shortcut to myVehicle.myType.
double getScaleVisual() const override
return individual scaling factor for this object
Stores the information about how to visualize structures.
static double naviDegree(const double angle)
The base class for microscopic and mesoscopic vehicles.
const MSVehicleType & getVehicleType() const
Returns the vehicle's type definition.
A device which collects info on the vehicle trip (mainly on departure and arrival)
The car-following model and parameter.
const SUMOVTypeParameter & getParameter() const
A point in 2D or 3D with translation and scaling methods.
double scaleVisual
the scaling factor when drawing the object
#define UNUSED_PARAMETER(x)
Seat(const Position &_pos, double _angle)