120 for (
int stage = 1; stage < p->
getNumStages(); stage++) {
133 if (myParent->getTrackedID() !=
static_cast<GUIPerson*
>(myObject)->
getGlID()) {
143 myParent->stopTrack();
152 stage->
abort(person);
167 MSPerson(pars, vtype, plan, speedFactor),
176 if (i->first->getTrackedID() ==
getGlID()) {
177 i->first->stopTrack();
179 while (i->first->removeAdditionalGLVisualisation(
this));
202 new FXMenuSeparator(ret);
209 new FXMenuSeparator(ret);
214 new FXMenuSeparator(ret);
249 ret->
mkItem(
"Type Information:",
false,
"");
283 glScaled(exaggeration, exaggeration, 1);
301 #ifdef GUIPerson_DEBUG_DRAW_WALKINGAREA_PATHS
317 if (stage !=
nullptr) {
320 if (stripingState !=
nullptr) {
322 if (waPath !=
nullptr) {
335 if (stage !=
nullptr) {
346 glTranslated(0, 0,
getType() - .1);
360 for (ConstMSEdgeVector::const_iterator it = edges.begin(); it != edges.end(); ++it) {
388 switch (activeScheme) {
420 const double hue = (double)((
long long int)
this % 360);
421 const double sat = (((
long long int)
this / 360) % 67) / 100.0 + 0.33;
433 switch (activeScheme) {
455 FXMutexLock locker(
myLock);
465 FXMutexLock locker(
myLock);
475 FXMutexLock locker(
myLock);
489 FXMutexLock locker(
myLock);
503 FXMutexLock locker(
myLock);
513 FXMutexLock locker(
myLock);
523 FXMutexLock locker(
myLock);
533 FXMutexLock locker(
myLock);
543 FXMutexLock locker(
myLock);
553 FXMutexLock locker(
myLock);
563 FXMutexLock locker(
myLock);
573 FXMutexLock locker(
myLock);
582 FXMutexLock locker(
myLock);
@ MID_HIDE_CURRENTROUTE
Hide vehicle's current route.
@ MID_SHOWPLAN
Show transportable plan.
@ MID_HIDE_WALKINGAREA_PATH
Hide persons's path on walkingarea.
@ MID_SHOW_WALKINGAREA_PATH
Show persons's path on walkingarea.
@ MID_START_TRACK
Start to track a vehicle.
@ MID_REMOVE_OBJECT
remove a vehice or person
@ MID_SHOW_CURRENTROUTE
Show vehicle's current route.
@ MID_STOP_TRACK
Stop to track a vehicle.
GUISelectedStorage gSelected
A global holder of selected objects.
FXDEFMAP(GUIPerson::GUIPersonPopupMenu) GUIPersonPopupMenuMap[]
std::vector< const MSEdge * > ConstMSEdgeVector
std::string time2string(SUMOTime t)
convert SUMOTime to string
const int VTYPEPARS_COLOR_SET
const int VEHPARS_COLOR_SET
const double INVALID_DOUBLE
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 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.
static RGBColor getColor()
gets the gl-color
static void drawTextSettings(const GUIVisualizationTextSettings &settings, const std::string &text, const Position &pos, const double scale, const double angle=0, const double layer=2048, const int align=0)
static void drawAction_drawAsCircle(const double length, const double width)
static void drawAction_drawAsPoly(const double angle, const double length, const double width)
static void drawAction_drawAsImage(const double angle, const double length, const double width, const std::string &file, const SUMOVehicleShape guiShape, const double exaggeration)
static void drawAction_drawAsTriangle(const double angle, const double length, const double width)
static FXMenuCommand * buildFXMenuCommand(FXComposite *p, const std::string &text, FXIcon *icon, FXObject *tgt, FXSelector sel)
build menu command
void buildPositionCopyEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to copy the cursor position if geo projection is used,...
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.
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) const
draw name of item
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon
Representation of a lane in the micro simulation (gui-version)
const PositionVector & getShape() const
const std::vector< double > & getShapeLengths() const
const std::vector< double > & getShapeRotations() const
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.
void setColor(const GUIVisualizationSettings &s) const
sets the color according to the currente settings
void drawAction_drawWalkingareaPath(const GUIVisualizationSettings &s) const
draw walking area path
std::string getDestinationEdgeID() const
get destination edge ID
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 getGUIAngle() const
return the angle of the person (only for drawing centering and tracking)
bool isJammed() const
whether the person is jammed as defined by the current pedestrian model
GUIBaseVehicle::Seat myPositionInVehicle
The position of a person while riding a vehicle.
std::map< GUISUMOAbstractView *, int > myAdditionalVisualizations
Enabled visualisations, per view.
@ VO_SHOW_WALKINGAREA_PATH
show the current walkingarea path
@ VO_SHOW_ROUTE
show persons's current route
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
void removeActiveAddVisualisation(GUISUMOAbstractView *const parent, int which)
Adds the named visualisation feature to the given view.
double getSpeed() const
the current speed of the person
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
double getNaviDegree() const
return the current angle of the person
virtual void drawGLAdditional(GUISUMOAbstractView *const parent, const GUIVisualizationSettings &s) const
Draws additionally triggered visualisations.
GUIParameterTableWindow * getTypeParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own type parameter window.
GUIPerson(const SUMOVehicleParameter *pars, MSVehicleType *vtype, MSTransportable::MSTransportablePlan *plan, const double speedFactor)
Constructor.
std::string getEdgeID() const
get edge ID
bool hasActiveAddVisualisation(GUISUMOAbstractView *const parent, int which) const
Returns whether the named feature is enabled in the given view.
bool setFunctionalColor(int activeScheme) const
sets the color according to the current scheme index and some vehicle function
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
bool proceed(MSNet *net, SUMOTime time, const bool vehicleArrived=false)
Position getPosition() const
return the Network coordinate of the person
void setPositionInVehicle(const GUIBaseVehicle::Seat &pos)
bool isSelected() const
whether this person is selected in the GUI
FXMutex myLock
The mutex used to avoid concurrent updates of the vehicle buffer.
std::string getFromEdgeID() const
ger from edge ID
double getStageArrivalPos() const
get stage arrival position
double getWaitingSeconds() const
the time this person spent waiting in seconds
double getColorValue(const GUIVisualizationSettings &s, int activeScheme) const
gets the color value according to the current scheme index
double getEdgePos() const
Return the position on the edge.
void addActiveAddVisualisation(GUISUMOAbstractView *const parent, int which)
Adds the named visualisation feature to the given view.
const T getColor(const double value) const
bool removeAdditionalGLVisualisation(GUIGlObject *const which)
Removes an object from the list of objects that show additional things.
bool addAdditionalGLVisualisation(GUIGlObject *const which)
Adds an object to call its additional visualisation method.
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.
Stores the information about how to visualize structures.
GUIVisualizationTextSettings personValue
int personQuality
The quality of person drawing.
GUIVisualizationSizeSettings personSize
GUIColorer personColorer
The person colorer.
double scale
information about a lane's width (temporary, used for a single view)
GUIVisualizationTextSettings personName
double angle
The current view rotation angle.
static double naviDegree(const double angle)
virtual void removePerson(MSTransportable *p) const
The simulated network and simulation perfomer.
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
virtual MSTransportableControl & getPersonControl()
Returns the person control.
Container for pedestrian state and individual position update function.
const WalkingAreaPath * myWalkingAreaPath
the current walkingAreaPath or 0
double getSpeedFactor() const
the current speed factor of the transportable (where applicable)
virtual double getArrivalPos() const
MSStoppingPlace * getDestinationStop() const
returns the destination stop (if any)
virtual void abort(MSTransportable *)
abort this stage (TraCI)
virtual const MSEdge * getEdge() const
Returns the current edge.
virtual MSTransportableStateAdapter * getState() const
const std::vector< const MSEdge * > & getRoute() const
void removeTransportable(MSTransportable *p)
Removes a transportable from this stop.
virtual void erase(MSTransportable *transportable)
removes a single transportable
virtual double getEdgePos() const
Return the position on the edge.
std::string getCurrentStageDescription() const
Returns the current stage description as a string.
virtual double getAngle() const
return the current angle of the transportable
bool isWaiting4Vehicle() const
Whether the transportable waits for a vehicle.
int getNumRemainingStages() const
Return the number of remaining stages (including the current)
virtual double getSpeed() const
the current speed of the transportable
std::string getStageSummary(int stageIndex) const
return textual summary for the given stage
const SUMOVehicleParameter & getParameter() const
Returns the vehicle's parameter (including departure definition)
virtual bool proceed(MSNet *net, SUMOTime time, const bool vehicleArrived=false)
MSVehicleType * myVType
This transportable's type. (mainly used for drawing related information Note sure if it is really nec...
const MSVehicleType & getVehicleType() const
Returns the object's "vehicle" type.
virtual Position getPosition() const
Return the Network coordinate of the transportable.
const MSEdge * getFromEdge() const
Returns the departure edge.
int getNumStages() const
Return the total number stages in this persons plan.
MSStageType getCurrentStageType() const
the current stage type of the transportable
const MSEdge * getEdge() const
Returns the current edge.
MSStage * getCurrentStage() const
Return the current stage.
virtual double getWaitingSeconds() const
the time this transportable spent waiting in seconds
bool hasArrived() const
return whether the person has reached the end of its plan
std::vector< MSStage * > MSTransportablePlan
the structure holding the plan of a transportable
const MSEdge * getDestination() const
Returns the current destination.
virtual bool isJammed() const
whether the transportable is jammed
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 maximum speed [m/s].
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.
const std::string & getID() const
Returns the name of the vehicle type.
double getLength() const
Get vehicle's length [m].
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.
static const Position INVALID
used to indicate that a position is valid
double x() const
Returns the x-position.
double y() const
Returns the y-position.
static RGBColor fromHSV(double h, double s, double v)
Converts the given hsv-triplet to rgb, inspired by http://alvyray.com/Papers/CG/hsv2rgb....
RGBColor changedBrightness(int change, int toChange=3) const
Returns a new color with altered brightness.
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
double scaledSize(double scale, double constFactor=0.1) const
get scale size
const PositionVector shape