44 #ifdef CHECK_MEMORY_LEAKS
46 #endif // CHECK_MEMORY_LEAKS
56 SUMOReal position,
const std::string& vTypes)
74 myDetector(detector), myPosition(pos) {
120 ret->
mkItem(
"lane",
false, myDetector.mySegment->getID());
129 glPushName(getGlID());
130 glPolygonOffset(0, -2);
137 glTranslated(myFGPosition.x(), myFGPosition.y(), getType());
138 glRotated(myFGRotation, 0, 0, 1);
139 glScaled(exaggeration, exaggeration, exaggeration);
141 glVertex2d(0 - 1.0, 2);
142 glVertex2d(-1.0, -2);
149 glVertex2d(0, 2 - .1);
150 glVertex2d(0, -2 + .1);
154 if (width * exaggeration > 1) {
156 glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
158 glVertex2f(0 - 1.0, 2);
159 glVertex2f(-1.0, -2);
163 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
167 if (width * exaggeration > 1) {
168 glRotated(90, 0, 0, -1);
176 drawName(getCenteringBoundary().getCenter(), s.
scale, s.
addName);
SUMOReal getExaggeration(const GUIVisualizationSettings &s, SUMOReal factor=20) const
return the drawing size including exaggeration and constantSize values
Position myFGPosition
The position in full-geometry mode.
MyWrapper(GUIMEInductLoop &detector, SUMOReal pos)
Constructor.
GUIVisualizationTextSettings addName
const SUMOReal myPosition
position from the start of the edge / lane
~GUIMEInductLoop()
Destructor.
const std::vector< MSLane * > & getLanes() const
Returns this edge's lanes.
Stores the information about how to visualize structures.
SUMOReal myFGRotation
The rotation in full-geometry mode.
const Position geometryPositionAtOffset(SUMOReal offset, SUMOReal lateralOffset=0) const
SUMOReal x() const
Returns the x-position.
const MSEdge & getEdge() const
Returns the edge this segment belongs to.
A class that stores a 2D geometrical boundary.
SUMOReal scale
information about a lane's width (temporary, used for a single view)
Boundary myBoundary
The detector's boundary.
GUIVisualizationSizeSettings addSize
GUIMEInductLoop & getLoop()
Returns the detector itself.
GUIMEInductLoop(const std::string &id, MESegment *s, SUMOReal position, const std::string &vTypes)
Construtor.
SUMOReal rotationDegreeAtOffset(SUMOReal pos) const
Returns the rotation at the given length.
Boundary & grow(SUMOReal by)
extends the boundary by the given amount
void add(SUMOReal x, SUMOReal y, SUMOReal z=0)
Makes the boundary include the given coordinate.
A single mesoscopic segment (cell)
SUMOReal y() const
Returns the y-position.
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
const PositionVector & getShape() const
Returns this lane's shape.
virtual GUIDetectorWrapper * buildDetectorGUIRepresentation()
Returns this detector's visualisation-wrapper.
void mkItem(const char *name, bool dynamic, ValueSource< unsigned > *src)
Adds a row which obtains its value from an unsigned-ValueSource.
void closeBuilding()
Closes the building of the table.
Representation of a lane in the micro simulation.
A window containing a gl-object's parameter.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
An induction loop for mesoscopic simulation.
MESegment *const mySegment
mesoscopic edge segment the loop lies on