43 double position,
const std::string& vTypes)
61 myDetector(detector), myPosition(pos) {
106 ret->
mkItem(
"lane",
false, myDetector.mySegment->getID());
115 glPushName(getGlID());
116 glPolygonOffset(0, -2);
117 double width = (double) 2.0 * s.
scale;
123 glTranslated(myFGPosition.x(), myFGPosition.y(), getType());
124 glRotated(myFGRotation, 0, 0, 1);
125 glScaled(exaggeration, exaggeration, exaggeration);
127 glVertex2d(0 - 1.0, 2);
128 glVertex2d(-1.0, -2);
135 glVertex2d(0, 2 - .1);
136 glVertex2d(0, -2 + .1);
140 if (width * exaggeration > 1) {
142 glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
144 glVertex2f(0 - 1.0, 2);
145 glVertex2f(-1.0, -2);
149 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
153 if (width * exaggeration > 1) {
154 glRotated(90, 0, 0, -1);
162 drawName(getCenteringBoundary().getCenter(), s.
scale, s.
addName);
@ GLO_E1DETECTOR_ME
a E1 detector
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
Boundary myBoundary
The detector's boundary.
Position myFGPosition
The position in full-geometry mode.
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
GUIMEInductLoop & getLoop()
Returns the detector itself.
double myFGRotation
The rotation in full-geometry mode.
MyWrapper(GUIMEInductLoop &detector, double pos)
Constructor.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
GUIMEInductLoop(const std::string &id, MESegment *s, double position, const std::string &vTypes)
Construtor.
virtual GUIDetectorWrapper * buildDetectorGUIRepresentation()
Returns this detector's visualisation-wrapper.
~GUIMEInductLoop()
Destructor.
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)
An induction loop for mesoscopic simulation.
MESegment *const mySegment
mesoscopic edge segment the loop lies on
const double myPosition
position from the start of the edge / lane
A single mesoscopic segment (cell)
const MSEdge & getEdge() const
Returns the edge this segment belongs to.
const std::vector< MSLane * > & getLanes() const
Returns this edge's lanes.
Representation of a lane in the micro simulation.
const PositionVector & getShape() const
Returns this lane's shape.
const Position geometryPositionAtOffset(double offset, double lateralOffset=0) const
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.
double getExaggeration(const GUIVisualizationSettings &s, const GUIGlObject *o, double factor=20) const
return the drawing size including exaggeration and constantSize values