42 #ifdef CHECK_MEMORY_LEAKS
44 #endif // CHECK_MEMORY_LEAKS
55 myDetector(detector) {
59 for (i = entries.begin(); i != entries.end(); ++i) {
64 for (i = exits.begin(); i != exits.end(); ++i) {
91 ret->
mkItem(
"vehicles within [#]",
true,
93 ret->
mkItem(
"mean speed [m/s]",
true,
95 ret->
mkItem(
"haltings [#]",
true,
105 glPushName(getGlID());
107 glTranslated(0, 0, getType());
109 CrossingDefinitions::const_iterator i;
112 for (i = myEntryDefinitions.begin(); i != myEntryDefinitions.end(); ++i) {
113 drawSingleCrossing((*i).myFGPosition, (*i).myFGRotation, exaggeration);
116 for (i = myExitDefinitions.begin(); i != myExitDefinitions.end(); ++i) {
117 drawSingleCrossing((*i).myFGPosition, (*i).myFGRotation, exaggeration);
120 drawName(getCenteringBoundary().getCenter(), s.
scale, s.
addName);
128 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
130 glScaled(upscale, upscale, 1);
131 glTranslated(pos.
x(), pos.
y(), 0);
132 glRotated(rot, 0, 0, 1);
138 glVertex2d(-1.7, .5);
139 glVertex2d(-1.7, -.5);
140 glVertex2d(1.7, -.5);
144 glTranslated(1.5, 0, 0);
147 glTranslated(-3, 0, 0);
175 :
MSE3Collector(id, entries, exits, haltingSpeedThreshold, haltingTimeThreshold) {}
The gui-version of the MSE3Collector.
std::vector< SingleCrossingDefinition > CrossingDefinitions
Definition of a list of cross (entry/exit-point) positions.
GUIVisualizationTextSettings addName
A simple description of a position on a lane (crossing of a lane)
const CrossSectionVector & getExits() const
Returns the list of exit points.
const Position geometryPositionAtOffset(SUMOReal offset) const
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
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.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
SUMOReal x() const
Returns the x-position.
GUIE3Collector(const std::string &id, const CrossSectionVector &entries, const CrossSectionVector &exits, SUMOReal haltingSpeedThreshold, SUMOTime haltingTimeThreshold)
Constructor.
A class that stores a 2D geometrical boundary.
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.
A point in 2D or 3D with translation and scaling methods.
MyWrapper(GUIE3Collector &detector)
Constructor.
int getVehiclesWithin() const
Returns the number of vehicles within the area.
GUIDetectorWrapper * buildDetectorGUIRepresentation()
Returns the wrapper for this detector.
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
SUMOReal myPosition
The position at the lane.
CrossSectionVector myEntries
The detector's entries.
SUMOReal rotationDegreeAtOffset(SUMOReal pos) const
Returns the rotation at the given length.
void add(SUMOReal x, SUMOReal y)
Makes the boundary include the given coordinate.
Boundary & grow(SUMOReal by)
extends the boundary by the given amount
SUMOReal myFGRotation
The rotation.
void drawSingleCrossing(const Position &pos, SUMOReal rot, SUMOReal upscale) const
Draws a single entry/exit point.
CrossingDefinitions myExitDefinitions
The list of exit positions.
static void drawTriangleAtEnd(const Line &l, SUMOReal tLength, SUMOReal tWidth)
Draws a triangle at the end of the given line.
SUMOReal y() const
Returns the y-position.
A detector of vehicles passing an area between entry/exit points.
const CrossSectionVector & getEntries() const
Returns the list of entry points.
GUIE3Collector & getDetector()
Returns the detector itself.
const PositionVector & getShape() const
Returns this lane's shape.
MSLane * myLane
The lane to cross.
Representation of a single crossing point.
SUMOReal getCurrentMeanSpeed() const
Returns the mean speed within the area.
int getCurrentHaltingNumber() const
Returns the number of current haltings within the area.
Position myFGPosition
The 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.
SUMOReal getExaggeration(const GUIVisualizationSettings &s) const
return the drawing size including exaggeration and constantSize values
CrossSectionVector myExits
The detector's exits.