62 #ifdef CHECK_MEMORY_LEAKS 64 #endif // CHECK_MEMORY_LEAKS 89 #define WATER_WAY_OFFSET 6.0 99 GUIGlObject& o, std::map<GUISUMOAbstractView*, int>& additionalVisualizations)
100 :
GUIGLObjectPopupMenu(app, parent, o), myVehiclesAdditionalVisualizations(additionalVisualizations) {
176 glRotated(90, 0, 0, 1);
182 glScaled(upscale, upscale, 1);
270 switch (activeScheme) {
309 switch (activeScheme) {
375 glVertex2d(-1, -0.5);
379 glTranslated(0, 0, .045);
381 glVertex2d(-0.1, 0.4);
382 glVertex2d(-0.1, -0.4);
383 glVertex2d(-0.9, -0.4);
384 glVertex2d(-0.9, 0.4);
SUMOReal getExaggeration(const GUIVisualizationSettings &s, SUMOReal factor=20) const
return the drawing size including exaggeration and constantSize values
SUMOReal getColorValue(int activeScheme) const
gets the color value according to the current scheme index
virtual void drawGLAdditional(GUISUMOAbstractView *const parent, const GUIVisualizationSettings &s) const
Draws additionally triggered visualisations.
void drawAction_drawAsImage(const GUIVisualizationSettings &s) const
static RGBColor fromHSV(SUMOReal h, SUMOReal s, SUMOReal v)
Converts the given hsv-triplet to rgb.
void buildNameCopyPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds entries which allow to copy the name / typed name into the clipboard.
const std::vector< MSLane * > & getLanes() const
Returns this edge's lanes.
bool isWaiting4Vehicle() const
Whether the transportable waits for a vehicle.
const SUMOVehicleParameter & getParameter() const
GUIColorer containerColorer
The container colorer.
virtual SUMOReal getWaitingSeconds() const
the time this transportable spent waiting in seconds
Stores the information about how to visualize structures.
SUMOReal getLength() const
Get vehicle's length [m].
SUMOReal getAngle() const
return the current angle of the container
void buildCenterPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to center to the object.
bool isSelected(GUIGlObjectType type, GUIGlID id)
Returns the information whether the object with the given type and id is selected.
MFXMutex myLock
The mutex used to avoid concurrent updates of the vehicle buffer.
const std::string & getID() const
returns the id of the transportable
virtual SUMOReal getEdgePos() const
Return the position on the edge.
void buildShowParamsPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to open the parameter window.
virtual SUMOReal getAngle() const
return the current angle of the transportable
SUMOReal x() const
Returns the x-position.
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.
Position positionAtOffset2D(SUMOReal pos, SUMOReal lateralOffset=0) const
Returns the position at the given length.
GUIGlID getGlID() const
Returns the numerical id of the object.
A class that stores a 2D geometrical boundary.
The car-following model and parameter.
SUMOReal getSpeed() const
the current speed of the container
SUMOReal scale
information about a lane's width (temporary, used for a single view)
std::map< GUISUMOAbstractView *, int > myAdditionalVisualizations
Enabled visualisations, per view.
GUIContainer(const SUMOVehicleParameter *pars, const MSVehicleType *vtype, MSTransportable::MSTransportablePlan *plan)
Constructor.
std::vector< MSTransportable::Stage * > MSTransportablePlan
the structure holding the plan of a transportable
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
const MSVehicleType & getVehicleType() const
const MSEdge * getEdge() const
Returns the current edge.
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
void setColor(const GUIVisualizationSettings &s) const
sets the color according to the currente settings
A point in 2D or 3D with translation and scaling methods.
StageType getCurrentStageType() const
the current stage type of the transportable
static int getTextureID(const std::string &filename, const bool mirrorX=false)
return texture id for the given filename (initialize on first use)
const T getColor(const SUMOReal value) const
Position getPosition() const
return the Network coordinate of the container
SUMOReal getEdgePos() const
return the offset from the start of the current edge
bool setFunctionalColor(int activeScheme) const
sets the color according to the current scheme index and some vehicle function
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
void drawName(const Position &pos, const SUMOReal scale, const GUIVisualizationTextSettings &settings, const SUMOReal angle=0) const
draw name of item
const int VEHPARS_COLOR_SET
static SUMOReal naviDegree(const SUMOReal angle)
int containerQuality
The quality of container drawing.
const MSEdge & getDestination() const
Returns the current destination.
SUMOReal getWidth() const
Get the width which vehicles of this class shall have when being drawn.
const MSEdge * getFromEdge() const
Returns the departure edge.
void add(SUMOReal x, SUMOReal y)
Makes the boundary include the given coordinate.
virtual SUMOReal getSpeed() const
the current speed of the transportable
Boundary & grow(SUMOReal by)
extends the boundary by the given amount
Structure representing possible vehicle parameter.
Position myPositionInVehicle
The position of a container while riding a vehicle.
GUIVisualizationSizeSettings containerSize
A mutex encapsulator which locks/unlocks the given mutex on construction/destruction, respectively.
SUMOReal y() const
Returns the y-position.
void drawAction_drawAsPoly(const GUIVisualizationSettings &s) const
void buildSelectionPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to (de)select the object.
GUIVisualizationSizeSettings personSize
virtual Position getPosition() const
Return the Network coordinate of the transportable.
SUMOReal getWaitingSeconds() const
the time this container spent waiting in seconds
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
const PositionVector & getShape() const
Returns this lane's shape.
std::string getImgFile() const
Get this vehicle type's raster model file name.
std::string getCurrentStageDescription() const
Returns the current stage description as a string.
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
~GUIContainer()
destructor
void mkItem(const char *name, bool dynamic, ValueSource< unsigned > *src)
Adds a row which obtains its value from an unsigned-ValueSource.
GUISelectedStorage gSelected
A global holder of selected objects.
void closeBuilding()
Closes the building of the table.
Representation of a lane in the micro simulation.
A window containing a gl-object's parameter.
const int VTYPEPARS_COLOR_SET
static void drawTexturedBox(int which, SUMOReal size)
Draws a named texture as a box with the given size.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
void buildPopupHeader(GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true)
Builds the header.
static RGBColor getColor()
gets the gl-color
GUIVisualizationTextSettings containerName