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