52 double position,
const std::string& vTypes)
126 glPolygonOffset(0, -2);
127 double width = (double) 2.0 * s.
scale;
135 glScaled(exaggeration, exaggeration, exaggeration);
137 glVertex2d(0 - 1.0, 2);
138 glVertex2d(-1.0, -2);
145 glVertex2d(0, 2 - .1);
146 glVertex2d(0, -2 + .1);
150 if (width * exaggeration > 1) {
152 glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
154 glVertex2f(0 - 1.0, 2);
155 glVertex2f(-1.0, -2);
159 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
163 if (width * exaggeration > 1) {
164 glRotated(90, 0, 0, -1);
double rotationDegreeAtOffset(double pos) const
Returns the rotation at the given length.
const double myPosition
position from the start of the edge / lane
double myFGRotation
The rotation in full-geometry mode.
double scale
information about a lane's width (temporary, used for a single view)
Position myFGPosition
The position in full-geometry mode.
GUIVisualizationTextSettings addName
~GUIMEInductLoop()
Destructor.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
Stores the information about how to visualize structures.
double y() const
Returns the y-position.
double x() const
Returns the x-position.
const std::vector< MSLane * > & getLanes() const
Returns this edge's lanes.
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.
const std::string & getID() const
Returns the id.
A class that stores a 2D geometrical boundary.
GUIMEInductLoop(const std::string &id, MESegment *s, double position, const std::string &vTypes)
Construtor.
Boundary myBoundary
The detector's boundary.
GUIVisualizationSizeSettings addSize
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
GUIMEInductLoop & getLoop()
Returns the detector itself.
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(GUIMEInductLoop &detector, double pos)
Constructor.
double myPosition
The position on the lane.
A single mesoscopic segment (cell)
const Position geometryPositionAtOffset(double offset, double lateralOffset=0) const
GUIGlID getGlID() const
Returns the numerical id of the object.
double getExaggeration(const GUIVisualizationSettings &s, double factor=20) const
return the drawing size including exaggeration and constantSize values
void add(double x, double y, double z=0)
Makes the boundary include the given coordinate.
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.
const MSEdge & getEdge() const
Returns the edge this segment belongs to.
Representation of a lane in the micro simulation.
A window containing a gl-object's parameter.
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
GUIMEInductLoop & myDetector
The wrapped detector.