 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
119 for (
int stage = 1; stage < p->
getNumStages(); stage++) {
132 if (myParent->getTrackedID() !=
static_cast<GUIPerson*
>(myObject)->
getGlID()) {
142 myParent->stopTrack();
151 stage->
abort(person);
166 MSPerson(pars, vtype, plan, speedFactor),
175 if (i->first->getTrackedID() ==
getGlID()) {
176 i->first->stopTrack();
178 while (i->first->removeAdditionalGLVisualisation(
this));
201 new FXMenuSeparator(ret);
203 new FXMenuCommand(ret,
"Start Tracking",
nullptr, ret,
MID_START_TRACK);
205 new FXMenuCommand(ret,
"Stop Tracking",
nullptr, ret,
MID_STOP_TRACK);
208 new FXMenuSeparator(ret);
213 new FXMenuSeparator(ret);
250 ret->
mkItem(
"Type Information:",
false,
"");
279 glRotated(90, 0, 0, 1);
284 glScaled(exaggeration, exaggeration, 1);
302 #ifdef GUIPerson_DEBUG_DRAW_WALKINGAREA_PATHS
318 if (stage !=
nullptr) {
321 if (stripingState !=
nullptr) {
323 if (waPath !=
nullptr) {
338 glTranslated(0, 0,
getType() - .1);
352 for (ConstMSEdgeVector::const_iterator it = edges.begin(); it != edges.end(); ++it) {
380 switch (activeScheme) {
412 const double hue = (long)
this % 360;
413 const double sat = (((long)
this / 360) % 67) / 100.0 + 0.33;
425 switch (activeScheme) {
445 FXMutexLock locker(
myLock);
452 FXMutexLock locker(
myLock);
459 FXMutexLock locker(
myLock);
470 FXMutexLock locker(
myLock);
477 FXMutexLock locker(
myLock);
484 FXMutexLock locker(
myLock);
491 FXMutexLock locker(
myLock);
498 FXMutexLock locker(
myLock);
505 FXMutexLock locker(
myLock);
512 FXMutexLock locker(
myLock);
519 FXMutexLock locker(
myLock);
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
Container for pedestrian state and individual position update function.
The car-following model and parameter.
std::string getStageIndexDescription() const
get stage index description
Position getGUIPosition() const
return the Network coordinate of the person (only for drawing centering and tracking)
double getSpeed() const
the current speed of the person
const std::string & getID() const
Returns the name of the vehicle type.
static void drawTextSettings(const GUIVisualizationTextSettings &settings, const std::string &text, const Position &pos, const double scale, const double angle=0, const double layer=2048)
static RGBColor getColor()
gets the gl-color
A window containing a gl-object's parameter.
void setColor(const GUIVisualizationSettings &s) const
sets the color according to the currente settings
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
WalkingAreaPath * myWalkingAreaPath
the current walkingAreaPath or 0
void drawAction_drawWalkingareaPath(const GUIVisualizationSettings &s) const
draw walking area path
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.
static const Position INVALID
used to indicate that a position is valid
@ MID_SHOW_CURRENTROUTE
Show vehicle's current route.
static void drawBoxLines(const PositionVector &geom, const std::vector< double > &rots, const std::vector< double > &lengths, double width, int cornerDetail=0, double offset=0)
Draws thick lines.
std::string getEdgeID() const
get edge ID
virtual void erase(MSTransportable *transportable)
removes a single transportable
@ MID_START_TRACK
Start to track a vehicle.
void setPositionInVehicle(const Position &pos)
static double naviDegree(const double angle)
@ MID_SHOW_WALKINGAREA_PATH
Show persons's path on walkingarea.
std::vector< const MSEdge * > ConstMSEdgeVector
GUIColorer personColorer
The person colorer.
FXDEFMAP(GUIPerson::GUIPersonPopupMenu) GUIPersonPopupMenuMap[]
void removeTransportable(MSTransportable *p)
Removes a transportable from this stop.
bool isSelected() const
whether this person is selected in the GUI
Structure representing possible vehicle parameter.
@ MID_STOP_TRACK
Stop to track a vehicle.
FXMutex myLock
The mutex used to avoid concurrent updates of the vehicle buffer.
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
std::string getDestinationEdgeID() const
get destination edge ID
@ MID_HIDE_WALKINGAREA_PATH
Hide persons's path on walkingarea.
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.
double scaledSize(double scale, double constFactor=0.1) const
get scale size
virtual const MSEdge * getEdge() const
Returns the current edge.
double getHeight() const
Get the height which vehicles of this class shall have when being drawn.
static void drawAction_drawAsCircle(const double length, const double width)
GUIPerson(const SUMOVehicleParameter *pars, MSVehicleType *vtype, MSTransportable::MSTransportablePlan *plan, const double speedFactor)
Constructor.
virtual void abort(MSTransportable *)
abort this stage (TraCI)
double getColorValue(const GUIVisualizationSettings &s, int activeScheme) const
gets the color value according to the current scheme index
const MSEdge * getEdge() const
Returns the current edge.
const std::map< std::string, std::string > & getParametersMap() const
Returns the inner key/value map.
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
MSTransportable::Stage * getCurrentStage() const
Return the current stage.
const PositionVector & getShape() const
double getWidth() const
Get the width which vehicles of this class shall have when being drawn.
void buildNameCopyPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds entries which allow to copy the name / typed name into the clipboard.
static void drawAction_drawAsPoly(const double angle, const double length, const double width)
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.
const std::vector< double > & getShapeRotations() const
GUIGlID getGlID() const
Returns the numerical id of the object.
bool hasActiveAddVisualisation(GUISUMOAbstractView *const parent, int which) const
Returns whether the named feature is enabled in the given view.
A class that stores a 2D geometrical boundary.
const std::vector< double > & getShapeLengths() const
double scale
information about a lane's width (temporary, used for a single view)
std::string getFromEdgeID() const
ger from edge ID
void addActiveAddVisualisation(GUISUMOAbstractView *const parent, int which)
Adds the named visualisation feature to the given view.
A point in 2D or 3D with translation and scaling methods.
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)
bool isWaiting4Vehicle() const
Whether the transportable waits for a vehicle.
double getMinGap() const
Get the free space in front of vehicles of this class.
GUIVisualizationSizeSettings personSize
static RGBColor fromHSV(double h, double s, double v)
Converts the given hsv-triplet to rgb, inspired by http://alvyray.com/Papers/CG/hsv2rgb....
double getWaitingSeconds() const
the time this person spent waiting in seconds
@ MID_SHOWPLAN
Show transportable plan.
static void drawAction_drawAsTriangle(const double angle, const double length, const double width)
double getArrivalPos() const
virtual double getEdgePos() const
Return the position on the edge.
void buildPopupHeader(GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true)
Builds the header.
virtual void removePerson(MSTransportable *p) const
Position getPosition() const
return the Network coordinate of the person
double getSpeedFactor() const
the current speed factor of the transportable (where applicable)
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Representation of a lane in the micro simulation (gui-version)
std::vector< MSTransportable::Stage * > MSTransportablePlan
the structure holding the plan of a transportable
@ VO_SHOW_WALKINGAREA_PATH
show the current walkingarea path
bool removeAdditionalGLVisualisation(GUIGlObject *const which)
Removes an object from the list of objects that show additional things.
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
double y() const
Returns the y-position.
int getNumRemainingStages() const
Return the number of remaining stages (including the current)
virtual MSTransportableControl & getPersonControl()
Returns the person control.
void removeActiveAddVisualisation(GUISUMOAbstractView *const parent, int which)
Adds the named visualisation feature to the given view.
bool addAdditionalGLVisualisation(GUIGlObject *const which)
Adds an object to call its additional visualisation method.
virtual double getSpeed() const
the current speed of the transportable
const ConstMSEdgeVector & getRoute() const
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
const MSVehicleType & getVehicleType() const
Returns the vehicle's type.
double getLength() const
Get vehicle's length [m].
void buildShowTypeParamsPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to open the type parameter window.
bool setFunctionalColor(int activeScheme) const
sets the color according to the current scheme index and some vehicle function
void buildShowParamsPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to open the parameter window.
const SUMOVTypeParameter & getParameter() const
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
GUISelectedStorage gSelected
A global holder of selected objects.
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.
@ VO_SHOW_ROUTE
show persons's current route
double getMaxSpeed() const
Get vehicle's maximum speed [m/s].
int personQuality
The quality of person drawing.
GUIParameterTableWindow * getTypeParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own type parameter window.
GUIVisualizationTextSettings personValue
static void drawAction_drawAsImage(const double angle, const double length, const double width, const std::string &file, const SUMOVehicleShape guiShape, const double exaggeration)
GUIVisualizationTextSettings personName
@ MID_HIDE_CURRENTROUTE
Hide vehicle's current route.
MSStoppingPlace * getDestinationStop() const
returns the destination stop (if any)
Boundary & grow(double by)
extends the boundary by the given amount
virtual void drawGLAdditional(GUISUMOAbstractView *const parent, const GUIVisualizationSettings &s) const
Draws additionally triggered visualisations.
const MSEdge * getFromEdge() const
Returns the departure edge.
Position myPositionInVehicle
The position of a person while riding a vehicle.
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...
RGBColor changedBrightness(int change, int toChange=3) const
Returns a new color with altered brightness.
double getNaviDegree() const
return the current angle of the person
const SUMOVehicleParameter & getParameter() const
const std::string & getID() const
Returns the id.
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
std::map< GUISUMOAbstractView *, int > myAdditionalVisualizations
Enabled visualisations, per view.
double getExaggeration(const GUIVisualizationSettings &s, const GUIGlObject *o, double factor=20) const
return the drawing size including exaggeration and constantSize values
double getEdgePos() const
Return the position on the edge.
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
@ MID_REMOVE_OBJECT
remove a vehice or person
bool isSelected(GUIGlObjectType type, GUIGlID id)
Returns the information whether the object with the given type and id is selected.
double getStageArrivalPos() const
get stage arrival position
std::string getCurrentStageDescription() const
Returns the current stage description as a string.
PedestrianState * getPedestrianState() const