61 #ifdef CHECK_MEMORY_LEAKS
63 #endif // CHECK_MEMORY_LEAKS
89 :
GUIGLObjectPopupMenu(app, parent, o), myVehiclesAdditionalVisualizations(additionalVisualizations) {
184 glRotated(90, 0, 0, 1);
190 glScaled(upscale, upscale, 1);
205 #ifdef GUIPerson_DEBUG_DRAW_WALKINGAREA_PATHS
218 if (stripingState != 0) {
234 glTranslated(0, 0,
getType() - .1);
256 switch (activeScheme) {
288 const SUMOReal hue = (long)
this % 360;
289 const SUMOReal sat = (((long)
this / 360) % 67) / 100.0 + 0.33;
301 switch (activeScheme) {
362 glBegin(GL_TRIANGLES);
369 glTranslated(0, 0, .045);
370 glBegin(GL_TRIANGLES);
372 glVertex2d(0.5, -0.25);
373 glVertex2d(0.5, 0.25);
375 glTranslated(0, 0, -.045);
385 glTranslated(0, 0, .045);
387 glScaled(1, 0.5, 1.);
390 glBegin(GL_TRIANGLES);
391 glVertex2d(0.0, -0.2);
392 glVertex2d(0.0, 0.2);
393 glVertex2d(-0.6, 0.0);
395 glTranslated(0, 0, -.045);
397 glScaled(0.9, 2.0, 1);
398 glTranslated(0, 0, .04);
401 glTranslated(0, 0, -.04);
SUMOReal getSpeed() const
the current speed of the person
const std::string & getID() const
returns the person id
std::map< GUISUMOAbstractView *, int > myAdditionalVisualizations
Enabled visualisations, per view.
void drawAction_drawWalkingareaPath(const GUIVisualizationSettings &s) const
const MSVehicleType & getVehicleType() 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.
GUIVisualizationTextSettings personName
virtual Position getPosition() const
return the Network coordinate of the person
WalkingAreaPath * myWalkingAreaPath
the current walkingAreaPath or 0
void drawAction_drawAsImage(const GUIVisualizationSettings &s) const
bool isWaiting4Vehicle() const
Whether the person waits for a vehicle.
const MSEdge * getEdge() const
Returns the current edge.
const MSEdge * getFromEdge() const
Returns the departure edge.
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.
StageType getCurrentStageType() const
virtual SUMOReal getWaitingSeconds() const
the time this person spent waiting in seconds
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.
SUMOReal getAngle() const
return the current angle of the person
bool addAdditionalGLVisualisation(GUIGlObject *const which)
Adds an object to call its additional visualisation method.
bool isSelected(GUIGlObjectType type, GUIGlID id)
Returns the information whether the object with the given type and id is selected.
SUMOReal getColorValue(size_t activeScheme) const
gets the color value according to the current scheme index
void setColor(const GUIVisualizationSettings &s) const
sets the color according to the currente settings
void buildShowParamsPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to open the parameter window.
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.
The car-following model and parameter.
const MSEdge & getDestination() const
Returns the current destination.
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)
const SUMOVehicleParameter & getParameter() const
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::string getCurrentStageDescription() const
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
bool removeAdditionalGLVisualisation(GUIGlObject *const which)
Removes an object from the list of objects that show additional things.
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
virtual void drawGLAdditional(GUISUMOAbstractView *const parent, const GUIVisualizationSettings &s) const
Draws additionally triggered visualisations.
static void drawTexturedBox(unsigned int which, SUMOReal size)
Draws a named texture as a box with the given size.
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
PedestrianState * getPedestrianState() const
bool setFunctionalColor(size_t activeScheme) const
sets the color according to the current scheme index and some vehicle function
A point in 2D or 3D with translation and scaling methods.
MSPersonStage * getCurrentStage() const
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
virtual SUMOReal getAngle() const
return the current angle of the person
void drawName(const Position &pos, const SUMOReal scale, const GUIVisualizationTextSettings &settings, const SUMOReal angle=0) const
show the current walkingarea path
const int VEHPARS_COLOR_SET
FXDEFMAP(GUIPerson::GUIPersonPopupMenu) GUIPersonPopupMenuMap[]
Hide persons's path on walkingarea.
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.
Show persons's path on walkingarea.
SUMOReal getWidth() const
Get the width which vehicles of this class shall have when being drawn.
SUMOReal getWaitingSeconds() const
the time this person spent waiting in seconds
void add(SUMOReal x, SUMOReal y)
Makes the boundary include the given coordinate.
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.
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.
GUIVisualizationSizeSettings personSize
int personQuality
The quality of person drawing.
virtual SUMOReal getSpeed() const
the current speed of the person
GUIPerson(const SUMOVehicleParameter *pars, const MSVehicleType *vtype, MSPerson::MSPersonPlan *plan)
Constructor.
virtual SUMOReal getEdgePos() const
return the offset from the start of the current edge
std::string getImgFile() const
Get this vehicle type's raster model file name.
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.
std::vector< MSPersonStage * > MSPersonPlan
the structure holding the plan of a person
A window containing a gl-object's parameter.
const int VTYPEPARS_COLOR_SET
SUMOReal getExaggeration(const GUIVisualizationSettings &s) const
return the drawing size including exaggeration and constantSize values
void buildPopupHeader(GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true)
Builds the header.
static RGBColor getColor()
gets the gl-color
static int getTextureID(const std::string &filename)
return texture id for the given filename (initialize on first use)