 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
45 myDetector(detector) {
49 for (i = entries.begin(); i != entries.end(); ++i) {
54 for (i = exits.begin(); i != exits.end(); ++i) {
81 ret->
mkItem(
"vehicles within [#]",
true,
83 ret->
mkItem(
"mean speed [m/s]",
true,
85 ret->
mkItem(
"haltings [#]",
true,
95 glPushName(getGlID());
99 CrossingDefinitions::const_iterator i;
102 for (i = myEntryDefinitions.begin(); i != myEntryDefinitions.end(); ++i) {
103 drawSingleCrossing((*i).myFGPosition, (*i).myFGRotation, exaggeration);
106 for (i = myExitDefinitions.begin(); i != myExitDefinitions.end(); ++i) {
107 drawSingleCrossing((*i).myFGPosition, (*i).myFGRotation, exaggeration);
110 drawName(getCenteringBoundary().getCenter(), s.
scale, s.
addName);
117 double rot,
double upscale)
const {
118 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
120 glScaled(upscale, upscale, 1);
121 glTranslated(pos.
x(), pos.
y(), 0);
122 glRotated(rot, 0, 0, 1);
128 glVertex2d(-1.7, .5);
129 glVertex2d(-1.7, -.5);
130 glVertex2d(1.7, -.5);
134 glTranslated(1.5, 0, 0);
137 glTranslated(-3, 0, 0);
163 double haltingSpeedThreshold,
164 SUMOTime haltingTimeThreshold,
const std::string& vTypes,
bool openEntry)
165 :
MSE3Collector(id, entries, exits, haltingSpeedThreshold, haltingTimeThreshold, vTypes, openEntry) {}
int getCurrentHaltingNumber() const
Returns the number of current haltings within the area.
int getVehiclesWithin() const
Returns the number of vehicles within the area.
CrossSectionVector myExits
The detector's exits.
MyWrapper(GUIE3Collector &detector)
Constructor.
A window containing a gl-object's parameter.
~GUIE3Collector()
Destructor.
A detector of vehicles passing an area between entry/exit points.
GUIDetectorWrapper * buildDetectorGUIRepresentation()
Returns the wrapper for this detector.
CrossingDefinitions myExitDefinitions
The list of exit positions.
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
CrossSectionVector::const_iterator CrossSectionVectorConstIt
A simple description of a position on a lane (crossing of a lane)
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
void closeBuilding(const Parameterised *p=0)
Closes the building of the table.
double myFGRotation
The rotation.
GUIVisualizationTextSettings addName
double myPosition
The position at the lane.
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
void mkItem(const char *name, bool dynamic, ValueSource< T > *src)
Adds a row which obtains its value from a ValueSource.
static const RGBColor E3Entry
color for Entrys
double rotationDegreeAtOffset(double pos) const
Returns the rotation at the given length.
MSLane * myLane
The lane to cross.
A class that stores a 2D geometrical boundary.
double scale
information about a lane's width (temporary, used for a single view)
The gui-version of the MSE3Collector.
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.
SingleCrossingDefinition buildDefinition(const MSCrossSection §ion)
Builds the description about the position of the entry/exit point.
GUIE3Collector & getDetector()
Returns the detector itself.
double getCurrentMeanSpeed() const
Returns the mean speed within the area.
Boundary myBoundary
The detector's boundary.
const CrossSectionVector & getExits() const
Returns the list of exit points.
CrossingDefinitions myEntryDefinitions
The list of entry positions.
GUIVisualizationColorSettings colorSettings
color settings
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
GUIE3Collector(const std::string &id, const CrossSectionVector &entries, const CrossSectionVector &exits, double haltingSpeedThreshold, SUMOTime haltingTimeThreshold, const std::string &vTypes, bool openEntry)
Constructor.
static const RGBColor E3Exit
color for Exits
const PositionVector & getShape() const
Returns this lane's shape.
double y() const
Returns the y-position.
CrossSectionVector myEntries
The detector's entries.
static void drawBoxLine(const Position &beg, double rot, double visLength, double width, double offset=0)
Draws a thick line.
std::vector< SingleCrossingDefinition > CrossingDefinitions
Definition of a list of cross (entry/exit-point) positions.
const CrossSectionVector & getEntries() const
Returns the list of entry points.
void drawSingleCrossing(const Position &pos, double rot, double upscale) const
Draws a single entry/exit point.
GUIVisualizationSizeSettings addSize
Boundary & grow(double by)
extends the boundary by the given amount
const Position geometryPositionAtOffset(double offset, double lateralOffset=0) const
Position myFGPosition
The position.
Stores the information about how to visualize structures.
Representation of a single crossing point.
std::vector< MSCrossSection > CrossSectionVector
double getExaggeration(const GUIVisualizationSettings &s, const GUIGlObject *o, double factor=20) const
return the drawing size including exaggeration and constantSize values
static void drawTriangleAtEnd(const Position &p1, const Position &p2, double tLength, double tWidth)
Draws a triangle at the end of the given line.