44 myDetector(detector) {
48 for (i = entries.begin(); i != entries.end(); ++i) {
53 for (i = exits.begin(); i != exits.end(); ++i) {
80 ret->
mkItem(
TL(
"name"),
false, myDetector.myName);
81 if (myDetector.isTyped()) {
84 ret->
mkItem(
TL(
"vehicles within [#]"),
true,
86 ret->
mkItem(
TL(
"mean speed [m/s]"),
true,
88 ret->
mkItem(
TL(
"haltings [#]"),
true,
90 ret->
mkItem(
TL(
"last interval mean travel time [s]"),
true,
92 ret->
mkItem(
TL(
"last interval mean haltings [#]"),
true,
94 ret->
mkItem(
TL(
"last interval mean time loss [s]"),
true,
96 ret->
mkItem(
TL(
"last interval mean vehicle count [#]"),
true,
111 CrossingDefinitions::const_iterator i;
113 const double exaggeration = getExaggeration(s);
114 for (i = myEntryDefinitions.begin(); i != myEntryDefinitions.end(); ++i) {
115 drawSingleCrossing((*i).myFGPosition, (*i).myFGRotation, exaggeration);
118 for (i = myExitDefinitions.begin(); i != myExitDefinitions.end(); ++i) {
119 drawSingleCrossing((*i).myFGPosition, (*i).myFGRotation, exaggeration);
122 drawName(getCenteringBoundary().getCenter(), s.
scale, s.
addName);
129 double rot,
double upscale)
const {
130 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
132 glTranslated(pos.
x(), pos.
y(), 0);
133 glRotated(rot, 0, 0, 1);
134 glScaled(upscale, upscale, 1);
140 glVertex2d(-1.7, .5);
141 glVertex2d(-1.7, -.5);
142 glVertex2d(1.7, -.5);
146 glTranslated(1.5, 0, 0);
149 glTranslated(-3, 0, 0);
181 double haltingSpeedThreshold,
183 const std::string name,
const std::string& vTypes,
184 const std::string& nextEdges,
186 bool openEntry,
bool expectArrival):
187 MSE3Collector(id, entries, exits, haltingSpeedThreshold, haltingTimeThreshold, name, vTypes, nextEdges,
detectPersons, openEntry, expectArrival)
@ GLO_E3DETECTOR
a E3 detector
GUIIcon
An enumeration of icons used by the gui applications.
CrossSectionVector::const_iterator CrossSectionVectorConstIt
std::vector< MSCrossSection > CrossSectionVector
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
A class that stores a 2D geometrical boundary.
void add(double x, double y, double z=0)
Makes the boundary include the given coordinate.
Boundary & grow(double by)
extends the boundary by the given amount
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
static void drawTriangleAtEnd(const Position &p1, const Position &p2, double tLength, double tWidth, const double extraOffset=0)
Draws a triangle at the end of the given line.
static void pushName(unsigned int name)
push Name
static void popMatrix()
pop matrix
static void drawBoxLine(const Position &beg, double rot, double visLength, double width, double offset=0)
Draws a thick line.
static void popName()
pop Name
static void pushMatrix()
push matrix
std::vector< SingleCrossingDefinition > CrossingDefinitions
Definition of a list of cross (entry/exit-point) positions.
SingleCrossingDefinition buildDefinition(const MSCrossSection §ion)
Builds the description about the position of the entry/exit point.
double getExaggeration(const GUIVisualizationSettings &s) const
return exaggeration associated with this GLObject
void drawSingleCrossing(const Position &pos, double rot, double upscale) const
Draws a single entry/exit point.
GUIE3Collector & getDetector()
Returns the detector itself.
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
CrossingDefinitions myExitDefinitions
The list of exit positions.
CrossingDefinitions myEntryDefinitions
The list of entry positions.
MyWrapper(GUIE3Collector &detector)
Constructor.
Boundary myBoundary
The detector's boundary.
The gui-version of the MSE3Collector.
~GUIE3Collector()
Destructor.
const CrossSectionVector & getExits() const
Returns the list of exit points.
GUIDetectorWrapper * buildDetectorGUIRepresentation()
Returns the wrapper for this detector.
GUIE3Collector(const std::string &id, const CrossSectionVector &entries, const CrossSectionVector &exits, double haltingSpeedThreshold, SUMOTime haltingTimeThreshold, const std::string name, const std::string &vTypes, const std::string &nextEdges, int detectPersons, bool openEntry, bool expectArrival)
Constructor.
const CrossSectionVector & getEntries() const
Returns the list of entry points.
A window containing a gl-object's parameter.
void mkItem(const char *name, bool dynamic, ValueSource< T > *src)
Adds a row which obtains its value from a ValueSource.
void closeBuilding(const Parameterised *p=0)
Closes the building of the table.
Stores the information about how to visualize structures.
GUIVisualizationTextSettings addName
GUIVisualizationSizeSettings addSize
double scale
information about a lane's width (temporary, used for a single view)
GUIVisualizationDetectorSettings detectorSettings
Detector settings.
A simple description of a position on a lane (crossing of a lane)
MSLane * myLane
The lane to cross.
double myPosition
The position at the lane.
bool detectPersons() const
A detector of vehicles passing an area between entry/exit points.
CrossSectionVector myExits
The detector's exits.
int getVehiclesWithin() const
Returns the number of vehicles within the area.
double getLastIntervalMeanTravelTime() const
int getLastIntervalVehicleSum() const
double getCurrentMeanSpeed() const
Returns the mean speed within the area.
double getLastIntervalMeanHaltsPerVehicle() const
int getCurrentHaltingNumber() const
Returns the number of current haltings within the area.
double getLastIntervalMeanTimeLoss() const
CrossSectionVector myEntries
The detector's entrys.
virtual const PositionVector & getShape(bool) const
const Position geometryPositionAtOffset(double offset, double lateralOffset=0) const
A point in 2D or 3D with translation and scaling methods.
double x() const
Returns the x-position.
double y() const
Returns the y-position.
double rotationDegreeAtOffset(double pos) const
Returns the rotation at the given length.
Representation of a single crossing point.
Position myFGPosition
The position.
double myFGRotation
The rotation.
static const RGBColor E3ExitColor
color for Exits
static const RGBColor E3EntryColor
color for Entrys
double getExaggeration(const GUIVisualizationSettings &s, const GUIGlObject *o, double factor=20) const
return the drawing size including exaggeration and constantSize values