71 myVehiclesAdditionalVisualizations(additionalVisualizations) {
122 for (
int stage = 1; stage < p->
getNumStages(); stage++) {
154 stage->
abort(person);
169 MSPerson(pars, vtype, plan, speedFactor),
178 if (i->first->getTrackedID() ==
getGlID()) {
179 i->first->stopTrack();
181 while (i->first->removeAdditionalGLVisualisation(
this));
204 new FXMenuSeparator(ret);
206 new FXMenuCommand(ret,
"Start Tracking",
nullptr, ret,
MID_START_TRACK);
208 new FXMenuCommand(ret,
"Stop Tracking",
nullptr, ret,
MID_STOP_TRACK);
211 new FXMenuSeparator(ret);
216 new FXMenuSeparator(ret);
253 ret->
mkItem(
"Type Information:",
false,
"");
282 glRotated(90, 0, 0, 1);
287 glScaled(exaggeration, exaggeration, 1);
305 #ifdef GUIPerson_DEBUG_DRAW_WALKINGAREA_PATHS 321 if (stage !=
nullptr) {
324 if (stripingState !=
nullptr) {
326 if (waPath !=
nullptr) {
341 glTranslated(0, 0,
getType() - .1);
355 for (ConstMSEdgeVector::const_iterator it = edges.begin(); it != edges.end(); ++it) {
383 switch (activeScheme) {
415 const double hue = (long)
this % 360;
416 const double sat = (((long)
this / 360) % 67) / 100.0 + 0.33;
428 switch (activeScheme) {
448 FXMutexLock locker(
myLock);
455 FXMutexLock locker(
myLock);
462 FXMutexLock locker(
myLock);
473 FXMutexLock locker(
myLock);
480 FXMutexLock locker(
myLock);
487 FXMutexLock locker(
myLock);
494 FXMutexLock locker(
myLock);
501 FXMutexLock locker(
myLock);
508 FXMutexLock locker(
myLock);
515 FXMutexLock locker(
myLock);
522 FXMutexLock locker(
myLock);
bool isSelected() const
whether this person is selected in the GUI
virtual void drawGLAdditional(GUISUMOAbstractView *const parent, const GUIVisualizationSettings &s) const
Draws additionally triggered visualisations.
std::map< GUISUMOAbstractView *, int > myAdditionalVisualizations
Enabled visualisations, per view.
double scale
information about a lane's width (temporary, used for a single view)
bool hasActiveAddVisualisation(GUISUMOAbstractView *const parent, int which) const
Returns whether the named feature is enabled in the given view.
RGBColor changedBrightness(int change, int toChange=3) const
Returns a new color with altered brightness.
void closeBuilding(const Parameterised *p=0)
Closes the building of the table.
std::string getEdgeID() const
get edge ID
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.
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 personValue
const MSEdge * getEdge() const
Returns the current edge.
GUIVisualizationTextSettings personName
static RGBColor fromHSV(double h, double s, double v)
Converts the given hsv-triplet to rgb, inspired by http://alvyray.com/Papers/CG/hsv2rgb.htm.
WalkingAreaPath * myWalkingAreaPath
the current walkingAreaPath or 0
virtual double getEdgePos() const
Return the position on the edge.
Position getPosition() const
return the Network coordinate of the person
Stores the information about how to visualize structures.
virtual const MSEdge * getEdge() const
Returns the current edge.
double y() const
Returns the y-position.
std::string getFromEdgeID() const
ger from edge ID
virtual void abort(MSTransportable *)
abort this stage (TraCI)
static void drawTextSettings(const GUIVisualizationTextSettings &settings, const std::string &text, const Position &pos, const double scale, const double angle=0, const double layer=2048)
void mkItem(const char *name, bool dynamic, ValueSource< T > *src)
Adds a row which obtains its value from a ValueSource.
std::string time2string(SUMOTime t)
double x() const
Returns the x-position.
static void drawAction_drawAsImage(const double angle, const double lenght, const double width, const std::string &file, const SUMOVehicleShape guiShape, const double exaggeration)
static void drawAction_drawAsTriangle(const double angle, const double lenght, const double width)
void buildCenterPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to center to the object.
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
static void drawAction_drawAsPoly(const double angle, const double lenght, const double width)
bool isSelected(GUIGlObjectType type, GUIGlID id)
Returns the information whether the object with the given type and id is selected.
bool addAdditionalGLVisualisation(const GUIGlObject *const which)
Adds an object to call its additional visualisation method.
std::vector< const MSEdge * > ConstMSEdgeVector
const std::string & getID() const
Returns the id.
void buildShowParamsPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to open the parameter window.
virtual double getSpeed() const
the current speed of the transportable
FXMutex myLock
The mutex used to avoid concurrent updates of the vehicle buffer.
const SUMOVehicleParameter & getParameter() const
virtual void stopTrack()
stop track
const std::vector< double > & getShapeRotations() const
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.
void buildShowTypeParamsPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to open the type parameter window.
GUIPerson(const SUMOVehicleParameter *pars, MSVehicleType *vtype, MSTransportable::MSTransportablePlan *plan, const double speedFactor)
Constructor.
int getNumRemainingStages() const
Return the number of remaining stages (including the current)
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.
static void drawAction_drawAsCircle(const double lenght, const double width)
The car-following model and parameter.
virtual void erase(MSTransportable *transportable)
removes a single transportable
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
Start to track a vehicle.
PedestrianState * getPedestrianState() const
Representation of a lane in the micro simulation (gui-version)
double getEdgePos() const
Return the position on the edge.
const MSEdge * getFromEdge() const
Returns the departure edge.
void drawAction_drawWalkingareaPath(const GUIVisualizationSettings &s) const
draw walking area path
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
std::vector< MSTransportable::Stage * > MSTransportablePlan
the structure holding the plan of a transportable
static double naviDegree(const double angle)
MSTransportable::Stage * getCurrentStage() const
Return the current stage.
double getColorValue(const GUIVisualizationSettings &s, int activeScheme) const
gets the color value according to the current scheme index
virtual GUIGlID getTrackedID() const
get tracked id
virtual void startTrack(int)
star track
MSVehicleType * myVType
This transportable's type. (mainly used for drawing related information Note sure if it is really nec...
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
std::string getStageIndexDescription() const
get stage index description
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
double getWaitingSeconds() const
the time this person spent waiting in seconds
virtual MSTransportableControl & getPersonControl()
Returns the person control.
A point in 2D or 3D with translation and scaling methods.
double scaledSize(double scale, double constFactor=0.1) const
get scale size
double getNaviDegree() const
return the current angle of the person
virtual double getAngle() const
return the current angle of the transportable
bool setFunctionalColor(int activeScheme) const
sets the color according to the current scheme index and some vehicle function
GUIParameterTableWindow * getTypeParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own type parameter window.
bool isWaiting4Vehicle() const
Whether the transportable waits for a vehicle.
double getArrivalPos() const
void setPositionInVehicle(const Position &pos)
double getMaxSpeed() const
Get vehicle's maximum speed [m/s].
void drawName(const Position &pos, const double scale, const GUIVisualizationTextSettings &settings, const double angle=0) const
draw name of item
GUIColorer personColorer
The person colorer.
const PositionVector & getShape() const
virtual void removePerson(MSTransportable *p) const
double getSpeed() const
the current speed of the person
Boundary & grow(double by)
extends the boundary by the given amount
double getMinGap() const
Get the free space in front of vehicles of this class.
double getStageArrivalPos() const
get stage arrival position
void removeTransportable(MSTransportable *p)
Removes a transportable from this stop.
double angle
The current view rotation angle.
const T getColor(const double value) const
Show vehicle's current route.
std::string getStageSummary(int stageIndex) const
return textual summary for the given stage
An upper class for objects with additional parameters.
show the current walkingarea path
const int VEHPARS_COLOR_SET
const ConstMSEdgeVector & getRoute() const
FXDEFMAP(GUIPerson::GUIPersonPopupMenu) GUIPersonPopupMenuMap[]
const SUMOVTypeParameter & getParameter() const
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
void removeActiveAddVisualisation(GUISUMOAbstractView *const parent, int which)
Adds the named visualisation feature to the given view.
MSStoppingPlace * getDestinationStop() const
returns the destination stop (if any)
remove a vehice or person
double getWidth() const
Get the width which vehicles of this class shall have when being drawn.
double getHeight() const
Get the height which vehicles of this class shall have when being drawn.
std::string getCurrentStageDescription() const
Returns the current stage description as a string.
double getSpeedFactor() const
the current speed factor of the transportable (where applicable)
Structure representing possible vehicle parameter.
virtual Position getPosition() const
Return the Network coordinate of the transportable.
void setColor(const GUIVisualizationSettings &s) const
sets the color according to the currente settings
void addActiveAddVisualisation(GUISUMOAbstractView *const parent, int which)
Adds the named visualisation feature to the given view.
const std::vector< double > & getShapeLengths() const
const std::string & getID() const
Returns the name of the vehicle type.
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.
double getLength() const
Get vehicle's length [m].
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
const std::map< std::string, std::string > & getParametersMap() const
Returns the inner key/value map.
GUIGlID getGlID() const
Returns the numerical id of the object.
const MSVehicleType & getVehicleType() const
Returns the vehicle's type.
virtual double getWaitingSeconds() const
the time this transportable spent waiting in seconds
const MSEdge * getDestination() const
Returns the current destination.
Show persons's path on walkingarea.
void add(double x, double y, double z=0)
Makes the boundary include the given coordinate.
double getExaggeration(const GUIVisualizationSettings &s, const GUIGlObject *o, double factor=20) const
return the drawing size including exaggeration and constantSize values
Hide persons's path on walkingarea.
std::string getDestinationEdgeID() const
get destination edge ID
GUISelectedStorage gSelected
A global holder of selected objects.
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 FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
Hide vehicle's current route.
int getNumStages() const
Return the total number stages in this persons plan.
void buildPopupHeader(GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true)
Builds the header.
static const Position INVALID
used to indicate that a position is valid
StageType getCurrentStageType() const
the current stage type of the transportable
static RGBColor getColor()
gets the gl-color
Position getGUIPosition() const
return the Network coordinate of the person (only for drawing centering and tracking) ...