41 #ifdef CHECK_MEMORY_LEAKS 43 #endif // CHECK_MEMORY_LEAKS 54 myDetector(detector) {
58 for (i = entries.begin(); i != entries.end(); ++i) {
63 for (i = exits.begin(); i != exits.end(); ++i) {
90 ret->
mkItem(
"vehicles within [#]",
true,
92 ret->
mkItem(
"mean speed [m/s]",
true,
94 ret->
mkItem(
"haltings [#]",
true,
108 CrossingDefinitions::const_iterator i;
127 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
129 glScaled(upscale, upscale, 1);
130 glTranslated(pos.
x(), pos.
y(), 0);
131 glRotated(rot, 0, 0, 1);
137 glVertex2d(-1.7, .5);
138 glVertex2d(-1.7, -.5);
139 glVertex2d(1.7, -.5);
143 glTranslated(1.5, 0, 0);
146 glTranslated(-3, 0, 0);
173 SUMOTime haltingTimeThreshold,
const std::string& vTypes)
174 :
MSE3Collector(id, entries, exits, haltingSpeedThreshold, haltingTimeThreshold, vTypes) {}
void drawName(const Position &pos, const SUMOReal scale, const GUIVisualizationTextSettings &settings, const SUMOReal angle=0) const
draw name of item
The gui-version of the MSE3Collector.
const CrossSectionVector & getEntries() const
Returns the list of entry points.
int getCurrentHaltingNumber() const
Returns the number of current haltings within the area.
std::vector< SingleCrossingDefinition > CrossingDefinitions
Definition of a list of cross (entry/exit-point) positions.
GUIVisualizationTextSettings addName
const CrossSectionVector & getExits() const
Returns the list of exit points.
A simple description of a position on a lane (crossing of a lane)
void drawSingleCrossing(const Position &pos, SUMOReal rot, SUMOReal upscale) const
Draws a single entry/exit point.
Stores the information about how to visualize structures.
SingleCrossingDefinition buildDefinition(const MSCrossSection §ion)
Builds the description about the position of the entry/exit point.
std::vector< MSCrossSection > CrossSectionVector
GUIE3Collector & myDetector
The wrapped detector.
CrossSectionVector::const_iterator CrossSectionVectorConstIt
static void drawBoxLine(const Position &beg, SUMOReal rot, SUMOReal visLength, SUMOReal width, SUMOReal offset=0)
Draws a thick line.
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
const PositionVector & getShape() const
Returns this lane's shape.
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
static void drawTriangleAtEnd(const Position &p1, const Position &p2, SUMOReal tLength, SUMOReal tWidth)
Draws a triangle at the end of the given line.
A class that stores a 2D geometrical boundary.
GUIE3Collector(const std::string &id, const CrossSectionVector &entries, const CrossSectionVector &exits, SUMOReal haltingSpeedThreshold, SUMOTime haltingTimeThreshold, const std::string &vTypes)
Constructor.
SUMOReal scale
information about a lane's width (temporary, used for a single view)
~GUIE3Collector()
Destructor.
GUIVisualizationSizeSettings addSize
CrossingDefinitions myEntryDefinitions
The list of entry positions.
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
A point in 2D or 3D with translation and scaling methods.
SUMOReal rotationDegreeAtOffset(SUMOReal pos) const
Returns the rotation at the given length.
SUMOReal x() const
Returns the x-position.
MyWrapper(GUIE3Collector &detector)
Constructor.
GUIDetectorWrapper * buildDetectorGUIRepresentation()
Returns the wrapper for this detector.
SUMOReal myPosition
The position at the lane.
CrossSectionVector myEntries
The detector's entries.
Boundary & grow(SUMOReal by)
extends the boundary by the given amount
SUMOReal myFGRotation
The rotation.
SUMOReal getCurrentMeanSpeed() const
Returns the mean speed within the area.
void add(SUMOReal x, SUMOReal y, SUMOReal z=0)
Makes the boundary include the given coordinate.
CrossingDefinitions myExitDefinitions
The list of exit positions.
A detector of vehicles passing an area between entry/exit points.
GUIGlID getGlID() const
Returns the numerical id of the object.
GUIE3Collector & getDetector()
Returns the detector itself.
SUMOReal getExaggeration(const GUIVisualizationSettings &s, SUMOReal factor=20) const
return the drawing size including exaggeration and constantSize values
MSLane * myLane
The lane to cross.
Representation of a single crossing point.
int getVehiclesWithin() const
Returns the number of vehicles within the area.
Position myFGPosition
The position.
SUMOReal y() const
Returns the y-position.
void mkItem(const char *name, bool dynamic, ValueSource< unsigned > *src)
Adds a row which obtains its value from an unsigned-ValueSource.
Boundary myBoundary
The detector's boundary.
void closeBuilding()
Closes the building of the table.
A window containing a gl-object's parameter.
const Position geometryPositionAtOffset(SUMOReal offset, SUMOReal lateralOffset=0) const
CrossSectionVector myExits
The detector's exits.