 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
66 #define WATER_WAY_OFFSET 6.0
91 for (
int stage = 1; stage < p->
getNumStages(); stage++) {
113 myParent->stopTrack();
141 new FXMenuSeparator(ret);
143 new FXMenuCommand(ret,
"Start Tracking",
nullptr, ret,
MID_START_TRACK);
145 new FXMenuCommand(ret,
"Stop Tracking",
nullptr, ret,
MID_STOP_TRACK);
152 new FXMenuSeparator(ret);
189 ret->
mkItem(
"Type Information:",
false,
"");
221 glRotated(90, 0, 0, 1);
226 glScaled(upscale, upscale, 1);
310 switch (activeScheme) {
349 switch (activeScheme) {
369 FXMutexLock locker(
myLock);
376 FXMutexLock locker(
myLock);
388 FXMutexLock locker(
myLock);
395 FXMutexLock locker(
myLock);
402 FXMutexLock locker(
myLock);
415 glVertex2d(-1, -0.5);
419 glTranslated(0, 0, .045);
421 glVertex2d(-0.1, 0.4);
422 glVertex2d(-0.1, -0.4);
423 glVertex2d(-0.9, -0.4);
424 glVertex2d(-0.9, 0.4);
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
The car-following model and parameter.
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
void setColor(const GUIVisualizationSettings &s) const
sets the color according to the currente settings
void drawAction_drawAsImage(const GUIVisualizationSettings &s) const
const std::string & getID() const
Returns the name of the vehicle type.
static RGBColor getColor()
gets the gl-color
A window containing a gl-object's parameter.
const MSEdge * getDestination() const
Returns the current destination.
An upper class for objects with additional parameters.
std::string getStageSummary(int stageIndex) const
return textual summary for the given stage
Representation of a lane in the micro simulation.
void drawName(const Position &pos, const double scale, const GUIVisualizationTextSettings &settings, const double angle=0) const
draw name of item
double angle
The current view rotation angle.
void buildSelectionPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to (de)select the object.
GUIVisualizationTextSettings containerName
@ MID_START_TRACK
Start to track a vehicle.
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
static double naviDegree(const double angle)
double getSpeed() const
the current speed of the container
FXDEFMAP(GUIContainer::GUIContainerPopupMenu) GUIContainerPopupMenuMap[]
bool setFunctionalColor(int activeScheme) const
sets the color according to the current scheme index and some vehicle function
Structure representing possible vehicle parameter.
GUIVisualizationSizeSettings containerSize
@ MID_STOP_TRACK
Stop to track a vehicle.
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
StageType getCurrentStageType() const
the current stage type of the transportable
void closeBuilding(const Parameterised *p=0)
Closes the building of the table.
static void drawTexturedBox(int which, double size)
Draws a named texture as a box with the given size.
virtual double getSpeedFactor() const
the current speed factor of the transportable (where applicable)
Position getPosition() const
return the Network coordinate of the container
double getHeight() const
Get the height which vehicles of this class shall have when being drawn.
const MSEdge * getEdge() const
Returns the current edge.
const std::map< std::string, std::string > & getParametersMap() const
Returns the inner key/value map.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
MSTransportable::Stage * getCurrentStage() const
Return the current stage.
double getWidth() const
Get the width which vehicles of this class shall have when being drawn.
Position myPositionInVehicle
The position of a container while riding a vehicle.
void buildNameCopyPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds entries which allow to copy the name / typed name into the clipboard.
void drawAction_drawAsPoly(const GUIVisualizationSettings &s) const
int getNumStages() const
Return the total number stages in this persons plan.
virtual double getWaitingSeconds() const
the time this transportable spent waiting in seconds
const int VEHPARS_COLOR_SET
void mkItem(const char *name, bool dynamic, ValueSource< T > *src)
Adds a row which obtains its value from a ValueSource.
GUIGlID getGlID() const
Returns the numerical id of the object.
A class that stores a 2D geometrical boundary.
FXMutex myLock
The mutex used to avoid concurrent updates of the vehicle buffer.
double scale
information about a lane's width (temporary, used for a single view)
A point in 2D or 3D with translation and scaling methods.
int containerQuality
The quality of container drawing.
double x() const
Returns the x-position.
void add(double x, double y, double z=0)
Makes the boundary include the given coordinate.
std::string time2string(SUMOTime t)
double getEdgePos() const
return the offset from the start of the current edge
bool isWaiting4Vehicle() const
Whether the transportable waits for a vehicle.
~GUIContainer()
destructor
double getMinGap() const
Get the free space in front of vehicles of this class.
GUIVisualizationSizeSettings personSize
GUIParameterTableWindow * getTypeParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own type parameter window.
static RGBColor fromHSV(double h, double s, double v)
Converts the given hsv-triplet to rgb, inspired by http://alvyray.com/Papers/CG/hsv2rgb....
@ MID_SHOWPLAN
Show transportable plan.
@ SVC_SHIP
is an arbitrary ship
virtual double getEdgePos() const
Return the position on the edge.
void buildPopupHeader(GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true)
Builds the header.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
const PositionVector & getShape() const
Returns this lane's shape.
std::vector< MSTransportable::Stage * > MSTransportablePlan
the structure holding the plan of a transportable
double y() const
Returns the y-position.
int getNumRemainingStages() const
Return the number of remaining stages (including the current)
Position positionAtOffset2D(double pos, double lateralOffset=0) const
Returns the position at the given length.
virtual double getSpeed() const
the current speed of the transportable
double getArrivalPos() const
returns the final arrival pos
virtual void drawGLAdditional(GUISUMOAbstractView *const parent, const GUIVisualizationSettings &s) const
Draws additionally triggered visualisations.
const MSVehicleType & getVehicleType() const
Returns the vehicle's type.
double getLength() const
Get vehicle's length [m].
double getColorValue(const GUIVisualizationSettings &s, int activeScheme) const
gets the color value according to the current scheme index
double getWaitingSeconds() const
the time this container spent waiting in seconds
std::string getImgFile() const
Get this vehicle type's raster model file name.
void buildShowTypeParamsPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to open the type parameter window.
void buildShowParamsPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to open the parameter window.
const std::string & getID() const
returns the id of the transportable
const SUMOVTypeParameter & getParameter() const
GUISelectedStorage gSelected
A global holder of selected objects.
double 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.
void buildPositionCopyEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to copy the cursor position if geo projection is used,...
virtual Position getPosition() const
Return the Network coordinate of the transportable.
GUIContainer(const SUMOVehicleParameter *pars, MSVehicleType *vtype, MSTransportable::MSTransportablePlan *plan)
Constructor.
const std::vector< MSLane * > & getLanes() const
Returns this edge's lanes.
double getMaxSpeed() const
Get vehicle's maximum speed [m/s].
GUIColorer containerColorer
The container colorer.
Boundary & grow(double by)
extends the boundary by the given amount
const MSEdge * getFromEdge() const
Returns the departure edge.
Stores the information about how to visualize structures.
const int VTYPEPARS_COLOR_SET
MSVehicleType * myVType
This transportable's type. (mainly used for drawing related information Note sure if it is really nec...
static int getTextureID(const std::string &filename, const bool mirrorX=false)
return texture id for the given filename (initialize on first use)
const SUMOVehicleParameter & getParameter() const
virtual double getAngle() const
return the current angle of the transportable
const T getColor(const double value) const
virtual GUIGlID getTrackedID() const
get tracked id
double getExaggeration(const GUIVisualizationSettings &s, const GUIGlObject *o, double factor=20) const
return the drawing size including exaggeration and constantSize values
bool isSelected(GUIGlObjectType type, GUIGlID id)
Returns the information whether the object with the given type and id is selected.
std::string getCurrentStageDescription() const
Returns the current stage description as a string.