62 #ifdef CHECK_MEMORY_LEAKS
64 #endif // CHECK_MEMORY_LEAKS
95 myVehiclesAdditionalVisualizations(additionalVisualizations) {
104 if (!static_cast<GUIPerson*>(myObject)->hasActiveAddVisualisation(myParent,
VO_SHOW_ROUTE)) {
139 if (!static_cast<GUIPerson*>(myObject)->hasActiveAddVisualisation(myParent,
VO_TRACKED)) {
140 myParent->startTrack(static_cast<GUIPerson*>(myObject)->
getGlID());
150 myParent->stopTrack();
189 new FXMenuSeparator(ret);
195 new FXMenuSeparator(ret);
220 ret->
mkItem(
"",
false,
"");
221 ret->
mkItem(
"Type Information:",
false,
"");
253 glRotated(90, 0, 0, 1);
258 glScaled(upscale, upscale, 1);
273 #ifdef GUIPerson_DEBUG_DRAW_WALKINGAREA_PATHS
286 if (stripingState != 0) {
302 glTranslated(0, 0,
getType() - .1);
316 for (ConstMSEdgeVector::const_iterator it = edges.begin(); it != edges.end(); ++it) {
340 switch (activeScheme) {
372 const SUMOReal hue = (long)
this % 360;
373 const SUMOReal sat = (((long)
this / 360) % 67) / 100.0 + 0.33;
385 switch (activeScheme) {
443 glBegin(GL_TRIANGLES);
450 glTranslated(0, 0, .045);
451 glBegin(GL_TRIANGLES);
453 glVertex2d(0.5, -0.25);
454 glVertex2d(0.5, 0.25);
456 glTranslated(0, 0, -.045);
466 glTranslated(0, 0, .045);
468 glScaled(1, 0.5, 1.);
471 glBegin(GL_TRIANGLES);
472 glVertex2d(0.0, -0.2);
473 glVertex2d(0.0, 0.2);
474 glVertex2d(-0.6, 0.0);
476 glTranslated(0, 0, -.045);
478 glScaled(0.9, 2.0, 1);
479 glTranslated(0, 0, .04);
482 glTranslated(0, 0, -.04);
SUMOReal getExaggeration(const GUIVisualizationSettings &s, SUMOReal factor=20) const
return the drawing size including exaggeration and constantSize values
SUMOReal getSpeed() const
the current speed of the person
std::map< GUISUMOAbstractView *, int > myAdditionalVisualizations
Enabled visualisations, per view.
const std::vector< SUMOReal > & getShapeRotations() const
SUMOReal getMaxSpeed() const
Get vehicle's maximum speed [m/s].
void drawAction_drawWalkingareaPath(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.
show persons's current route
GUIVisualizationTextSettings personName
SUMOReal getNaviDegree() const
return the current angle of the person
WalkingAreaPath * myWalkingAreaPath
the current walkingAreaPath or 0
bool isWaiting4Vehicle() const
Whether the transportable waits for a vehicle.
void drawAction_drawAsImage(const GUIVisualizationSettings &s) const
const SUMOVehicleParameter & getParameter() const
virtual SUMOReal getWaitingSeconds() const
the time this transportable spent waiting in seconds
Stores the information about how to visualize structures.
bool hasActiveAddVisualisation(GUISUMOAbstractView *const parent, int which) const
Returns whether the named feature is enabled in the given view.
Start to track a vehicle.
SUMOReal getLength() const
Get vehicle's length [m].
static void drawBoxLines(const PositionVector &geom, const std::vector< SUMOReal > &rots, const std::vector< SUMOReal > &lengths, SUMOReal width, int cornerDetail=0, SUMOReal offset=0)
Draws thick lines.
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.
const std::string & getID() const
returns the id of the transportable
MSTransportable::Stage * getCurrentStage() const
Return the current stage.
bool addAdditionalGLVisualisation(const GUIGlObject *const which)
Adds an object to call its additional visualisation method.
const std::map< std::string, std::string > & getMap() const
Returns the inner key/value map.
std::vector< const MSEdge * > ConstMSEdgeVector
void setColor(const GUIVisualizationSettings &s) const
sets the color according to the currente settings
const std::vector< SUMOReal > & getShapeLengths() const
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
void drawAction_drawAsPoly(const GUIVisualizationSettings &s) const
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.
GUIGlID getGlID() const
Returns the numerical id of the object.
A class that stores a 2D geometrical boundary.
bool removeAdditionalGLVisualisation(const GUIGlObject *const which)
Removes an object from the list of objects that show additional things.
The car-following model and parameter.
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
SUMOReal scale
information about a lane's width (temporary, used for a single view)
Representation of a lane in the micro simulation (gui-version)
virtual GUIGlID getTrackedID() const
get tracked id
MFXMutex myLock
The mutex used to avoid concurrent updates of the vehicle buffer.
static void drawFilledCircle(SUMOReal width, int steps=8)
Draws a filled circle around (0,0)
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
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.
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
const MSVehicleType & getVehicleType() const
const SUMOVTypeParameter & getParameter() const
virtual void drawGLAdditional(GUISUMOAbstractView *const parent, const GUIVisualizationSettings &s) const
Draws additionally triggered visualisations.
const MSEdge * getEdge() const
Returns the current edge.
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
PedestrianState * getPedestrianState() const
SUMOReal getMinGap() const
Get the free space in front of vehicles of this class.
A point in 2D or 3D with translation and scaling methods.
const ConstMSEdgeVector & getRoute() const
const MSVehicleType * myVType
This transportable's type. (mainly used for drawing related information Note sure if it is really nec...
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
GUIColorer personColorer
The person colorer.
RGBColor changedBrightness(int change, int toChange=3) const
Returns a new color with altered brightness.
void drawAction_drawAsTriangle(const GUIVisualizationSettings &s) const
void drawName(const Position &pos, const SUMOReal scale, const GUIVisualizationTextSettings &settings, const SUMOReal angle=0) const
draw name of item
std::string toString(const T &t, std::streamsize accuracy=OUTPUT_ACCURACY)
show the current walkingarea path
const int VEHPARS_COLOR_SET
FXDEFMAP(GUIPerson::GUIPersonPopupMenu) GUIPersonPopupMenuMap[]
GUIPerson(const SUMOVehicleParameter *pars, const MSVehicleType *vtype, MSTransportable::MSTransportablePlan *plan)
Constructor.
Hide persons's path on walkingarea.
static SUMOReal naviDegree(const SUMOReal angle)
void removeActiveAddVisualisation(GUISUMOAbstractView *const parent, int which)
Adds the named visualisation feature to the given view.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
const MSEdge & getDestination() const
Returns the current destination.
Show persons's path on walkingarea.
SUMOReal getWidth() const
Get the width which vehicles of this class shall have when being drawn.
const MSEdge * getFromEdge() const
Returns the departure edge.
SUMOReal getWaitingSeconds() const
the time this person spent waiting in seconds
virtual SUMOReal getSpeed() const
the current speed of the transportable
SUMOReal getEdgePos() const
return the offset from the start of the current edge
Boundary & grow(SUMOReal by)
extends the boundary by the given amount
Structure representing possible vehicle parameter.
Hide vehicle's current route.
void add(SUMOReal x, SUMOReal y, SUMOReal z=0)
Makes the boundary include the given coordinate.
A mutex encapsulator which locks/unlocks the given mutex on construction/destruction, respectively.
void addActiveAddVisualisation(GUISUMOAbstractView *const parent, int which)
Adds the named visualisation feature to the given view.
SUMOReal y() const
Returns the y-position.
Container for pedestrian state and individual position update function.
void buildSelectionPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to (de)select the object.
const std::string & getID() const
Returns the name of the vehicle type.
GUIVisualizationSizeSettings personSize
int personQuality
The quality of person drawing.
virtual Position getPosition() const
Return the Network coordinate of the transportable.
Show vehicle's current route.
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.
SUMOReal getColorValue(int activeScheme) const
gets the color value according to the current scheme index
Position getPosition() const
return the Network coordinate of the person
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.
Position myPositionInVehicle
The position of a person while riding a vehicle.
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.
bool setFunctionalColor(int activeScheme) const
sets the color according to the current scheme index and some vehicle function
void buildPopupHeader(GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true)
Builds the header.
const PositionVector & getShape() const
static RGBColor getColor()
gets the gl-color