67#define WATER_WAY_OFFSET 6.0
92 for (
int stage = 1; stage < p->
getNumStages(); stage++) {
114 myParent->stopTrack();
142 new FXMenuSeparator(ret);
153 new FXMenuSeparator(ret);
224 glRotated(
RAD2DEG(angle), 0, 0, 1);
229 glScaled(upscale, upscale, 1);
313 switch (activeScheme) {
345 const double hue = (double)((
long long int)
this % 360);
346 const double sat = (double)(((
long long int)
this / 360) % 67) / 100. + 0.33;
358 switch (activeScheme) {
378 FXMutexLock locker(
myLock);
384 FXMutexLock locker(
myLock);
391 FXMutexLock locker(
myLock);
403 FXMutexLock locker(
myLock);
410 FXMutexLock locker(
myLock);
417 FXMutexLock locker(
myLock);
429 glVertex2d(-1, -0.5);
433 glTranslated(0, 0, .045);
435 glVertex2d(-0.1, 0.4);
436 glVertex2d(-0.1, -0.4);
437 glVertex2d(-0.9, -0.4);
438 glVertex2d(-0.9, 0.4);
@ MID_SHOWPLAN
Show transportable plan.
@ MID_START_TRACK
Start to track a vehicle.
@ MID_STOP_TRACK
Stop to track a vehicle.
FXDEFMAP(GUIContainer::GUIContainerPopupMenu) GUIContainerPopupMenuMap[]
@ GLO_CONTAINER
a container
GUISelectedStorage gSelected
A global holder of selected objects.
GUIIcon
An enumeration of icons used by the gui applications.
std::string time2string(SUMOTime t, bool humanReadable)
convert SUMOTime to string (independently of global format setting)
const long long int VTYPEPARS_COLOR_SET
@ SVC_SHIP
is an arbitrary ship
const long long int VEHPARS_COLOR_SET
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
A class that stores a 2D geometrical boundary.
void add(double x, double y, double z=0)
Makes the boundary include the given coordinate.
Boundary & grow(double by)
extends the boundary by the given amount
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
static void pushName(unsigned int name)
push Name
static void popMatrix()
pop matrix
static RGBColor getColor()
gets the gl-color
static void popName()
pop Name
static void pushMatrix()
push matrix
bool setFunctionalColor(int activeScheme) const
sets the color according to the current scheme index and some vehicle function
void drawAction_drawAsPoly(const GUIVisualizationSettings &s) const
double getWaitingSeconds() const override
the time this container spent waiting in seconds
Position getPosition() const override
return the Network coordinate of the container
void drawGL(const GUIVisualizationSettings &s) const override
Draws the object.
bool isSelected() const override
whether this container is selected in the GUI
void drawAction_drawAsImage(const GUIVisualizationSettings &s) const
double getSpeed() const override
the current speed of the container
Boundary getCenteringBoundary() const override
Returns the boundary to which the view shall be centered in order to show the object.
GUIContainer(const SUMOVehicleParameter *pars, MSVehicleType *vtype, MSTransportable::MSTransportablePlan *plan)
Constructor.
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent) override
Returns an own popup-menu.
double getAngle() const override
return the current angle of the container
FXMutex myLock
The mutex used to avoid concurrent updates of the vehicle buffer.
double getEdgePos() const override
return the offset from the start of the current edge
GUIBaseVehicle::Seat myPositionInVehicle
The position of a container while riding a vehicle.
GUIParameterTableWindow * getTypeParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent) override
Returns an own type parameter window.
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent) override
Returns an own parameter window.
~GUIContainer()
destructor
int getDirection() const override
Return the movement directon on the edge.
virtual void drawGLAdditional(GUISUMOAbstractView *const parent, const GUIVisualizationSettings &s) const override
Draws additionally triggered visualisations.
void setColor(const GUIVisualizationSettings &s) const
sets the color according to the currente settings
double getColorValue(const GUIVisualizationSettings &s, int activeScheme) const override
gets the color value according to the current scheme index
double getExaggeration(const GUIVisualizationSettings &s) const override
return exaggeration associated with this GLObject
static FXMenuCommand * buildFXMenuCommand(FXComposite *p, const std::string &text, FXIcon *icon, FXObject *tgt, FXSelector sel, const bool disable=false)
build menu command
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.
void buildCenterPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to center to the object.
void buildNameCopyPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds entries which allow to copy the name / typed name into the clipboard.
void buildPopupHeader(GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true)
Builds the header.
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
void buildSelectionPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to (de)select the object.
void buildPositionCopyEntry(GUIGLObjectPopupMenu *ret, const GUIMainWindow &app) const
Builds an entry which allows to copy the cursor position if geo projection is used,...
GUIGlID getGlID() const
Returns the numerical id of the object.
void drawName(const Position &pos, const double scale, const GUIVisualizationTextSettings &settings, const double angle=0, bool forceShow=false) const
draw name of item
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon
A window containing a gl-object's parameter.
void mkItem(const char *name, bool dynamic, ValueSource< T > *src)
Adds a row which obtains its value from a ValueSource.
void closeBuilding(const Parameterised *p=0)
Closes the building of the table.
T getColor(const double value) const
virtual GUIGlID getTrackedID() const
get tracked id
bool isSelected(GUIGlObjectType type, GUIGlID id)
Returns the information whether the object with the given type and id is selected.
static void drawTexturedBox(int which, double size)
Draws a named texture as a box with the given size.
static int getTextureID(const std::string &filename, const bool mirrorX=false)
return texture id for the given filename (initialize on first use)
Stores the information about how to visualize structures.
GUIVisualizationSizeSettings containerSize
int containerQuality
The quality of container drawing.
GUIVisualizationSizeSettings personSize
double scale
information about a lane's width (temporary, used for a single view)
GUIVisualizationTextSettings containerName
GUIColorer containerColorer
The container colorer.
double angle
The current view rotation angle.
static double naviDegree(const double angle)
const std::vector< MSLane * > & getLanes() const
Returns this edge's lanes.
Representation of a lane in the micro simulation.
virtual const PositionVector & getShape(bool) const
const MSEdge * getFromEdge() const
Returns the departure edge.
virtual double getChosenSpeedFactor() const
the current speed factor of the transportable (where applicable)
virtual double getEdgePos() const
Return the position on the edge.
std::string getCurrentStageDescription() const
Returns the current stage description as a string.
const MSEdge * getDestination() const
Returns the current destination.
virtual double getAngle() const
return the current angle of the transportable
bool isWaiting4Vehicle() const
Whether the transportable waits for a vehicle.
virtual double getSpeed() const
the current speed of the transportable
std::string getStageSummary(int stageIndex) const
return textual summary for the given stage
MSStage * getCurrentStage() const
Return the current stage.
MSVehicleType * myVType
This transportable's type. (mainly used for drawing related information Note sure if it is really nec...
virtual Position getPosition() const
Return the Network coordinate of the transportable.
double getArrivalPos() const
returns the final arrival pos
const MSVehicleType & getVehicleType() const
Returns the object's "vehicle" type.
int getNumStages() const
Return the total number stages in this person's plan.
int getCurrentStageIndex() const
Return the index of the current stage.
MSStageType getCurrentStageType() const
the current stage type of the transportable
virtual double getWaitingSeconds() const
the time this transportable spent waiting in seconds
const MSEdge * getEdge() const
Returns the current edge.
virtual int getDirection() const
Return the movement directon on the edge.
std::vector< MSStage * > MSTransportablePlan
the structure holding the plan of a transportable
const SUMOVehicleParameter & getParameter() const
Returns the vehicle's parameter (including departure definition)
The car-following model and parameter.
double getWidth() const
Get the width which vehicles of this class shall have when being drawn.
double getMaxSpeed() const
Get vehicle's (technical) maximum speed [m/s].
const std::string & getID() const
Returns the name of the vehicle type.
double getMinGap() const
Get the free space in front of vehicles of this class.
double getHeight() const
Get the height which vehicles of this class shall have when being drawn.
double getLength() const
Get vehicle's length [m].
double getMass() const
Get this vehicle type's mass.
std::string getImgFile() const
Get this vehicle type's raster model file name.
const SUMOVTypeParameter & getParameter() const
const std::string & getID() const
Returns the id.
An upper class for objects with additional parameters.
A point in 2D or 3D with translation and scaling methods.
double x() const
Returns the x-position.
double y() const
Returns the y-position.
Position positionAtOffset2D(double pos, double lateralOffset=0) const
Returns the position at the given length.
static RGBColor fromHSV(double h, double s, double v)
Converts the given hsv-triplet to rgb, inspired by http://alvyray.com/Papers/CG/hsv2rgb....
Structure representing possible vehicle parameter.
double getExaggeration(const GUIVisualizationSettings &s, const GUIGlObject *o, double factor=20) const
return the drawing size including exaggeration and constantSize values