49 myDetector(detector) {
53 for (i = entries.begin(); i != entries.end(); ++i) {
58 for (i = exits.begin(); i != exits.end(); ++i) {
85 ret->
mkItem(
"vehicles within [#]",
true,
87 ret->
mkItem(
"mean speed [m/s]",
true,
89 ret->
mkItem(
"haltings [#]",
true,
103 CrossingDefinitions::const_iterator i;
121 double rot,
double upscale)
const {
122 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
124 glScaled(upscale, upscale, 1);
125 glTranslated(pos.
x(), pos.
y(), 0);
126 glRotated(rot, 0, 0, 1);
132 glVertex2d(-1.7, .5);
133 glVertex2d(-1.7, -.5);
134 glVertex2d(1.7, -.5);
138 glTranslated(1.5, 0, 0);
141 glTranslated(-3, 0, 0);
167 double haltingSpeedThreshold,
168 SUMOTime haltingTimeThreshold,
const std::string& vTypes)
169 :
MSE3Collector(id, entries, exits, haltingSpeedThreshold, haltingTimeThreshold, vTypes) {}
The gui-version of the MSE3Collector.
double rotationDegreeAtOffset(double pos) const
Returns the rotation at the given length.
double scale
information about a lane's width (temporary, used for a single view)
const CrossSectionVector & getEntries() const
Returns the list of entry points.
void closeBuilding(const Parameterised *p=0)
Closes the building of the table.
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)
Stores the information about how to visualize structures.
double y() const
Returns the y-position.
SingleCrossingDefinition buildDefinition(const MSCrossSection §ion)
Builds the description about the position of the entry/exit point.
std::vector< MSCrossSection > CrossSectionVector
double x() const
Returns the x-position.
GUIE3Collector & myDetector
The wrapped detector.
CrossSectionVector::const_iterator CrossSectionVectorConstIt
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.
A class that stores a 2D geometrical boundary.
~GUIE3Collector()
Destructor.
GUIVisualizationSizeSettings addSize
CrossingDefinitions myEntryDefinitions
The list of entry positions.
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
double myPosition
The position at the lane.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
A point in 2D or 3D with translation and scaling methods.
double getCurrentMeanSpeed() const
Returns the mean speed within the area.
void drawName(const Position &pos, const double scale, const GUIVisualizationTextSettings &settings, const double angle=0) const
draw name of item
Boundary & grow(double by)
extends the boundary by the given amount
MyWrapper(GUIE3Collector &detector)
Constructor.
static const RGBColor SUMO_color_E3Entry
GUIDetectorWrapper * buildDetectorGUIRepresentation()
Returns the wrapper for this detector.
double myFGRotation
The rotation.
CrossSectionVector myEntries
The detector's entries.
GUIE3Collector(const std::string &id, const CrossSectionVector &entries, const CrossSectionVector &exits, double haltingSpeedThreshold, SUMOTime haltingTimeThreshold, const std::string &vTypes)
Constructor.
CrossingDefinitions myExitDefinitions
The list of exit positions.
const Position geometryPositionAtOffset(double offset, double lateralOffset=0) const
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.
double getExaggeration(const GUIVisualizationSettings &s, 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.
static const RGBColor SUMO_color_E3Exit
MSLane * myLane
The lane to cross.
Representation of a single crossing point.
int getVehiclesWithin() const
Returns the number of vehicles within the area.
static void drawBoxLine(const Position &beg, double rot, double visLength, double width, double offset=0)
Draws a thick line.
void add(double x, double y, double z=0)
Makes the boundary include the given coordinate.
void drawSingleCrossing(const Position &pos, double rot, double upscale) const
Draws a single entry/exit point.
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.
A window containing a gl-object's parameter.
CrossSectionVector myExits
The detector's exits.